cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Compilation error from `urldata.h'

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 3 Oct 2002 15:00:36 +0200 (MET DST)

On Wed, 2 Oct 2002, Bjorn Wiren wrote:

> gcc -DHAVE_CONFIG_H -I../include -I../lib -I../lib
> -I/home/etxbwir/openssl/include/openssl -I/home/etxbwir/openssl/include
> -I/include -g -O2 -c file.c -Wp,-MD,.deps/file.TPlo -fPIC -DPIC -o
> .libs/file.lo

> In file included from file.c:81:
> urldata.h:260: parse error before `z_stream'
> urldata.h:260: warning: no semicolon at end of struct or union
> urldata.h:283: parse error before `}'
> urldata.h:431: field `keep' has incomplete type

Uh. ;-(

> The problem seems to be that `zlib.h' doesn't get included. Its inclusion
> is within "ifdef HAVE_LIBZ_H" in urldata.h, and that symbol isn't defined.
> Saying "--without-zlib" doesn't change a thing.

Then the configure script didn't find that header file.

> Furthermore, configure is unable to pick up a non-standard include path to
> zlib through the --with-zlib option - the bogus "-I/include" in the
> compilation command above is probably a result from that.

Ah, and that's why it doesn't fine the zlib.h file then. Hm, that's pretty
crappy. This zlib stuff is a rather new addition to the curl code.

I've modified the configure.in script since the 7.10 release though and I
believe it might work better now. Any chance you can grab the latest one and
have a go in your end to test this? It requires autoconf 2.50 or later.

> I suppose maybe if you have zlib in the standard location it all works.

Right.

> I manage to compile through hand editing `lib/config.h' such that I either
> disable zlib support, or define `HAVE_LIBZ_H'. If I choose to include zlib
> support, I also need to define the zlib paths via CFLAGS and LDFLAGS.

I'm glad you managed to work-around the flaws. Thanks for reporting.

If you, or anyone else, can try out my changes and see if they work (or
possibly fix it to work if that version too fails), I would appreciate it.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-03