[gnutls-help] on finding nettle under /usr/local rather than under /usr (GNU+Linux 64-bit system)
Marco Maggi
marco.maggi-ipsu at poste.it
Thu May 30 12:39:01 CEST 2013
Ciao,
I am trying to install Gnutls 3.2.0 on a GNU+Linux 64-bit
system with Slackware's Nettle 2.5 installed under "/usr"
and my own installation of Nettle 2.7.1 under "/usr/local".
I can do:
$ /sbin/ldconfig -p | grep nettle
libnettle.so.4 (libc6,x86-64) => /usr/local/lib/libnettle.so.4
libnettle.so.4 (libc6,x86-64) => /usr/lib64/libnettle.so.4
libnettle.so (libc6,x86-64) => /usr/local/lib/libnettle.so
libnettle.so (libc6,x86-64) => /usr/lib64/libnettle.so
so I would expect Gnutls's building infrastructure to find
the correct version, but instead it does not happen. I can
also do:
$ pkg-config nettle --libs
-L/usr/local/lib -lnettle
$ pkg-config nettle --cflags
-I/usr/local/include
$ pkg-config libtasn1 --libs
-L/usr/local/lib -ltasn1
$ pkg-config libtasn1 --cflags
-I/usr/local/include
If I just do:
$ ./configure
the build starts and it seems to find the right Nettle:
$ grep nettle config.log
configure:8886: checking whether to use nettle
configure:9384: checking for libnettle
configure:9406: gcc -std=gnu99 -o conftest -g -O2 -L/usr/local/lib conftest.c /usr/local/lib/libnettle.so /usr/local/lib/libhogweed.so -lgmp -Wl,-rpath -Wl,/usr/local/lib >&5
configure:9423: checking how to link with libnettle
configure:9425: result: /usr/local/lib/libnettle.so /usr/local/lib/libhogweed.so -lgmp -Wl,-rpath -Wl,/usr/local/lib
config.status:3259: creating lib/nettle/Makefile
ac_cv_libnettle=yes
LIBNETTLE='/usr/local/lib/libnettle.so /usr/local/lib/libhogweed.so -lgmp -Wl,-rpath -Wl,/usr/local/lib'
LTLIBNETTLE='-L/usr/local/lib -lnettle -L/usr/local/lib -lhogweed -lgmp -R/usr/local/lib'
but then "make" will fail because the old Nettle does not
have the needed functions ("nettle_umac_*", "nettle_ecc_*",
etc.); and after building fails I see:
$ ldd lib/.libs/libgnutls.so
linux-vdso.so.1 (0x00007fff1730b000)
libz.so.1 => /usr/lib64/libz.so.1 (0x00007ff2c771d000)
libp11-kit.so.0 => /usr/lib64/libp11-kit.so.0 (0x00007ff2c750b000)
libtasn1.so.6 => /usr/local/lib/libtasn1.so.6 (0x00007ff2c72f8000)
libnettle.so.4 => /usr/lib64/libnettle.so.4 (0x00007ff2c70d3000)
libhogweed.so.2 => /usr/lib64/libhogweed.so.2 (0x00007ff2c6ec0000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007ff2c6c54000)
libc.so.6 => /lib64/libc.so.6 (0x00007ff2c6867000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007ff2c6662000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ff2c6446000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff2c7c3a000)
so libtasn1 is correctly found but Nettle... I dunno.
The same happens if I do:
$ ./configure LDFLAGS=-L/usr/local/lib
If I do:
$ ./configure --with-libnettle-prefix=/usr/local
...
checking whether to use nettle... yes
checking for libnettle... no
configure: error:
***
*** Libnettle 2.7 was not found. Note that you must compile nettle with gmp support.
and:
$ grep nettle config.log
config.log:7: $ ./configure --with-libnettle-prefix=/usr/local
config.log:595:configure:8886: checking whether to use nettle
config.log:597:configure:9384: checking for libnettle
config.log:598:configure:9406: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lnettle -lhogweed -lgmp >&5
config.log:600:/home/marco/var/build/lib/gnutls-3.2.0/conftest.c:35: undefined reference to `nettle_umac96_set_nonce'
config.log:634:| #include <nettle/umac.h>
config.log:638:| nettle_umac96_set_nonce (0,0,0)
config.log:645: *** Libnettle 2.7 was not found. Note that you must compile nettle with gmp support.
config.log:713:ac_cv_libnettle=no
and I see that "/usr/local/lib" is not used.
It seems to me that the distributed "configure.ac" file is
not the one used to generate "configure"; is this weird?
I need some help.
TIA
--
"Now feel the funk blast!"
Rage Against the Machine - "Calm like a bomb"
More information about the Gnutls-help
mailing list