serenity: Toolchain: cannot find crt0_shared.o
I was wanting to test the gcc port so thought it best to rebuild the toolchain.
The toolchain built OK but when trying to build Serenity now:
[ 22%] Building ASM object Libraries/LibC/CMakeFiles/LibC.dir/__/LibELF/Arch/i386/plt_trampoline.S.o
[ 22%] Linking CXX shared library libc.so
/home/dan/src/serenity/Toolchain/Local/lib/gcc/i686-pc-serenity/10.2.0/../../../../i686-pc-serenity/bin/ld: cannot find crt0_shared.o: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Libraries/LibC/CMakeFiles/LibC.dir/build.make:1179: Libraries/LibC/libc.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:5037: Libraries/LibC/CMakeFiles/LibC.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 18 (11 by maintainers)
Commits related to this issue
- LibC: Make sure crt0 and crt0_shared are built before LibC We need these two object files in order for ld to work. Fixes #4538. — committed to gunnarbeutner/serenity by gunnarbeutner 3 years ago
I’ve hit this issue building with Make. With Ninja, it worked just fine.
The Toolchain build only drops crt0.o into Build/Root/usr/lib. Ninja seems to build crt0_shared.o before trying to link any shared libs , while Make does not.