0
I have built gcc-4.9.0 in a Debian Lenny chroot, on a Debian Wheezy host. The arch=Armel (Wheezy and Lenny). I have used the following configure options:
$PWD/../gcc-4.9.0/configure --prefix=/usr/local/GCC-4.9.0 --enable-languages=c,c++ --with-arch=armv4t --with-float=soft --enable-checking=release --enable-shared --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi LDFLAGS=-Wl,-no-keep-memory --disable-libjava
When I try to build some libs (libgcrypt in this example) I am not able to build shared libraries:
checking whether the /usr/local/GCC-4.9.0/bin/gcc linker (/usr/local/GCC-4.9.0/bin/gcc) supports shared libraries... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes`
And for Curl:
gcc: error: ../lib/.libs/libcurl.so: No such file or directory
make[2]: *** [Makefile:923: curl] Error 1
Am I still missing some configure option(s) when building gcc?
1There should be a
config.log
file in the directory you ran./configure
from while trying to build libgcrypt. That file will give you more info about what ran and possibly why it failed. – Patrice Levesque – 2019-06-10T23:51:37.407Libgcrypt built but with static libs instead of shared. The config.log only confirms this by stating that the linker (gcc) does not support shared libraries. – Phil Turner – 2019-06-11T15:47:27.217
What does the
config.log
say exactly? there should be a test of some sort that./configure
does to determine shared libraries support, it does not get that information from thin air. Usually theconfig.log
file indicates at what./configure
lines the test runs. – Patrice Levesque – 2019-06-12T00:02:42.730checking whether the /usr/local/GCC-4.9.0/bin/gcc linker (/usr/local/GCC-4.9.0/bin/gcc) supports shared libraries... no
is weird — linker should normally beld
. – Patrice Levesque – 2019-06-12T00:03:39.813Thank you Patrice, well spotted. The problem was that linker was incorrectly pointing to gcc instead of ld (a typo on my part) – Phil Turner – 2019-06-12T11:53:05.797
Happy to help. I'll repost as a real answer, as prescribed in https://meta.stackoverflow.com/questions/294791/what-if-i-answer-a-question-in-a-comment
– Patrice Levesque – 2019-06-12T18:27:26.917