chaincodelabs / libmultiprocess

C++ library and code generator making it easy to call functions and reference objects in different processes
MIT License
27 stars 20 forks source link

Build fails on Bitcoin Core macOS native CI #117

Open Sjors opened 1 week ago

Sjors commented 1 week ago

When trying to build from source on the macOS 14 native, arm64, no depends, sqlite only, gui machine, it fails:

+ git clone https://github.com/chaincodelabs/libmultiprocess.git
Cloning into 'libmultiprocess'...
+ cd libmultiprocess
+ mkdir build
+ cd build
+ cmake ..
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found ZLIB: /Applications/Xcode_15.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_PTHREAD_GETNAME_NP
-- Performing Test HAVE_PTHREAD_GETNAME_NP - Success
-- Performing Test HAVE_PTHREAD_THREADID_NP
-- Performing Test HAVE_PTHREAD_THREADID_NP - Success
-- Performing Test HAVE_PTHREAD_GETTHREADID_NP
-- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed
-- Configuring done (1.7s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/runner/work/bitcoin/bitcoin/libmultiprocess/build
+ make
make: *** No targets specified and no makefile found.  Stop.
Error: Process completed with exit code 2.

https://github.com/Sjors/bitcoin/actions/runs/11212400343/job/31163333157?pr=65

The approach of building from source rather than using the depends system is probably not a good idea anyway, but I'm surprised it fails.

capnp is installed via Homebrew.

ryanofsky commented 1 week ago

Note: code for triggering this is:

https://github.com/Sjors/bitcoin/commit/ca14e8350b3bc703ac3b08fb98883718d1f382a9#diff-b088baf93122a28210fe5ebdb9d5c3100813aac183b8362095c2c2d05051d70dR95-R105

Based on error "make: *** No targets specified and no makefile found. Stop." it seems like this is happening because cmake is not generating a Makefile, which might be the case because bitcoin CI changes the default cmake backend to ninja instead of make:

https://github.com/bitcoin/bitcoin/blob/62e4516722115c2d5aeb6c197abc73ca7c078b23/ci/test/00_setup_env_mac_native.sh#L13

Probably the easiest way to fix the build failure would be to change cmake command line in ci/test/01_base_install.sh from cmake .. to cmake -G "Unix Makefiles" ..

But another way could be to change make and make install commands there to cmake --build . and cmake --install .

Sjors commented 1 week ago

The latter seems more intuitive, (and I'll try that).