pass 2 build of gcc-3.4.2 has a problem with libgcc_s.so.1
Pol Vangheluwe
pol.vangheluwe at belgacom.net
Sat Jul 18 14:26:22 MDT 2009
I try to follow the LFS 4.6 book as closely as possible. I had to
apply the following deviations:
- the host system has glibc-2.1.3 instead of the recommended
glibc-2.2.5. I broke several times my system, by trying to upgrade
glibc. Then I gave up and turned to LFS.
- replaced /usr/bin by /usr/local/bin in several commands because my
host system was upgraded from a 10-year old distribution to comply
with the LFS recommendations and the new binaries reside in /usr/local/
bin.
- didn't add the "echo "CFLAGS += -march=i486 -mtune=native" >
configparms" in section 5.7, because my system has no Intel processor;
- the name of my dynamic linker is "ld.so.1" instead of "ld-linux.so.2".
So far, I didn't consider using a newer version then the one used in
the LFS book (it takes about 30 hours to perform a bootstrap build of
gcc on my poor 100Mhz PowerPC 601…)
I didn't use particular CFLAGS for my hardware.
I still suspect a problem with mixed-up search paths…
pvg
Op 18-jul-09, om 21:54 heeft Justin P. Mattock het volgende geschreven:
> Pol Vangheluwe wrote:
>> I was maybe not clear enough: I am not yet at chapter 6. I am doing
>> section 5.12, so no chrooting in the game.
>>
>> I have some doubts about the manipulation of the
>> specs file in section 5.8. Nothing changed when I view with -
>> dumpspecs:
>> lfs:/lfs/sources/bash-3.2$ 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}}}
>>
>> while I find in the specs file itself the expected path:
>> lfs:/lfs/sources/bash-3.2$ cat
>> /lfs/tools/bin/../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}}}
>>
>> Can this have something to do with my problem?
>>
>>
>> pvg
>>
>>
>> Op 16-jul-09, om 21:41 heeft Justin P. Mattock het volgende
>> geschreven:
>>
>>> Pol Vangheluwe wrote:
>>>> But why is it using /lib/libc.so.6 (from the original distribution)
>>>> instead of /lfs/tools/lib/libc.so.6?
>>>>
>>>>
>>>> pvg
>>>>
>>>>
>>>> Op 16-jul-09, om 16:11 heeft Justin P. Mattock het volgende
>>>> geschreven:
>>>>
>>>>> Pol Vangheluwe wrote:
>>>>>> I am trying to install LFS, edition 6.4 on an Apple PowerPC 7200
>>>>>> (indeed, an "old-world" Mac). I installed linux from the MkLinux
>>>>>> distribution R1 (yes, a very old distribution) and then
>>>>>> upgraded the
>>>>>> system to Linux 2.6 from
>>>>>> sources. I could not upgrade glibc without breaking the
>>>>>> system, so
>>>>>> it is still running glibc-2.1.3. This is the only requirement
>>>>>> for
>>>>>> the host system I could not fulfill.
>>>>>>
>>>>>> lfs:/lfs/sources/gcc-build$ cat /etc/issue
>>>>>>
>>>>>> Linux for PowerPC. Brought to you by The MkLinux Project.
>>>>>> Based on Red Hat Linux Red Hat Linux release 6.0 (Hedwig)
>>>>>> Kernel 2.6.26BuiltbySoftPol on a PowerPC 601
>>>>>>
>>>>>> I have a problem, building gcc-4.3.2 in pass 2:
>>>>>>
>>>>>> lfs:/lfs/sources/gcc-build$ ../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
>>>>>> (…)
>>>>>> lfs:/lfs/sources/gcc-build$ make
>>>>>> (…)
>>>>>> # Now that we have built all the objects, we need to copy
>>>>>> # them back to the GCC directory. Too many things (other
>>>>>> # in-tree libraries, and DejaGNU) know about the layout
>>>>>> # of the build tree, for now.
>>>>>> make install-leaf DESTDIR=../.././gcc \
>>>>>> slibdir= libsubdir= MULTIOSDIR=.
>>>>>> make[3]: Entering directory
>>>>>> `/lfs/sources/gcc-build/powerpc-unknown-linux-gnu/libgcc'
>>>>>> /bin/sh ../../../gcc-4.3.2/libgcc/../mkinstalldirs ../.././gcc
>>>>>> /usr/local/bin/install -c -m 644 libgcc_eh.a ../.././gcc/
>>>>>> chmod 644 ../.././gcc/libgcc_eh.a
>>>>>> /tools/powerpc-unknown-linux-gnu/bin/ranlib ../.././gcc/
>>>>>> libgcc_eh.a
>>>>>> /bin/sh ../../../gcc-4.3.2/libgcc/../mkinstalldirs ../.././gcc;
>>>>>> /usr/local/bin/install -c -m 644 ./libgcc_s.so.1
>>>>>> ../.././gcc/libgcc_s.so.1; rm -f ../.././gcc/libgcc_s.so; ln -s
>>>>>> libgcc_s.so.1 ../.././gcc/libgcc_s.so
>>>>>> rm: /lib/libc.so.6: version `GLIBC_2.2.4' not found (required by
>>>>>> /lfs/sources/gcc-build/./gcc/libgcc_s.so.1)
>>>>>> ln: /lib/libc.so.6: version `GLIBC_2.2.4' not found (required by
>>>>>> /lfs/sources/gcc-build/./gcc/libgcc_s.so.1)
>>>>>> make[3]: *** [install-shared] Error 1
>>>>>> make[3]: Leaving directory
>>>>>> `/lfs/sources/gcc-build/powerpc-unknown-linux-gnu/libgcc'
>>>>>> make[2]: *** [all] Error 2
>>>>>> make[2]: Leaving directory
>>>>>> `/lfs/sources/gcc-build/powerpc-unknown-linux-gnu/libgcc'
>>>>>> make[1]: *** [all-target-libgcc] Error 2
>>>>>> make[1]: Leaving directory `/lfs/sources/gcc-build'
>>>>>> make: *** [all] Error 2
>>>>>>
>>>>>>
>>>>>> I am surprised to see that there are still dependencies in this
>>>>>> phase
>>>>>> of the project on the host system...
>>>>>>
>>>>>>
>>>>>> lfs:/lfs/sources/gcc-build$ locate libc.so.6
>>>>>> /home/ftp/lib/libc.so.6
>>>>>> /lfs/tools/lib/libc.so.6
>>>>>> /lib/libc.so.6
>>>>>>
>>>>>> lfs:/lfs/sources/gcc-build$ env
>>>>>> TERM=xterm-color
>>>>>> OLDPWD=/home/lfs
>>>>>> LC_ALL=POSIX
>>>>>> LFS=/mnt/lfs
>>>>>> PATH=/tools/bin:/usr/local/bin:/bin:/usr/bin
>>>>>> PWD=/lfs/sources/gcc-build
>>>>>> PS1=\u:\w\$
>>>>>> SHLVL=1
>>>>>> HOME=/home/lfs
>>>>>> _=/usr/local/bin/env
>>>>>>
>>>>>> lfs:/lfs/sources/gcc-build$ locate bin/rm
>>>>>> /bin/rm
>>>>>> (…)
>>>>>> /usr/local/bin/rm
>>>>>> (…)
>>>>>> lfs:/lfs/sources/gcc-build$ locate bin/ln
>>>>>> /bin/ln
>>>>>> /usr/local/bin/ln
>>>>>> (…)
>>>>>>
>>>>>>
>>>>>> pvg
>>>>>>
>>>>>>
>>>>> oops, after sending I realized you were not building
>>>>> libc but gcc,(it early morning here).
>>>>> The compiler is looking for glibc-2.2.4
>>>>> So it can finish with compiling.
>>>>>
>>>>> Justin P. Mattock
>>>>> --
>>>>> http://linuxfromscratch.org/mailman/listinfo/lfs-support
>>>>> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
>>>>> Unsubscribe: See the above information page
>>>>
>>> My guess is you haven't set the chroot environment
>>> correctly, causing gcc to look for certain libraries on the
>>> host still instead of /tools/*
>>>
>>> Justin P. Mattock
>>> --
>>> http://linuxfromscratch.org/mailman/listinfo/lfs-support
>>> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
>>> Unsubscribe: See the above information page
>>
> Could be, have you considered using the latest gcc
> instead of an older version?
> over here I'm at 4.4.0(should be using 4.4.1)
>
> Also are you compiling gcc with certain CFLAGS
> so that the compiler matches your hardware?
>
> Justin P. Mattock
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://linuxfromscratch.org/pipermail/lfs-support/attachments/20090718/9f28202f/attachment-0001.html
More information about the lfs-support
mailing list