curl-library
zlib and crypto in configure
Date: Fri, 23 Dec 2005 14:10:43 -0500
Ladies and Gentlemen,
I'm having a bit of trouble with the configure script.
I've looked over the forums and couldn't find anyone with similar
problems.
If you don't mind, could you look over what I did, and tell me what you
think?
Let me lay out process that I followed; for my benefit as well.
This all started out with cURL using the wrong OpenSSL headers, when
linking against the cURL library.
I have two builds of OpenSSL: an older default build and a newer build
in a non-default destination: /devhome/gregory/openssl
When I went to build the program with cURL, I was getting undefined
references to des_* functions.
I would configure with the older OpenSSL and build against the newer.
(cURL checks the OpenSSL headers at compile/install time, and will use
a DES_ or des_ prefix
on a handful of functions depending on an OpenSSL version define.
DES_ is the latest, but you knew all that already. Found this in the
forums.)
The fix should have been simple: change --with-ssl so that it pointed
at the correct directory.
It would have been easy, but as soon as I fixed the with-ssl flag from:
--with-ssl=/devhome/gregory/openssl/lib
to
--with-ssl=/devhome/gregory/openssl
configure would bomb out.
I put a `set -x` in the configure script, and found that the build of
the test for SSL_connect() was the culprit (around line 25237):
gcc -o conftest -g -O2 -I/devhome/gregory/openssl/include/openssl
-I/devhome/gregory/openssl/include -L/devhome/gregory/openssl/lib
conftest.c -lssl -lcrypto -ldl
I copied the sample SSL_connect() test program, from line 25226,
compiled it and discovered it was complaining about:
openssl/lib/libcrypto.a(c_zlib.o): In function `zlib_stateful_init':
c_zlib.o(.text+0x60): undefined reference to `inflateInit_'
c_zlib.o(.text+0xae): undefined reference to `deflateInit_'
/devhome/gregory/openssl/lib/libcrypto.a(c_zlib.o): In function
`zlib_stateful_compress_block':
c_zlib.o(.text+0x1ee): undefined reference to `deflate'
/devhome/gregory/openssl/lib/libcrypto.a(c_zlib.o): In function
`zlib_stateful_expand_block':
c_zlib.o(.text+0x25f): undefined reference to `inflate'
/devhome/gregory/openssl/lib/libcrypto.a(c_zlib.o): In function
`zlib_stateful_free_ex_data':
c_zlib.o(.text+0x28a): undefined reference to `inflateEnd'
c_zlib.o(.text+0x295): undefined reference to `deflateEnd'
collect2: ld returned 1 exit status
I stuck a "-lz" and "-L/devhome/gregory/zlib" in the configure compile
and now everything works fine.
zlib-1.2.3.tar.gz
No flags
krb5-1.4.3.tar.gz
--enable-static --disable-shared --without-tcl
openssl-0.9.8a.tar.gz
no-hw no-shared zlib --with-krb5-dir=/devhome/joey/kerberos
All latest version.
I messed around with SSL flags, but no change.
Am I missing a flag, doing something stupid or does zlib really need to
be added to the SSL_connect() test?
The only other thing I should mention is that everything has to be
statically linked.
Flags I'm sending to configure:
--enable-shared=NO
--with-libidn=/devhome/gregory/openssl/libidn
--with-ssl=/devhome/gregory/openssl
--with-zlib=/devhome/gregory/zlib
Thanks
GH
Flame On....
Received on 2005-12-23