cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problem finding shared lib

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 12 Jan 2016 21:49:07 +0100

On Tue, Jan 12, 2016 at 08:37:06PM +0000, Dave Kennard wrote:
> I'm trying to compile curl 7.46.0. When I run
> ./configure --prefix=$HOME/apps/$CURL --with-ssl=$HOME/apps/openssl
> --with-nghttp2=$HOME/apps/nghttp2 --disable-ldap --disable-ldaps
>
> I get the following error:
>
> checking run-time libs availability... failed
> configure: error: one or more libs available at link-time are not available
> run-time. Libs used at link-time: -lnghttp2 -lidn -lssl -lcrypto -lssl
> -lcrypto -lz -lrt
>
>
> Checking config.log I see:
>
> configure:27139: checking run-time libs availability
> configure:27156: gcc -o conftest -O2 -Wno-system-headers
> -I/home/djeyewater/apps/openssl-1.0.2e/include
> -I/home/djeyewater/apps/nghttp2-1.6.0/include
> -L/home/djeyewater/apps/openssl-1.0.2e/lib
> -L/home/djeyewater/apps/nghttp2-1.6.0/lib conftest.c -lnghttp2 -lidn
> -lssl -lcrypto -lssl -lcrypto -lz -lrt >&5
> configure:27156: $? = 0
> configure:27156: ./conftest
> ./conftest: error while loading shared libraries: libnghttp2.so.14: cannot
> open shared object file: No such file or directory
> configure:27156: $? = 127
> configure: program exited with status 127
>
> But libnghttp2.so.14 exists:
>
> [djeyewater_at_web106 curl-7.46.0]$ ls -l
> /home/djeyewater/apps/nghttp2-1.6.0/lib
> total 928
> -rw-r--r-- 1 djeyewater djeyewater 538878 Jan 12 19:49 libnghttp2.a
> -rwxr-xr-x 1 djeyewater djeyewater 985 Jan 12 19:49 libnghttp2.la
> lrwxrwxrwx 1 djeyewater djeyewater 20 Jan 12 19:49 libnghttp2.so ->
> libnghttp2.so.14.4.0
> lrwxrwxrwx 1 djeyewater djeyewater 20 Jan 12 19:49 libnghttp2.so.14 ->
> libnghttp2.so.14.4.0
> -rwxr-xr-x 1 djeyewater djeyewater 391928 Jan 12 19:49 libnghttp2.so.14.4.0
> drwxrwxr-x 2 djeyewater djeyewater 4096 Jan 12 19:49 pkgconfig
>
> It appears to be looking in the correct location (~/apps/nghttp2 is a
> symlink to ~/apps/nghttp2-1.6.0), so I'm not sure why it can't find it?

It's probably linking, but it can't be found by the dynamic linker at run time.
Try setting LD_LIBRARY_PATH=/home/djeyewater/apps/openssl-1.0.2e/lib in your
environment when you configure. Or, try using pkg-config to find the library
instead of hacking in compiler flags (i.e. set
PKG_CONFIG_PATH=/home/djeyewater/apps/openssl-1.0.2e/lib/pkgconfig).

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-12