Hi,

 

I've come across a strange problem in building libstdc++. Before I
proceed, let me just say that in my environment I have $LFS set to
/usr/share/mk7i-toolchain and tools are rooted at
/usr/share/mk7i-toolchain/tools instead of /tools. I had no problem with
that when building binutils, gcc pass 1 and glibc. So here's the
problem:

 

The problem happens when executing ../gcc-4.8.2/libstdc++-v3/configure
line. I get:

 

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

 

which can be then tracked in the config.log file to the following
problem:

 

configure:3891: i686-alx-linux-gnu-gcc -o conftest    conftest.c  >&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

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

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/libc.so.6 inside
/usr/share/mk7i-toolchain

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/libc_nonshared.a inside
/usr/share/mk7i-toolchain

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/ld-linux.so.2 inside
/usr/share/mk7i-toolchain

collect2: error: ld returned 1 exit status

 

Now, what's strange about it is that when I check the settings of
cross-compile tools, things appear as one would expect. For example, the


default ld program for gnu-gcc is:

 

mk7@mk7i-durovicm:~>
/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 the built-in search path for this linker is:

 

mk7@mk7i-durovicm:~>
/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");

 

The confusing bit is that all the files that ld complains about ("No
such file or directory") are actually right there! For example:

 

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

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

 

So, I'm really stuck here. If it helps, I tried building a small test
program to trigger the same error, but with more verbose output than

configure script provides, in order to reveal internal processing.
Here's what I get:

 

-- start quote --

mk7@mk7i-durovicm:~>
/usr/share/mk7i-toolchain/tools/bin/i686-alx-linux-gnu-gcc -v
-I/usr/share/mk7i-toolchain/tools/include test.c

Using built-in specs.

COLLECT_GCC=/usr/share/mk7i-toolchain/tools/bin/i686-alx-linux-gnu-gcc

COLLECT_LTO_WRAPPER=/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx
-linux-gnu/4.8.2/lto-wrapper

Target: i686-alx-linux-gnu

Configured with: ../gcc-4.8.2/configure --target=i686-alx-linux-gnu
--prefix=/usr/share/mk7i-toolchain/tools
--with-sysroot=/usr/share/mk7i-toolchain --with-newlib --without-headers
--with-local-prefix=/usr/share/mk7i-toolchain/tools
--with-native-system-header-dir=/usr/share/mk7i-toolchain/tools/include
--disable-nls --disable-shared --disable-multilib
--disable-decimal-float --disable-threads --disable-libatomic
--disable-libgomp --disable-libitm --disable-libmudflap
--disable-libquadmath --disable-libsanitizer --disable-libssp
--disable-libstdc++-v3 --enable-languages=c,c++

Thread model: single

gcc version 4.8.2 (GCC)

COLLECT_GCC_OPTIONS='-v' '-I' '/usr/share/mk7i-toolchain/tools/include'
'-mtune=generic' '-march=pentiumpro'

/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx-linux-gnu/4.8.2/cc1
-quiet -v -I /usr/share/mk7i-toolchain/tools/include test.c -quiet
-dumpbase test.c -mtune=generic -march=pentiumpro -auxbase test -version
-o /tmp/ccAoJ9y4.s

GNU C (GCC) version 4.8.2 (i686-alx-linux-gnu)

        compiled by GNU C version 4.1.2 20061115 (prerelease) (SUSE
Linux), GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2

GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072

ignoring nonexistent directory
"/usr/share/mk7i-toolchain/usr/share/mk7i-toolchain/tools/include"

ignoring nonexistent directory
"/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../
../../i686-alx-linux-gnu/include"

ignoring nonexistent directory
"/usr/share/mk7i-toolchain/usr/share/mk7i-toolchain/tools/include"

#include "..." search starts here:

#include <...> search starts here:

/usr/share/mk7i-toolchain/tools/include

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/include

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/include
-fixed

End of search list.

GNU C (GCC) version 4.8.2 (i686-alx-linux-gnu)

        compiled by GNU C version 4.1.2 20061115 (prerelease) (SUSE
Linux), GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2

GGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072

Compiler executable checksum: d4ab0d4090ea5fd2277f9bf8e110997e

COLLECT_GCC_OPTIONS='-v' '-I' '/usr/share/mk7i-toolchain/tools/include'
'-mtune=generic' '-march=pentiumpro'

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/as -v -I
/usr/share/mk7i-toolchain/tools/include --32 -o /tmp/ccesbM52.o
/tmp/ccAoJ9y4.s

GNU assembler version 2.24 (i686-alx-linux-gnu) using BFD version (GNU
Binutils) 2.24

COMPILER_PATH=/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx-linux
-gnu/4.8.2/:/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx-linux-g
nu/4.8.2/:/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx-linux-gnu
/:/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/:/usr
/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/:/usr/share/mk7i-
toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../../../i686-alx-li
nux-gnu/bin/

LIBRARY_PATH=/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/
4.8.2/:/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/
../../../../i686-alx-linux-gnu/lib/

COLLECT_GCC_OPTIONS='-v' '-I' '/usr/share/mk7i-toolchain/tools/include'
'-mtune=generic' '-march=pentiumpro'

/usr/share/mk7i-toolchain/tools/libexec/gcc/i686-alx-linux-gnu/4.8.2/col
lect2 --sysroot=/usr/share/mk7i-toolchain --eh-frame-hdr -m elf_i386
-dynamic-linker /usr/share/mk7i-toolchain/tools/lib/ld-linux.so.2 crt1.o
crti.o
/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/crtbegi
n.o -L/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2
-L/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../..
/../../i686-alx-linux-gnu/lib /tmp/ccesbM52.o -lgcc -lc -lgcc
/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/crtend.
o crtn.o

/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

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

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/libc.so.6 inside
/usr/share/mk7i-toolchain

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/libc_nonshared.a inside
/usr/share/mk7i-toolchain

/usr/share/mk7i-toolchain/tools/lib/gcc/i686-alx-linux-gnu/4.8.2/../../.
./../i686-alx-linux-gnu/bin/ld: cannot find
/usr/share/mk7i-toolchain/tools/lib/ld-linux.so.2 inside
/usr/share/mk7i-toolchain

collect2: error: ld returned 1 exit status

-- end quote --

 

Any help or hint are really appreciated. I've checked file permissions,
paths, just no more clues...

 

Regards,

Milan



IMPORTANT CONFIDENTIALITY NOTICE:

This E-mail (including any documents referred to in, or attached, to this 
E-mail) may contain information that is personal, confidential or the subject 
of copyright, privilege or other proprietary rights in favor of Aristocrat, its 
affiliates or third parties. This E-mail is intended only for the named 
addressee. Any privacy, confidence, legal professional privilege, copyright or 
other proprietary rights in favor of Aristocrat, its affiliates or third 
parties, is not lost if this E-mail was sent to you by mistake.

If you received this E-mail by mistake you should: (i) not copy, disclose, 
distribute or otherwise use it, or its contents, without the consent of 
Aristocrat or the owner of the relevant rights; (ii) let us know of the mistake 
by reply E-mail or by telephone (AUS +61 2 9013 6000 or USA 1-877-274-9661); 
and (iii) delete it from your system and destroy all copies.

Any personal information contained in this E-mail must be handled in accordance 
with applicable privacy laws.

Electronic and internet communications can be interfered with or affected by 
viruses and other defects. As a result, such communications may not be 
successfully received or, if received, may cause interference with the 
integrity of receiving, processing or related systems (including hardware, 
software and data or information on, or using, that hardware or software). 
Aristocrat gives no assurances in relation to these matters.

If you have any doubts about the veracity or integrity of any electronic 
communication we appear to have sent you, please call (AUS +61 2 9013 6000 or 
USA 1-877-274-9661) for clarification.
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to