cURL / Mailing Lists / curl-users / Single Mail

curl-users

zlib probs (was: Re: ANNOUNCE: curl and libcurl 7.10.1)

From: Bjorn Wiren <bjorn.wiren_at_ericsson.com>
Date: Mon, 14 Oct 2002 09:49:06 +0200

Daniel Stenberg <daniel_at_haxx.se> writes:

> On Fri, 11 Oct 2002, Bjorn Wiren wrote:
>
>> I still have no luck with my non-standard zlib path (see the thread
>> "Compilation error from `urldata.h'").
>
> I didn't realize you still had problems with this.

Unfortunately I never managed to verify the patch - I ran into
problems with aclocal and libtool.

>
>> #!/bin/sh
>> CC=cc; export CC
>> ./configure --prefix=/home/etxbwir/curl --with-ssl=/home/etxbwir/openssl
>> --with-zlib=/home/etxbwir/xemacs/aux/zlib
>
> Is that zlib path the prefix of that zlib installation? I mean, is appending
> include and lib the correct thing to do to find the header and the lib?
>

Yes:

%> ls -l /home/etxbwir/xemacs/aux/zlib/*
/home/etxbwir/xemacs/aux/zlib/include:
total 96
-rw-r--r-- 1 etxbwir avall 7810 Apr 4 2001 zconf.h
-rw-r--r-- 1 etxbwir avall 40898 Apr 4 2001 zlib.h

/home/etxbwir/xemacs/aux/zlib/lib:
total 160
-rwxr-xr-x 1 etxbwir avall 77732 Apr 4 2001 libz.a

> That's what the configure script does to check.
>
>> Again, if I explicitly define `HAVE_ZLIB_H' in `urldata.h' and set the zlib
>> include and lib paths via CFLAGS and LDFLAGS it works.
>
> Right, that's how it is supposed to work. Good that some things do as they're
> meant at least! ;-)
>
> Checking out your config.log and seeing how the failed checks look like might
> give some clues.
>

Excerpts from `config.log':
------------------------------------------------------------
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.52. Invocation command line was

  $ ./configure --prefix=/home/etxbwir/curl --with-ssl=/home/etxbwir/openssl --with-zlib=/home/etxbwir/xemacs/aux/zlib

[stuff deleted]

configure:10603: checking for zlib.h
configure:10613: cc -E -I/home/etxbwir/openssl/include/openssl -I/home/etxbwir/openssl/include conftest.c
"configure", line 10610: cannot find include file: <zlib.h>
cc: acomp failed for conftest.c
configure:10619: $? = 2
configure: failed program was:
#line 10609 "configure"
#include "confdefs.h"
#include <zlib.h>
configure:10638: result: no
------------------------------------------------------------

So it seems `configure' misses to pick up the zlib path from the
command line. "egrep 'cc .*zlib' config.log" yields no hit at all.

>> BTW, I had to add my non-standard path to openssl/lib too to "LDLIBS",
>> don't remember doing that for 7.10.
>
> The ssl check hasn't been modified since 7.10 so it should work quite the
> same as before! ;-)
>
> That check does about the same operation like the zlib one, it prepends the
> given prefix to "lib" to check for the lib and "include/openssl" (*) to check
> for the headers. How are the ssl headers/libs stored in your given ssl prefix
> "/home/etxbwir/openssl" ?
>
%> ls -l /home/etxbwir/openssl/*
/home/etxbwir/openssl/bin:
total 3896
-rwxr-xr-x 1 etxbwir avall 3620 Jul 16 12:35 c_rehash
-rwxr-xr-x 1 etxbwir avall 1986156 Jul 16 12:35 openssl

/home/etxbwir/openssl/include:
total 16
drwxrwxr-x 2 etxbwir avall 8192 Jul 16 09:48 openssl

/home/etxbwir/openssl/lib:
total 5168
-rw-r--r-- 1 etxbwir avall 2257880 Jul 16 12:35 libcrypto.a
-rw-r--r-- 1 etxbwir avall 374268 Jul 16 12:35 libssl.a

/home/etxbwir/openssl/ssl:
total 56
drwxrwxr-x 2 etxbwir avall 4096 Jul 16 09:48 certs
drwxrwxr-x 2 etxbwir avall 4096 Jul 16 09:48 lib
drwxrwxr-x 6 etxbwir avall 4096 Jul 16 09:45 man
drwxrwxr-x 2 etxbwir avall 4096 Jul 16 09:48 misc
-rw-r--r-- 1 etxbwir avall 7146 Jul 16 12:35 openssl.cnf
drwxrwxr-x 2 etxbwir avall 4096 Jul 16 09:48 private

/home/etxbwir/openssl/include/openssl contains 55 header files.

Looking in `config.log', all the configure tests for ssl seem to run
fine, but when doing make, it stops att this link command:

/usr/ccs/bin/ld -G -z defs -h libcurl.so.2 -o .libs/libcurl.so.2.0.2 file.lo timeval.lo base64.lo hostip.lo progress.lo formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo dict.lo if2ip.lo speedcheck.lo getdate.lo ldap.lo ssluse.lo version.lo getenv.lo escape.lo mprintf.lo telnet.lo getpass.lo netrc.lo getinfo.lo transfer.lo strequal.lo easy.lo security.lo krb4.lo memdebug.lo http_chunks.lo strtok.lo connect.lo llist.lo hash.lo multi.lo content_encoding.lo -L/home/etxbwir/xemacs/aux/zlib/lib -lz -lssl -lcrypto -ldl -lsocket -lnsl -lc
ld: fatal: library -lssl: not found
ld: fatal: library -lcrypto: not found

I need to have "-L/home/etxbwir/openssl/lib" along to fix it, which I
get by saying "LDFLAGS=blabla" in the make command line. During the
configure stage, "-L/home/etxbwir/openssl/lib" *is* along in all the
the `cc conftest' runs.

To summarize, our site is good for testing non-standard package paths
:-)

Cheers

-- 
Björn Wirén
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-14