linux - Why can't .configure for libnettle 2.7.1 find -lgmp even though it is there? -
i'm trying compile gnutls arm on x86 machine (ubuntu 11.04 under virtualbox). right i'm stuck compiling libnettle. ./configure script can't find -lgmp , produces nettle without public key cryptography (no libhogweed) need. message in config.log follows:
for x86:
configure:6976: checking __gmpz_getlimbn in -lgmp configure:7001: gcc -o conftest -l"/home/xena/gnutls/out/x86/lib/" conftest.c -lgmp >&5 /usr/bin/ld: cannot find -lgmp collect2: ld returned 1 exit status configure:7001: $? = 1
and arm:
configure:6976: checking __gmpz_getlimbn in -lgmp configure:7001: arm-none-linux-gnueabi-gcc -o conftest -l"/home/xena/gnutls/out/arm/lib/" -mcpu=arm926ej-s -mthumb conftest.c -lgmp >&5 /usr/local/codesourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgmp collect2: error: ld returned 1 exit status configure:7001: $? = 1
those libraries there:
xena@xena-virtualbox:~/gnutls$ ls /home/xena/gnutls/out/x86/lib/ | grep libgmp libgmp.a libgmp.la libgmp.so libgmp.so.10 libgmp.so.10.1.2 xena@xena-virtualbox:~/gnutls$ ls /home/xena/gnutls/out/arm/lib/ | grep libgmp libgmp.a libgmp.la libgmp.so libgmp.so.10 libgmp.so.10.1.2
and work outside of ./configure:
xena@xena-virtualbox:~/gnutls$ gedit conftest.c xena@xena-virtualbox:~/gnutls$ gcc -o conftest -l"/home/xena/gnutls/out/x86/lib/" conftest.c -lgmp xena@xena-virtualbox:~/gnutls$ ls | grep conftest conftest conftest.c xena@xena-virtualbox:~/gnutls$ rm conftest xena@xena-virtualbox:~/gnutls$ gedit conftest.c xena@xena-virtualbox:~/gnutls$ arm-none-linux-gnueabi-gcc -o conftest -l"/home/xena/gnutls/out/arm/lib/" -mcpu=arm926ej-s -mthumb conftest.c -lgmp xena@xena-virtualbox:~/gnutls$ ls | grep conftest conftest conftest.c xena@xena-virtualbox:~/gnutls$ rm conftest
here build environment:
xena@xena-virtualbox:~/gnutls$ pwd /home/xena/gnutls xena@xena-virtualbox:~/gnutls$ ls build.sh clean.sh gmp-5.1.2.tar.xz gmp-help.txt gnutls-3.2.2.tar.xz gnutls-help.txt nettle-2.7.1.tar.gz nettle-help.txt
and build script:
root=/home/xena/gnutls mkdir -p $root/out tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/ ./configure --prefix=$root/out/x86 && make && make install cd ..; mv gmp-5.1.2 gmp-5.1.2.x86 tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/ ./configure --prefix=$root/out/arm --host=arm-none-linux-gnueabi cflags="-mcpu=arm926ej-s -mthumb" && make && make install cd ..; mv gmp-5.1.2 gmp-5.1.2.arm tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/ ./configure --prefix=$root/out/x86 --disable-openssl --enable-shared cflags="-l\"$root/out/x86/lib/\"" && make && make install cd ..; mv nettle-2.7.1 nettle-2.7.1.x86 tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/ ./configure --prefix=$root/out/arm --disable-openssl --enable-shared --host=arm-none-linux-gnueabi cflags="-l\"$root/out/arm/lib/\" -mcpu=arm926ej-s -mthumb" && make && make install cd ..; mv nettle-2.7.1 nettle-2.7.1.arm #tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/ #./configure --prefix=$root/gnutls-out/x86 --enable-threads=posix --with-sysroot=$root/out/x86 && make && make install #cd ..; mv gnutls-3.2.2 gnutls-3.2.2.x86 #tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/ #./configure --prefix=$root/gnutls-out/arm --enable-threads=posix --with-sysroot=$root/out/arm --host=arm-none-linux-gnueabi cflags="-mcpu=arm926ej-s -mthumb" && make && make install #cd ..; mv gnutls-3.2.2 gnutls-3.2.2.arm
try below command work.give correct path arm built gmp library , include file.
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
cflags=-l/$root/out/arm cppflags=-i/$root/out/arm/include ldflags=-l$root/out/arm/lib ./configure --prefix=$root/out/arm --disable-openssl --enable-shared --host=arm-none-linux-gnueabi
Comments
Post a Comment