curl / Mailing Lists / curl-library / Single Mail


AW: "configure --with-zlib=<path>" does not work correctly

From: Alexander.Elgert via curl-library <>
Date: Wed, 21 Nov 2018 17:08:25 +0000


> Von: Daniel Stenberg <>
> On Fri, 16 Nov 2018, Alexander.Elgert via curl-library wrote:
> > I compiled zlib version 1.2.11 and told configure where to look for this
> > library, unfortunately it was not successful on redhat 7.6 because the
> > construct "gcc -L<zlib1.2.11_path> -lz" adds the -L behind the "ldconfig -v"
> > paths.
> ldconfig is not used by the linker, it is used by at run-time so I don't
> understand what ldconfig -v has to do with anything here.

Than you for your reply.
I just installed Oracle Linux 7.6, so there might be issues I don't fully understand.

There is no hint why the system libz is used at all, so my guess was the gcc asks the linker to do it "right" and the linker uses some default paths - but I still dont know why.

> We have however seen broken pkg-config in zlib many times that have expressed
> its include path to be /usr/include which thus ruins things.
> Is your problem a -L/usr/include (or similar) that appears in the link line in
> configure?

0 1 aelgert_at_h75:~/src/curl-7.61.1>grep -- -L config.log | wc -l
0 1 aelgert_at_h75:~/src/curl-7.61.1>grep -- -L config.log | grep usr
1 1 aelgert_at_h75:~/src/curl-7.61.1>

> I think the best clues to this problem of your are found in the config.log
> file after configure has compeleted. Where does the wrong flag first appear?

I don't see a wrong flag - it just uses the system library before the given one.
Maybe it defaults to shared libraries, does not find any in the given -L paths and uses the system wide?

(highlighting the string "/usr/lib64" will help much to read the following output)

0 1 aelgert_at_h75:~/src/curl-7.61.1>ll /usr/lib64/
lrwxrwxrwx. 1 root root 13 Nov 6 16:22 /usr/lib64/ ->

0 1 aelgert_at_h75:~/src/curl-7.61.1>gcc -print-search-dirs | sed '/^lib/b 1;d;:1;s,/[^/.][^/]*/\.\./,/,;t 1;s,:[^=]*=,:;,;s,;,; ,g' | tr \; \\012 | grep /usr/lib64

0 1 aelgert_at_h75:~/src/curl-7.61.1>ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
0 1 aelgert_at_h75:~/src/curl-7.61.1>

Best Regards,

Received on 2018-11-21