curl / Mailing Lists / curl-library / Single Mail

curl-library

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

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

Hello.

> Von: Daniel Stenberg <daniel_at_haxx.se>
> 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 ld.so 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.

https://stackoverflow.com/questions/9922949/how-to-print-the-ldlinker-search-path

> 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
105
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/libz.so.1
lrwxrwxrwx. 1 root root 13 Nov 6 16:22 /usr/lib64/libz.so.1 -> libz.so.1.2.7

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
  /usr/lib/gcc/x86_64-redhat-linux/4.8.5/:/usr/x86_64-redhat-linux/lib/x86_64-redhat-linux/4.8.5/:/usr/x86_64-redhat-linux/lib64/:/usr/lib/x86_64-redhat-linux/4.8.5/:/usr/lib64/:/lib/x86_64-redhat-linux/4.8.5/:/lib64/:/usr/lib/x86_64-redhat-linux/4.8.5/:/usr/lib64/:/usr/x86_64-redhat-linux/lib/:/usr/lib/:/lib/:/usr/lib/

0 1 aelgert_at_h75:~/src/curl-7.61.1>ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/usr/x86_64-redhat-linux/lib64")
SEARCH_DIR("=/usr/lib64")
SEARCH_DIR("=/usr/local/lib64")
SEARCH_DIR("=/lib64")
SEARCH_DIR("=/usr/x86_64-redhat-linux/lib")
SEARCH_DIR("=/usr/local/lib")
SEARCH_DIR("=/lib")
SEARCH_DIR("=/usr/lib")
0 1 aelgert_at_h75:~/src/curl-7.61.1>

Best Regards,
Alexander

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-11-21