darling
darling copied to clipboard
Darling fails to build on gentoo linux
Build Log What is the build error?
[ 9%] Linking C shared library libhost_priv_xtrace_mig.dylib
Undefined symbols for architecture x86_64:
"___stack_chk_fail", referenced from:
_xtrace_mig_routine_host_get_exception_ports in host_privXtraceMig.c.o
_xtrace_mig_routine_host_swap_exception_ports in host_privXtraceMig.c.o
"___stack_chk_guard", referenced from:
_xtrace_mig_routine_host_get_exception_ports in host_privXtraceMig.c.o
_xtrace_mig_routine_host_swap_exception_ports in host_privXtraceMig.c.o
ld: symbol(s) not found for architecture x86_64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/external/xnu/darling/src/libsystem_kernel/libsyscall/CMakeFiles/host_priv_xtrace_mig.dir/build.make:113: src/external/xnu/darling/src/libsystem_kernel/libsyscall/libhost_priv_xtrace_mig.dylib] Error 1
make[1]: *** [CMakeFiles/Makefile2:17729: src/external/xnu/darling/src/libsystem_kernel/libsyscall/CMakeFiles/host_priv_xtrace_mig.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
System Information What system are you building with?
Software | Version |
---|---|
Clang | 16.0.6 |
CMake | 3.26.5 |
Linux Kernel | 6.5.8 |
Darling | 7b2aa573bdd9b3ce143ef2f0acf54841e51b9895 |
Hello, I got the same problem. @MagicalTux Did you already solve it and can you tell how, please?
I haven't solved it yet but ___stack_chk_fail
means the stack protector code is enabled somewhere but not linked in the end.
Adding -fno-stack-protector
to the flags and rebuilding from a clean env should solve the issue.