depends: libevent build fails when C{C,XX} are provided #30439

issue hebasto openend this issue on July 12, 2024
  1. hebasto commented at 12:51 pm on July 12, 2024: member
     0$ make -C depends libevent HOST=x86_64-apple-darwin CC=clang CXX=clang++
     1make: Entering directory '/home/hebasto/git/bitcoin/depends'
     2Configuring libevent...
     3-- The C compiler identification is Clang 16.0.6
     4-- Detecting C compiler ABI info
     5-- Detecting C compiler ABI info - failed
     6-- Check for working C compiler: /usr/bin/clang-16
     7-- Check for working C compiler: /usr/bin/clang-16 - broken
     8CMake Error at /usr/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
     9  The C compiler
    10
    11    "/usr/bin/clang-16"
    12
    13  is not able to compile a simple test program.
    14
    15  It fails with the following output:
    16
    17    Change Dir: '/home/hebasto/git/bitcoin/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-a0bf1cb6f39/build/CMakeFiles/CMakeScratch/TryCompile-Y4dUBb'
    18    
    19    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_8ee7e/fast
    20    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'
    21    /usr/bin/gmake  -f CMakeFiles/cmTC_8ee7e.dir/build.make CMakeFiles/cmTC_8ee7e.dir/build
    22    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'
    23    Building C object CMakeFiles/cmTC_8ee7e.dir/testCCompiler.c.o
    24    /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
    25    Linking C executable cmTC_8ee7e
    26    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8ee7e.dir/link.txt --verbose=1
    27    /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 
    28    ld64.lld: error: library not found for -lSystem
    29    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    30    gmake[2]: *** [CMakeFiles/cmTC_8ee7e.dir/build.make:100: cmTC_8ee7e] Error 1
    31    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'
    32    gmake[1]: *** [Makefile:127: cmTC_8ee7e/fast] Error 2
    33    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'
    34    
    35    
    36
    37  
    38
    39  CMake will not be able to correctly generate this project.
    40Call Stack (most recent call first):
    41  CMakeLists.txt:47 (project)
    42
    43
    44-- Configuring incomplete, errors occurred!
    45make: *** [funcs.mk:302: /home/hebasto/git/bitcoin/depends/x86_64-apple-darwin/.libevent_stamp_configured] Error 1
    46make: Leaving directory '/home/hebasto/git/bitcoin/depends'
    
  2. hebasto added the label Build system on Jul 12, 2024
  3. fanquake commented at 12:53 pm on July 12, 2024: member
    Overriding those variables when cross-compiling for macOS isn’t currently supported.
  4. 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.
  5. 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.
  6. hebasto closed this on Jul 12, 2024


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-08 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me