[lfs-book] [LFS Trac] #3585: library path problem while building libstdc++ (chapter 5.8. Libstdc++-4.8.2)

LFS Trac trac at linuxfromscratch.org
Sun May 18 17:43:37 PDT 2014


#3585: library path problem while building libstdc++ (chapter 5.8.
Libstdc++-4.8.2)
--------------------+------------------------
 Reporter:  miland  |      Owner:  lfs-book@…
     Type:  task    |     Status:  new
 Priority:  normal  |  Milestone:  7.6
Component:  Book    |    Version:  SVN
 Severity:  normal  |   Keywords:
--------------------+------------------------
 I'm baffled by this one: the configure fails with the following error:

 checking dynamic linker characteristics... configure: error: Link tests
 are not allowed after GCC_NO_EXECUTABLES

 After checking the config.log, these lines seem to indicate where the
 problem is (please note that instead of /tools root I use /usr/share/mk7i-
 toolchain/tools, but it's all consistent):

 configure:6982: i686-alx-linux-gnu-gcc -o conftest -g -O2   conftest.c
 conftstm.o >&5

 /usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-
 gnu/4.8.2/../../../../i686-alx-linux-gnu/bin/ld: cannot find crt1.o: No
 such file or directory

 ... and so forth for a number of libraries and objects. So, I first
 suspected that maybe the built-in search path for ld was wrong, and
 checked:

 mk7 at mk7i-durovicm:/usr/share/mk7i-toolchain/tools/bin> /usr/share/mk7i-
 toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../../../i686-alx-
 linux-gnu/bin/ld --verbose|grep SEARCH

 SEARCH_DIR("/usr/share/mk7i-toolchain/tools/lib");

 Next, I checked if the files were really there. This is also OK:

 mk7 at mk7i-durovicm:/usr/share/mk7i-toolchain/tools/bin> ls -l /usr/share
 /mk7i-toolchain/tools/lib/crt1.o

 -rw-r--r-- 1 root root 2800 2014-05-19 08:14 /usr/share/mk7i-
 toolchain/tools/lib/crt1.o

 Finally, I checked which ld program is invoked by the compiler by default:

 mk7 at mk7i-durovicm:/usr/share/mk7i-toolchain/tools/bin> /usr/share/mk7i-
 toolchain/tools/bin/i686-alx-linux-gnu-gcc -print-prog-name=ld

 /usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-
 gnu/4.8.2/../../../../i686-alx-linux-gnu/bin/ld

 ...and this seems to be OK, too. So, in a conclusion:

 - compiler uses the correct ld program.
 - ld program has the correct search path
 - the path contains all the files that ld complains are not there

 I ran out of ideas on what to check next. The output from ./configure line
 follows:

 ../gcc-4.8.2/libstdc++-v3/configure --host=i686-alx-linux-gnu
 --prefix=/usr/share/mk7i-toolchain/tools --disable-multilib --disable-
 shared --disable-nls --disable-libstdcxx-threads --disable-libstdcxx-pch
 --with-gxx-include-dir=/usr/share/mk7i-toolchain/tools/i686-alx-linux-
 gnu/include/c++/4.8.2
 configure: WARNING: If you wanted to set the --build type, don't use
 --host.
     If a cross compiler is detected then cross compile mode will be used.
 checking build system type... i686-pc-linux-gnu
 checking host system type... i686-alx-linux-gnu
 checking target system type... i686-alx-linux-gnu
 checking for a BSD-compatible install... /usr/bin/install -c
 checking whether build environment is sane... yes
 checking for i686-alx-linux-gnu-strip... i686-alx-linux-gnu-strip
 checking for a thread-safe mkdir -p... /bin/mkdir -p
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking for i686-alx-linux-gnu-gcc... i686-alx-linux-gnu-gcc
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether i686-alx-linux-gnu-gcc accepts -g... yes
 checking for i686-alx-linux-gnu-gcc option to accept ISO C89...
 unsupported
 checking for i686-alx-linux-gnu-g++... i686-alx-linux-gnu-g++
 checking whether we are using the GNU C++ compiler... yes
 checking whether i686-alx-linux-gnu-g++ accepts -g... yes
 checking how to run the C preprocessor... i686-alx-linux-gnu-gcc -E
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking whether ln -s works... yes
 checking for i686-alx-linux-gnu-as... i686-alx-linux-gnu-as
 checking for i686-alx-linux-gnu-ar... i686-alx-linux-gnu-ar
 checking for i686-alx-linux-gnu-ranlib... i686-alx-linux-gnu-ranlib
 checking whether to enable maintainer-specific portions of Makefiles... no
 configure: CPU config directory is cpu/i486
 configure: OS config directory is os/gnu-linux
 checking how to print strings... printf
 checking for a sed that does not truncate output... /usr/bin/sed
 checking for fgrep... /usr/bin/grep -F
 checking for ld used by i686-alx-linux-gnu-gcc... /usr/share/mk7i-
 toolchain/tools/i686-alx-linux-gnu/bin/ld
 checking if the linker (/usr/share/mk7i-toolchain/tools/i686-alx-linux-
 gnu/bin/ld) is GNU ld... yes
 checking for BSD- or MS-compatible name lister (nm)... /usr/share/mk7i-
 toolchain/tools/bin/i686-alx-linux-gnu-nm -B
 checking the name lister (/usr/share/mk7i-toolchain/tools/bin/i686-alx-
 linux-gnu-nm -B) interface... BSD nm
 checking the maximum length of command line arguments... 1572864
 checking whether the shell understands some XSI constructs... yes
 checking whether the shell understands "+="... yes
 checking for /usr/share/mk7i-toolchain/tools/i686-alx-linux-gnu/bin/ld
 option to reload object files... -r
 checking for i686-alx-linux-gnu-objdump... i686-alx-linux-gnu-objdump
 checking how to recognize dependent libraries... pass_all
 checking for i686-alx-linux-gnu-ar... (cached) i686-alx-linux-gnu-ar
 checking for i686-alx-linux-gnu-strip... (cached) i686-alx-linux-gnu-strip
 checking for i686-alx-linux-gnu-ranlib... (cached) i686-alx-linux-gnu-
 ranlib
 checking command to parse /usr/share/mk7i-toolchain/tools/bin/i686-alx-
 linux-gnu-nm -B output from i686-alx-linux-gnu-gcc object... failed
 checking for ANSI C header files... no
 checking for sys/types.h... no
 checking for sys/stat.h... no
 checking for stdlib.h... no
 checking for string.h... no
 checking for memory.h... no
 checking for strings.h... no
 checking for inttypes.h... no
 checking for stdint.h... no
 checking for unistd.h... no
 checking for dlfcn.h... no
 checking for objdir... .libs
 checking if i686-alx-linux-gnu-gcc supports -fno-rtti -fno-exceptions...
 no
 checking for i686-alx-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
 checking if i686-alx-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
 checking if i686-alx-linux-gnu-gcc static flag -static works... no
 checking if i686-alx-linux-gnu-gcc supports -c -o file.o... yes
 checking if i686-alx-linux-gnu-gcc supports -c -o file.o... (cached) yes
 checking whether the i686-alx-linux-gnu-gcc linker (/usr/share/mk7i-
 toolchain/tools/i686-alx-linux-gnu/bin/ld) supports shared libraries...
 yes
 checking dynamic linker characteristics... configure: error: Link tests
 are not allowed after GCC_NO_EXECUTABLES.

-- 
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/3585>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.


More information about the lfs-book mailing list