On 22/09/2017 20:55, Pol Vangheluwe wrote:
I already built successfully LFS-7.2 on a PowerPC G4 with ALFS. I am
now upgrading this machine to LFS-8.1.
The build fails at 037-glibc-2.26 with this error:
(…)
rm -f /mnt/build_dir/sources/glibc-2.26/build/stubs.h
make[2]: Leaving directory '/mnt/build_dir/sources/glibc-2.26'
make[1]: Leaving directory '/mnt/build_dir/sources/glibc-2.26/build'
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/ld:
cannot find crt1.o: No such file or directory
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
I get the same error when I try to compile the test program. This is
the output when using the “-v” option with gcc:
bash-4.3$ $LFS_TGT-gcc -v dummy.c
Using built-in specs.
COLLECT_GCC=ppc-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/lto-wrapper
Target: ppc-lfs-linux-gnu
Configured with: ../configure --target=ppc-lfs-linux-gnu
--prefix=/tools --with-glibc-version=2.11
--with-sysroot=/mnt/build_dir --with-newlib --without-headers
--with-local-prefix=/tools
--with-native-system-header-dir=/tools/include --disable-nls
--disable-shared --disable-multilib --disable-decimal-float
--disable-threads --disable-libatomic --disable-libgomp
--disable-libmpx --disable-libquadmath --disable-libssp
--disable-libvtv --disable-libstdcxx target_alias=ppc-lfs-linux-gnu
--enable-languages=c,c++,lto --no-create --no-recursion
There are a number of options, which are not in the vanilla book
(target_alias, --no-create,...). Do you use a customized version of the
book? I guess it is necessary for ppc. I wonder what you have for
replacing the instructions on the gcc page starting with "for file in
gcc/config/{linux,i386/linux{,64}}.h". I guess there might be files
mentioning ppc in gcc/config, which are not touched by the instructions
in the vanilla book. I think the issue is there...
Thread model: single
gcc version 7.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v'
/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/cc1
-quiet -v -imultilib . -imultiarch powerpc-linux-gnu -iprefix
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/
-D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux
-D__linux -Asystem=linux -Asystem=unix -Asystem=posix dummy.c -quiet
-dumpbase dummy.c -auxbase dummy -version -o /tmp/cct5oHWj.s
I am somewhat anxious about -imultilib: gcc is compiled with
--disable-multilib
GNU C11 (GCC) version 7.2.0 (ppc-lfs-linux-gnu)
compiled by GNU C version 5.1.0, GMP version 6.1.2, MPFR version
3.1.5, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/include"
ignoring duplicate directory
"/mnt/build_dir/tools/bin/../lib/gcc/../../lib/gcc/ppc-lfs-linux-gnu/7.2.0/include"
ignoring nonexistent directory
"/mnt/build_dir/tools/include/powerpc-linux-gnu"
ignoring duplicate directory
"/mnt/build_dir/tools/bin/../lib/gcc/../../lib/gcc/ppc-lfs-linux-gnu/7.2.0/include-fixed"
ignoring nonexistent directory
"/mnt/build_dir/tools/bin/../lib/gcc/../../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/include"
ignoring nonexistent directory
"/mnt/build_dir/tools/include/powerpc-linux-gnu"
ignoring duplicate directory "/mnt/build_dir/tools/include"
#include "..." search starts here:
#include <...> search starts here:
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/include
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/include-fixed
/mnt/build_dir/tools/include
End of search list.
GNU C11 (GCC) version 7.2.0 (ppc-lfs-linux-gnu)
compiled by GNU C version 5.1.0, GMP version 6.1.2, MPFR version
3.1.5, MPC version 1.0.3, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d9ff4b98096773ae8902d1e921a34434
COLLECT_GCC_OPTIONS='-v'
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/as
-v -mppc -many -mbig -o /tmp/ccXUP9Hq.o /tmp/cct5oHWj.s
GNU assembler version 2.29 (ppc-lfs-linux-gnu) using BFD version (GNU
Binutils) 2.29
COMPILER_PATH=/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/:/mnt/build_dir/tools/bin/../libexec/gcc/:/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/
LIBRARY_PATH=/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/:/mnt/build_dir/tools/bin/../lib/gcc/:/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/lib/
COLLECT_GCC_OPTIONS='-v'
/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/collect2
-plugin
/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/liblto_plugin.so
-plugin-opt=/mnt/build_dir/tools/bin/../libexec/gcc/ppc-lfs-linux-gnu/7.2.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/cc54qNuw.res
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc --sysroot=/mnt/build_dir
--eh-frame-hdr -V -m elf32ppclinux -dynamic-linker /lib/ld.so.1 crt1.o
crti.o
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/crtbegin.o
-L/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0
-L/mnt/build_dir/tools/bin/../lib/gcc
-L/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/lib
/tmp/ccXUP9Hq.o -lgcc -lc -lgcc
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/crtend.o
crtn.o
GNU ld (GNU Binutils) 2.29
Supported emulations:
elf32ppclinux
elf32ppc
elf32ppcsim
elf32lppclinux
elf32lppc
elf32lppcsim
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/ld:
cannot find crt1.o: No such file or directory
/mnt/build_dir/tools/bin/../lib/gcc/ppc-lfs-linux-gnu/7.2.0/../../../../ppc-lfs-linux-gnu/bin/ld:
cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
The missing libs do exist on my system:
bash-4.3$ ls -l $LFS/tools/lib/crt*
-rw-r--r-- 1 lfs users 3084 Sep 20 11:16 /mnt/build_dir/tools/lib/crt1.o
-rw-r--r-- 1 lfs users 2024 Sep 20 11:16 /mnt/build_dir/tools/lib/crti.o
-rw-r--r-- 1 lfs users 1780 Sep 20 11:16 /mnt/build_dir/tools/lib/crtn.o
I have no idea why they are not found by the linker. These are some
of the environment variables (when I am the ‘lfs’ user):
bash-4.3$ echo $LFS
/mnt/build_dir
bash-4.3$ echo $LFS_TGT
ppc-lfs-linux-gnu
I have this line in my /etc/fstab:
/dev/sda3 /mnt/build_dir ext4 defaults 0 2
The /tools directory:
bash-4.3$ ls -l /tools
lrwxrwxrwx 1 root root 20 Sep 18 15:27 /tools -> /mnt/build_dir/tools
It is maybe good to know that I never can run the build in one move.
I get sometimes a segmentation error when building gcc or glibc. It
is not reproducable: when I retry (with make -C $LFS/jhalfs) then it
succeeds or it ends with a segfault in another point of the build
process. It must have to do with the limited system resources (1.972
GB RAM and 3.660 swap space) or a latency problem. I try to avoid
this by disabling as much systemd services as possible and by
extending the stack space.
The error, I am struggling with, appears when I am so lucky to finish
the build of glibc.
pvg
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style