Opened 6 years ago

Last modified 5 years ago

#15085 closed bug

Bootstraps broken post-gcc8 — at Initial Version

Reported by: kallisti5 Owned by: bonefish
Priority: normal Milestone: R1/beta2
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Bootstrap of all platforms is broken post-gcc8.

Investigation so far:

  • cross-tools build successfully sysroot=.../cross-tools-$(arch)/sysroot
  • cross-tools builds gcc_bootstrap:
    • --with-sysroot=/
    • --with-build-sysroot=/work/generated.x86_64/objects/haiku/x86_64/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-7.3.0_2018_05_01/boot/cross-sysroot/x86_64/
    • (I was trying to build 7.3.0 here, but when using gcc 8.x the same path is used except the version differs)

The issue is the gcc_bootstrap attempts to create a binary and fails due to being unable to locate:

/work/generated.x86_64/cross-tools-x86_64/lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find crti.o: No such file or directory
/work/generated.x86_64/cross-tools-x86_64/lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find start_dyn.o: No such file or directory
/work/generated.x86_64/cross-tools-x86_64/lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find init_term_dyn.o: No such file or directory
/work/generated.x86_64/cross-tools-x86_64/lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find -lroot
/work/generated.x86_64/cross-tools-x86_64/lib/gcc/x86_64-unknown-haiku/8.3.0/../../../../x86_64-unknown-haiku/bin/ld: cannot find crtn.o: No such file or directory

These do exist within the sysroot though:

root@4e0d056f6d26:/work/generated.x86_64/objects/haiku/x86_64/packaging/repositories/HaikuPortsCross-build/sys-devel/gcc_bootstrap/work-7.3.0_2018_05_01/boot/cross-sysroot/x86_64# find . | grep lib
./packages/gcc_bootstrap_syslibs-7.3.0_2018_05_01-1
./packages/gcc_bootstrap_syslibs-7.3.0_2018_05_01-1/.self
./packages/gcc_bootstrap_syslibs_devel-7.3.0_2018_05_01-1
./packages/gcc_bootstrap_syslibs_devel-7.3.0_2018_05_01-1/.self
./boot/system/develop/lib
./boot/system/develop/lib/crti.o
./boot/system/develop/lib/crtn.o
./boot/system/develop/lib/init_term_dyn.o
./boot/system/develop/lib/start_dyn.o
./boot/system/develop/lib/haiku_version_glue.o
./boot/system/develop/lib/libroot.so
./boot/system/develop/headers/glibc
./boot/system/develop/headers/glibc/_G_config.h
./boot/system/develop/headers/glibc/printf.h
./boot/system/develop/headers/posix/libgen.h
./boot/system/develop/headers/posix/libio.h
./boot/system/develop/headers/posix/stdlib.h
./boot/system/develop/headers/bsd/libutil.h
./boot/system/develop/headers/bsd/stdlib.h

In the past, we saw this on RISC-V due to this issue which resulted in similar errors: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89955

However, the STARTFILE_PREFIX_SPEC doesn't seem to be at play here since all architectures see the issue, and only riscv64 redefine it.

As noted above, tried building gcc_bootstrap 7 with the gcc 8 cross-tools... and the same error occurred. This seems to indicate that there is some change within the initial buildtools (gcc8) cross-tools-build causing the issue.

Change History (0)

Note: See TracTickets for help on using tickets.