depends: Fix cross-compiling on macOS #32215

pull hebasto wants to merge 2 commits into bitcoin:master from hebasto:250403-objcxx changing 1 files +5 −1
  1. hebasto commented at 2:13 pm on April 3, 2025: member

    This PR:

    1. Specifies Objective C/C++ compilers for native_qt package.
    2. Removes the -t option, which is incompatible with mv on macOS.

    Fixes #32208.

  2. hebasto added the label macOS on Apr 3, 2025
  3. hebasto added the label Build system on Apr 3, 2025
  4. DrahtBot commented at 2:13 pm on April 3, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32215.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK janb84, fanquake

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  5. hebasto added this to the milestone 30.0 on Apr 3, 2025
  6. depends: Specify Objective C/C++ compilers for `native_qt` package
    This change fixes cross-compilation from macOS to macOS with another
    architecture.
    690f5da15a
  7. depends: Fix `mv` command compatibility with macOS d0cce4172c
  8. in depends/packages/native_qt.mk:155 in 0ac7f18e5a outdated
    149@@ -148,5 +150,5 @@ endef
    150 
    151 define $(package)_postprocess_cmds
    152   rm -rf doc/ && \
    153-  mv -t .. translations/
    154+  mv translations/ ..
    


    laanwj commented at 2:38 pm on April 3, 2025:
    Had to look this up, but apparently the only thing -t does is to set the target directory explicitly. So mv translations/ .. is equivalent.
  9. hebasto force-pushed on Apr 3, 2025
  10. DrahtBot added the label CI failed on Apr 3, 2025
  11. DrahtBot removed the label CI failed on Apr 4, 2025
  12. janb84 commented at 12:31 pm on April 22, 2025: contributor

    I’m trying to test this PR, but having trouble verifying it. Am I correct to conclude that the fix is really mac only ( not nix-shell on macos? or GUIX cross-compile ? )

    Can confirm that the mv -t option is not supported on MacOS .

  13. hebasto commented at 12:58 pm on April 22, 2025: member

    I’m trying to test this PR, but having trouble verifying it. Am I correct to conclude that the fix is really mac only ( not nix-shell on macos? or GUIX cross-compile ? )

    Can confirm that the mv -t option is not supported on MacOS .

    This PR is specific to cases like #32208.

  14. janb84 commented at 8:49 pm on April 22, 2025: contributor

    I’m trying to test this PR, but having trouble verifying it. Am I correct to conclude that the fix is really mac only ( not nix-shell on macos? or GUIX cross-compile ? ) Can confirm that the mv -t option is not supported on MacOS .

    This PR is specific to cases like #32208.

    Have installed homebrew and have successfully recreated the error as #32208. This commit will resolve the error from #32208 but I do get an different error back, not sure if related to Specifies Objective C/C++ compilers for native_qt package. that’s fixed in this PR (or unrelated)

    WARNING: QDoc will not be compiled, probably because clang’s C and C++ libraries could not be located. This means that you cannot build the Qt documentation. You may need to set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. Other than clang’s libraries, you may need to install another package, such as clang itself, to provide the ClangConfig.cmake file needed to detect your libraries. Once this file is in place, the configure script may be able to detect your system-installed libraries without further environment variables. On macOS, you can use Homebrew’s llvm package. You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check. WARNING: QDoc will not be compiled because the QmlPrivate library wasn’t found. WARNING: Clang-based lupdate parser will not be available. Suitable LLVM and Clang C++ libraries have not been found. You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check. WARNING: Qt Assistant will not be compiled because it requires Qt Network. WARNING: Qt Designer will not be compiled because it requires Qt Network.

    ERROR: detected a std::atomic implementation that fails for function pointers. Please apply the patch corresponding to your Standard Library vendor, found in qtbase/config.tests/atomicfptr

    CMake Error at qtbase/cmake/QtBuildInformation.cmake:208 (message): Check the configuration messages for an error that has occurred. Call Stack (most recent call first): qtbase/cmake/QtBuildInformation.cmake:39 (qt_configure_print_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:84 (qt_print_feature_summary) qtbase/cmake/QtBaseTopLevelHelpers.cmake:72 (qt_internal_print_top_level_info) CMakeLists.txt:113 (qt_internal_top_level_end)

    – Configuring incomplete, errors occurred! CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1077 (message): CMake exited with code 1.

  15. hebasto commented at 9:55 pm on April 22, 2025: member

    @janb84

    … but I do get an different error back

    Please provide more details about your build environment (OS version, architecture, compiler version etc) and exact steps to reproduce the error.

  16. janb84 commented at 8:06 am on April 23, 2025: contributor

    @janb84

    … but I do get an different error back

    Please provide more details about your build environment (OS version, architecture, compiler version etc) and exact steps to reproduce the error.

    Of course, here you go, ill will also try to figure it out also but please let me know if you need any other details.

    Build env: MacOS 15.4.1, M1 QT 6.9.0 GNU Make 4.4.1 Tried both Apple clang version 17.0.0 (clang-1700.0.13.3) & Homebrew clang version 20.1.3 SDK 15.4

    Steps to reproduce:

    • Clean previous builds artefacts
    • execute from bitcoin folder make -C depends -j8 HOST=x86_64-apple-darwin

    EDIT fixed builds now, needed a clean install of xcode. Related to https://github.com/bitcoin/bitcoin/issues/31579

  17. janb84 commented at 9:43 am on April 23, 2025: contributor

    ACK d0cce41

    Recreated issue #32208 on master, confirmed it’s solved after this PR.

  18. fanquake approved
  19. fanquake commented at 8:58 am on April 25, 2025: member
    ACK d0cce4172c041fc9b2910b360fe496b1102b19d2
  20. fanquake merged this on Apr 25, 2025
  21. fanquake closed this on Apr 25, 2025

  22. hebasto deleted the branch on Apr 25, 2025

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: 2025-05-08 15:12 UTC

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