bitcoin: Unable to cross compile on linux for macos (28.x branch)

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

Running the command make HOST=x86_64-apple-darwin -C depends on Bitcoin Core 28.x no longer compiles the dependencies as expected. It fails.

Expected behaviour

The command make HOST=x86_64-apple-darwin -C depends should successfully compile all required dependencies without errors, as it did in previous versions of Bitcoin Core.

Steps to reproduce

make HOST=x86_64-apple-darwin -C depends -j32

Relevant log output

root@localhost:~/.build/bitcoin-untouched# make HOST=x86_64-apple-darwin -C depends -j32
make: Entering directory '/root/.build/bitcoin-untouched/depends'
Fetching boost_1_81_0.tar.gz from https://archives.boost.io/release/1.81.0/source/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  133M  100  133M    0     0  1221k      0  0:01:52  0:01:52 --:--:-- 1183k
/root/.build/bitcoin-untouched/depends/work/download/boost-1.81.0/boost_1_81_0.tar.gz.temp: OK
Extracting boost...
/root/.build/bitcoin-untouched/depends/sources/boost_1_81_0.tar.gz: OK
Preprocessing boost...
Configuring boost...
Building boost...
Staging boost...
Postprocessing boost...
Caching boost...
Fetching libevent-2.1.12-stable.tar.gz from https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1075k  100 1075k    0     0   389k      0  0:00:02  0:00:02 --:--:--  885k
/root/.build/bitcoin-untouched/depends/work/download/libevent-2.1.12-stable/libevent-2.1.12-stable.tar.gz.temp: OK
Extracting libevent...
/root/.build/bitcoin-untouched/depends/sources/libevent-2.1.12-stable.tar.gz: OK
Preprocessing libevent...
patching file CMakeLists.txt
patching file cmake/AddEventLibrary.cmake
patching file CMakeLists.txt
Configuring libevent...
-- The C compiler identification is Clang 14.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/clang
-- Check for working C compiler: /usr/bin/clang - broken
CMake Error at /usr/share/cmake-3.25/Modules/CMakeTestCCompiler.cmake:70 (message):
  The C compiler

    "/usr/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg

    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_bccc1/fast && gmake[1]: Entering directory '/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg'
    /usr/bin/gmake  -f CMakeFiles/cmTC_bccc1.dir/build.make CMakeFiles/cmTC_bccc1.dir/build
    gmake[2]: Entering directory '/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg'
    Building C object CMakeFiles/cmTC_bccc1.dir/testCCompiler.c.o
    /usr/bin/clang  --target=x86_64-apple-darwin -isysroot/root/.build/bitcoin-untouched/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks --target=x86_64-apple-darwin   -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include  -I/root/.build/bitcoin-untouched/depends/x86_64-apple-darwin/include -D_GNU_SOURCE -D_FORTIFY_SOURCE=3  -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include  -fPIE -MD -MT CMakeFiles/cmTC_bccc1.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_bccc1.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_bccc1.dir/testCCompiler.c.o -c /root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg/testCCompiler.c
    Linking C executable cmTC_bccc1
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_bccc1.dir/link.txt --verbose=1
    /usr/bin/clang  --target=x86_64-apple-darwin -isysroot/root/.build/bitcoin-untouched/depends/SDKs/Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks --target=x86_64-apple-darwin -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include  -I/root/.build/bitcoin-untouched/depends/x86_64-apple-darwin/include -D_GNU_SOURCE -D_FORTIFY_SOURCE=3  -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include -I/usr/local/python-3.12.6/include -I/usr/local/node-v22.9.0/include  -Wl,-headerpad_max_install_names -L/usr/local/python-3.12.6/lib -L/usr/local/node-v22.9.0/lib -L/usr/local/python-3.12.6/lib -L/usr/local/node-v22.9.0/lib  -L/root/.build/bitcoin-untouched/depends/x86_64-apple-darwin/lib  CMakeFiles/cmTC_bccc1.dir/testCCompiler.c.o -o cmTC_bccc1
    clang: warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
    /usr/bin/ld: unrecognised emulation mode: acosx_version_min
    Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386pep i386pe
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    gmake[2]: *** [CMakeFiles/cmTC_bccc1.dir/build.make:100: cmTC_bccc1] Error 1
    gmake[2]: Leaving directory '/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg'
    gmake[1]: *** [Makefile:127: cmTC_bccc1/fast] Error 2
    gmake[1]: Leaving directory '/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeScratch/TryCompile-Y3lnvg'





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:47 (project)


-- Configuring incomplete, errors occurred!
See also "/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeOutput.log".
See also "/root/.build/bitcoin-untouched/depends/work/build/x86_64-apple-darwin/libevent/2.1.12-stable-66fa9a79555/build/CMakeFiles/CMakeError.log".
make: *** [funcs.mk:302: /root/.build/bitcoin-untouched/depends/x86_64-apple-darwin/.libevent_stamp_configured] Error 1
make: Leaving directory '/root/.build/bitcoin-untouched/depends'

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

28.x

Operating system and version

Debian 12.7.0

Machine specifications

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I know now bitcoin 28.x macos builds are broken officially, in 27.x all tools were built in, about 800MB down was taken down.