$ make -C depends libevent HOST=x86_64-apple-darwin CC=clang CXX=clang++
make: Entering directory '/home/hebasto/git/bitcoin/depends'
Configuring libevent...
-- The C compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/clang-16
-- Check for working C compiler: /usr/bin/clang-16 - broken
CMake Error at /usr/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler
"/usr/bin/clang-16"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_8ee7e/fast
gmake[1]: Entering directory '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
/usr/bin/gmake -f CMakeFiles/cmTC_8ee7e.dir/build.make CMakeFiles/cmTC_8ee7e.dir/build
gmake[2]: Entering directory '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
Building C object CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o
/usr/bin/clang-16 --target=x86_64-apple-darwin -I/home/hebasto/git/bitcoin/depends/x86_64-apple-darwin/include -D_FORTIFY_SOURCE=3 -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -fPIE -MD -MT CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o -c /home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb/testCCompiler.c
Linking C executable cmTC_8ee7e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ee7e.dir/link.txt --verbose=1
/usr/bin/clang-16 --target=x86_64-apple-darwin -I/home/hebasto/git/bitcoin/depends/x86_64-apple-darwin/include -D_FORTIFY_SOURCE=3 -pipe -std=c11 -mmacos-version-min=11.0 -mlinker-version=711 -O2 -Wl,-headerpad_max_install_names -Wl,-platform_version,macos,11.0,14.0 -Wl,-no_adhoc_codesign -fuse-ld=lld -L/home/hebasto/git/bitcoin/depends/x86_64-apple-darwin/lib CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o -o cmTC_8ee7e
ld64.lld: error: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [CMakeFiles/cmTC_8ee7e.dir/build.make:100: cmTC_8ee7e] Error 1
gmake[2]: Leaving directory '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
gmake[1]: *** [Makefile:127: cmTC_8ee7e/fast] Error 2
gmake[1]: Leaving directory '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:47 (project)
-- Configuring incomplete, errors occurred!
make: *** [funcs.mk:302: /home/hebasto/git/bitcoin/depends/x86_64-apple-darwin/.libevent_stamp_configured] Error 1
make: Leaving directory '/home/hebasto/git/bitcoin/depends'
depends: `libevent` build fails when `C{C,XX}` are provided #30439
issue hebasto opened this issue on July 12, 2024-
hebasto commented at 12:51 PM on July 12, 2024: member
- hebasto added the label Build system on Jul 12, 2024
-
fanquake commented at 12:53 PM on July 12, 2024: member
Overriding those variables when cross-compiling for macOS isn't currently supported.
-
fanquake commented at 12:55 PM on July 12, 2024: member
IIRC we also settled on the minimum clang for macOS being 18, so the Clang you're using (16), is likely too old.
-
fanquake commented at 12:56 PM on July 12, 2024: member
Note that this is also not libevent specific. It's just that it happens to be the first thing compiled in depends.
- hebasto closed this on Jul 12, 2024
- bitcoin locked this on Jul 12, 2025
Labels