Op 20-jul-09, om 11:22 heeft Pol Vangheluwe het volgende geschreven:

I just do this for fun: it is a nice challenge trying to install an up-to-date linux on a 13-year old machine (if I really need Linux, then I use Darwin on my iMac). I removed the Pentium PCI processor card, added memory, a second SCSI disk and a PCI USB card. So far, I could upgrade to a 2.6 kernel, but I could not upgrade glibc without breaking the system. That's the reason why I am now trying LFS.

I am aware that I cannot use grub to boot linux on my old-world machine. So far I didn't read that chapter but I hope that I 'll can boot with bootX as usual.

Back to my problem: what worries me is that gcc is apparently not reading the modified spec file: The script from section 5.8 executed correctly (mind that my system uses ld.so.1 instead of ld-linux.so.2):

lfs:~$ cat /lfs/tools/lib/gcc/powerpc-unknown-linux-gnu/4.3.2/specs | grep ld.so.1 -m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export- dynamic} %{!dynamic-linker:-dynamic-linker %{muclibc:%{mglibc:%e- mglibc and -muclibc used together}/lib/ld-uClibc.so.0;:/tools/lib/ ld.so.1}}}} -m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export- dynamic} %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}

But gcc still uses /lib/ld.so.1:

lfs:~$ gcc -dumpspecs | grep ld.so.1
-m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export- dynamic} %{!dynamic-linker:-dynamic-linker %{muclibc:%{mglibc:%e- mglibc and -muclibc used together}/lib/ld-uClibc.so.0;:/lib/ld.so. 1}}}} -m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export- dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}

I found in the lfs archives similar problem reports, so I add here my output on a check suggested there:

lfs:~$ echo | gcc -v -x c - 2>&1 | sed -n '/^#include/,/End of search list/p'
#include "..." search starts here:
#include <...> search starts here:
 /lfs/tools/bin/../lib/gcc/powerpc-unknown-linux-gnu/4.3.2/include
/lfs/tools/bin/../lib/gcc/powerpc-unknown-linux-gnu/4.3.2/include- fixed
 /tools/include
 /usr/include
End of search list.

pvg

How I solved this problem:

My host system (an Apple PowerPC 7200 running linux-2.6, but with glibc-2.1.3) has not the required version glibc-2.2.5. When making gcc, pass-2, the newly built /lfs/sources/gcc-build/./gcc/libgcc_s.so. 1 is apparently immediately used in the same make process, resulting in many errors like: "<app>: /lib/libc.so.6: version `GLIBC_2.2.4' not found (required by /lfs/sources/gcc-build/./gcc/libgcc_s.so.1)". I could work around this error by first compiling every offending <app>. Finally I had to compile most of the toolchain (bash, m4, ncurses, coreutils, make, grep, autoconf, automake, texinfo, diffutils and gettext). I followed the instructions of the LFS manual, although sometimes I had to modify the configuration to let succeed the build.

The toughest problem however were 2 errors I got during a configure phase of the gcc build:
"configure: error: unsupported system, cannot find sizeof (omp_lock_t)"
"checking size of int... configure: error: cannot compute sizeof (int), 77" It took some time before I discovered in the log files that a newly built xgcc was used during this configuration. And it took even more time before I understood that this xgcc also needed a modified specs file to work properly on my system. So I had to run the following command: lfs:/lfs/sources/gcc-build/gcc$ ./xgcc -dumpspecs | sed 's@/lib/ld.so. 1@/tools&@g' > `dirname $(./xgcc -print-libgcc-file-name)`/specs
lfs:/lfs/sources/gcc-build/gcc$ cat specs | grep 'tools'
-m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker %{muclibc:%{mglibc:%e-mglibc and - muclibc used together}/lib/ld-uClibc.so.0;:/tools/lib/ld.so.1}}}} -m elf32ppclinux %{!shared: %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /tools/lib/ld.so.1}}}

Finally, I could successfully build and install gcc in pass-2. I am now proceeding as from section 5.13 of the LFS-6.4 manual, so far without any problem.

I am still wondering why I could build gcc without any problem in pass-1, while pass-2 was so dependent of the host system…

BTW: what's also confusing: the command 'gcc-dumpspecs' only shows the built-in specs; if you want to know what specs files are actually used, you have to submit the command:
lfs:~$ gcc -v
Reading specs from /lfs/tools/bin/../lib/gcc/powerpc-unknown-linux-gnu/ 4.3.2/specs
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.3.2/configure --prefix=/tools --with-local- prefix=/tools --enable-clocale=gnu --enable-shared --enable- threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable- libstdcxx-pch --disable-bootstrap
Thread model: posix
gcc version 4.3.2 (GCC)

pvg

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to