build: removing xcrun from darwin build #21308

pull ivanacostarubio wants to merge 3 commits into bitcoin:master from ivanacostarubio:issue18959 changing 1 files +20 −17
  1. ivanacostarubio commented at 5:55 PM on February 27, 2021: none

    It solves: #18959

    Initial discussion: #18743 (comment)

  2. build: removing xcrun from darwin build 3508ae2c0b
  3. hebasto commented at 6:03 PM on February 27, 2021: member

    Warm welcome as a contributor @ivanacostarubio !

  4. DrahtBot added the label Build system on Feb 27, 2021
  5. MarcoFalke added the label Needs gitian build on Feb 28, 2021
  6. MarcoFalke added the label Needs Guix build on Feb 28, 2021
  7. hebasto commented at 6:56 PM on February 28, 2021: member

    I have no experience in developing with Xcode, and all of the following ideas are just speculations based on Apple's docs.

    If a developer's machine has already installed Xcode, it is not required to take a separate step to install command-line tools, right? Will this PR work correctly in such a case?

    How does this PR change build system behavior in case of multiple versions of Xcode those are installed simultaneously?

  8. hebasto commented at 7:27 PM on February 28, 2021: member

    Tested 3508ae2c0b393d863257ebc17a9ec588828d8506 on macOS Big Sur 11.2.1 (20D74):

    • master:
    % make -C depends print-darwin_CXX 
    darwin_CXX = /Library/Developer/CommandLineTools/usr/bin/clang++ -mmacosx-version-min=10.14 -stdlib=libc++ --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    % make -C depends print-build_darwin_CXX
    build_darwin_CXX = /Library/Developer/CommandLineTools/usr/bin/clang++ --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    
    • this PR:
    % make -C depends print-darwin_CXX 
    clang: error: no input files
    clang: error: no input files
    ...
    % make -C depends print-build_darwin_CXX 
    clang: error: no input files
    clang: error: no input files
    ...
    
  9. removing xcrun from darwin build (correction) 076e76b591
  10. ivanacostarubio commented at 11:44 PM on February 28, 2021: none

    Hello @hebasto.

    Thank you for the the review and the warm welcome. I made the necessary changes and updated the PR.

    $ make -C depends print-darwin_CXX
    darwin_CXX = /Library/Developer/CommandLineTools/usr/bin/clang++ -mmacosx-version-min=10.14 -stdlib=libc++ --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    
    
    $ make -C depends print-build_darwin_CXX
    build_darwin_CXX = /Library/Developer/CommandLineTools/usr/bin/clang++ --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    
    
  11. in depends/builders/darwin.mk:2 in 076e76b591 outdated
       5 | -build_darwin_STRIP:=$(shell strip)
       6 | -build_darwin_OTOOL:=$(shell otool)
       7 | -build_darwin_NM:=$(shell nm)
       8 | -build_darwin_INSTALL_NAME_TOOL:=$(shell install_name_tool)
       9 | +tools=/Library/Developer/CommandLineTools/usr/bin
      10 | +sdk=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
    


    hebasto commented at 7:04 AM on March 1, 2021:

    Hardcoded paths make build scripts fragile.


    ivanacostarubio commented at 1:46 PM on March 1, 2021:

    Yes. I can see why this would make it fragile. This would make the build script fail when somebody install it on another path. I'll do something like:

    tools=$(shell xcode-select --print-path)/usr/bin
    
  12. build: removing xcrun from darwin build (not hardcoded path) 36ca76eaf7
  13. ivanacostarubio commented at 8:05 PM on March 2, 2021: none
  14. ivanacostarubio closed this on Mar 2, 2021

  15. fanquake locked this on Mar 3, 2021
  16. fanquake commented at 12:45 AM on March 3, 2021: member

    In future, there is no need to open a new PR.

  17. MarcoFalke removed the label Needs Guix build on Mar 3, 2021
  18. MarcoFalke removed the label Needs gitian build on Mar 3, 2021
  19. DrahtBot commented at 8:05 AM on March 3, 2021: member

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds

    File commit ad89812c70a9b88be642fceffb970859f6fdcba2<br>(master) commit dbcc42bb253acf23c7a5307473fb8ee2ad89226a<br>(master and this pull)
    *-aarch64-linux-gnu-debug.tar.gz 580b0205e5f6ab95... 6557b0b9c609e929...
    *-aarch64-linux-gnu.tar.gz 03136fb8a2ce5f88... 7e7659790f8b6125...
    *-arm-linux-gnueabihf-debug.tar.gz 053f6f1bcb7c905c... 9d03f9ac74cc138d...
    *-arm-linux-gnueabihf.tar.gz 996df42a3657a608... 774e6c8765872ef1...
    *-osx-unsigned.dmg 50694aa5dbc88eac... 6e8807fbdf7d334b...
    *-osx-unsigned.tar.gz 944075ed83089652... 58efc382064a6719...
    *-osx64.tar.gz b6a084a966bee2f3... e3eaf1a261332c5c...
    *-powerpc64-linux-gnu-debug.tar.gz 7796ea50573078f7... df505710ac44f018...
    *-powerpc64-linux-gnu.tar.gz e00672d7411277b3... b21c1f78e42280c9...
    *-powerpc64le-linux-gnu-debug.tar.gz d8d73f5d2ddf14f4... 552513b39e20dabb...
    *-powerpc64le-linux-gnu.tar.gz 0a9826f7a9526c9d... 85e9f8b83990e672...
    *-riscv64-linux-gnu-debug.tar.gz f4875638f5083b34... 839f8815fc708e77...
    *-riscv64-linux-gnu.tar.gz 67500503434aeb02... 95ab0ad3b2d3728c...
    *-win-unsigned.tar.gz 16c5b021d4b012f7... 926e1a6535175904...
    *-win64-debug.zip 2b448f2e34cc993f... 0d64b729c393d493...
    *-win64-setup-unsigned.exe 6d9b4d8dd77e886a... dedb7b5d9d611404...
    *-win64.zip 9369f87ed5e94646... 986d42e2242dbfa2...
    *-x86_64-linux-gnu-debug.tar.gz e82361425e5cf739... f5b82b32c9b6626b...
    *-x86_64-linux-gnu.tar.gz 17deed2695cc41c5... cb25ea508eda47d0...
    *.tar.gz 36675469b1db5989... 27b8842c77f05a01...
    guix_build.log ae0fc0b2f1615242... 5a74b4bed96f87e4...
    guix_build.log.diff a60c426e247f949e...

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: 2026-05-01 06:14 UTC

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