Page MenuHomePhabricator

build: use Clang 15 for macOS cross-compilation
ClosedPublic

Authored by Fabien on Wed, Nov 27, 14:26.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC0343f257b6f4: build: use Clang 15 for macOS cross-compilation
Summary

Backport of core#28337.

Depends on D17211.

Test Plan

Run the GUIX OSX build

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR28337
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31345
Build 62188: Build Diff
Build 62187: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Wed, Nov 27, 14:26

Tail of the build log:

'include/jemalloc/jemalloc.h' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/include/jemalloc/jemalloc.h'
Missing xsltproc.  doc/jemalloc.html not (re)built.
Missing xsltproc.  doc/jemalloc.3 not (re)built.
'bin/jemalloc.sh' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/bin/jemalloc.sh'
/home/bitcoinabc/.guix-profile/bin/install -c -d /bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/share/doc/jemalloc
/home/bitcoinabc/.guix-profile/bin/install -c -d /bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/share/man/man3
'bin/jeprof' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/bin/jeprof'
'jemalloc.pc' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/lib/pkgconfig/jemalloc.pc'
'doc/jemalloc.html' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/share/doc/jemalloc/jemalloc.html'
'doc/jemalloc.3' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/share/man/man3/jemalloc.3'
'lib/libjemalloc.a' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/lib/libjemalloc.a'
'lib/libjemalloc_pic.a' -> '/bitcoin/depends/work/staging/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b/bitcoin/depends/x86_64-apple-darwin/lib/libjemalloc_pic.a'
make[1]: Leaving directory '/bitcoin/depends/work/build/x86_64-apple-darwin/jemalloc/5.3.0-c67d16e714b'
Postprocessing jemalloc...
Caching jemalloc...
copying packages: native_ds_store native_mac_alias native_cctools native_libtapi native_protobuf boost libevent qt qrencode bdb sqlite miniupnpc libnatpmp protobuf openssl zeromq jemalloc
to: /bitcoin/depends/x86_64-apple-darwin
make: Leaving directory '/bitcoin/depends'
/bitcoin/source_package /bitcoin
-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/bitcoinabc/.guix-profile/bin/clang
-- Check for working C compiler: /home/bitcoinabc/.guix-profile/bin/clang - broken
CMake Error at /gnu/store/7ialc5c3b7if7qpr1gvzg88hinngiy7k-cmake-minimal-3.24.2/share/cmake-3.24/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/home/bitcoinabc/.guix-profile/bin/clang"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /bitcoin/source_package/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/home/bitcoinabc/.guix-profile/bin/ninja cmTC_67a0d && [1/2] Building C object CMakeFiles/cmTC_67a0d.dir/testCCompiler.c.o
    [2/2] Linking C executable cmTC_67a0d
    FAILED: cmTC_67a0d 
    : && /home/bitcoinabc/.guix-profile/bin/clang --target=x86_64-apple-darwin -B/bitcoin/depends/x86_64-apple-darwin/native/bin -mlinker-version=711 -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -B/bitcoin/depends/x86_64-apple-darwin/native/bin -mlinker-version=711 -nostdlibinc -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks  -isysroot /bitcoin/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -mmacosx-version-min=11.0 -Wl,-headerpad_max_install_names  CMakeFiles/cmTC_67a0d.dir/testCCompiler.c.o -o cmTC_67a0d   && :
    clang-15: warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
    clang-15: warning: argument unused during compilation: '-nostdlibinc' [-Wunused-command-line-argument]
    ld: unrecognized option '-dynamic'
    ld: use the --help option for usage information
    clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    
    

  

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


-- Configuring incomplete, errors occurred!
See also "/bitcoin/source_package/CMakeFiles/CMakeOutput.log".
See also "/bitcoin/source_package/CMakeFiles/CMakeError.log".
Build guix-osx failed with exit code 1
Fabien planned changes to this revision.Wed, Nov 27, 14:52

Make cctools available when building the package source, so cmake don't fail miserably

This revision is now accepted and ready to land.Wed, Nov 27, 15:57