Compiling macOS environment on Ubuntu 18.04 #21938

issue BlockGardener opened this issue on May 13, 2021
  1. BlockGardener commented at 6:34 AM on May 13, 2021: none

    I have an issue compiling the macOS environment for Bitcoin 0.21 and Bitcoin 0.21.1 on Ubuntu 18.04.

    I installed the following dependencies:

    sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python3-setuptools libtinfo5 sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch

    The following commands where executed to compile the macOS environment:

    wget https://github.com/bitcoin/bitcoin/archive/refs/tags/v0.21.0.tar.gz tar -xzvf v0.21.0.tar.gz cd bitcoin-0.21.0 mkdir -p depends/sdk-sources mkdir -p depends/SDKs curl https://bitcoincore.org/depends-sources/sdks/MacOSX10.14.sdk.tar.gz -o depends/sdk-sources/MacOSX10.14.sdk.tar.gz tar -C depends/SDKs -xf depends/sdk-sources/MacOSX10.14.sdk.tar.gz cd depends make HOST=x86_64-apple-darwin16

    The compiling results in multiple errors regarding "./boost/config/detail/select_stdlib_config.hpp:18:12: fatal error: 'cstddef' file not found", see attached txt file for the complete compiling output.

    Compiling output: output.txt

  2. BlockGardener added the label Bug on May 13, 2021
  3. fdoving commented at 10:03 PM on May 13, 2021: contributor

    You have the wrong SDK.

    Here is the guide to create the correct one: https://github.com/bitcoin/bitcoin/blob/0.21/contrib/macdeploy/README.md

    And if you look at this, there are some hints about the filename and where the depends-system looks for it: https://github.com/bitcoin/bitcoin/blob/0.21/depends/hosts/darwin.mk

  4. fanquake added the label macOS on May 14, 2021
  5. MarcoFalke closed this on May 14, 2021

  6. MarcoFalke removed the label Bug on May 14, 2021
  7. MarcoFalke added the label Questions and Help on May 14, 2021
  8. TylerAnder commented at 12:28 AM on May 26, 2021: none

    You have the wrong SDK.

    Here is the guide to create the correct one: https://github.com/bitcoin/bitcoin/blob/0.21/contrib/macdeploy/README.md

    And if you look at this, there are some hints about the filename and where the depends-system looks for it: https://github.com/bitcoin/bitcoin/blob/0.21/depends/hosts/darwin.mk

    Hi!

    The links you've mentioned requires at a certain step to have a paid membership (around $119 usd valid for 1 year) at apple.com

    Do you know any other way to get that correct version of MacSDK?

    I've tried with MacOSX10.15.sdk and it still does fail, while the hosts file mention the max version is 10.15.6, then the 10.15 should work as well, for what i've thought so.

    Thanks!

  9. sipa commented at 12:31 AM on May 26, 2021: member

    You need an Apple ID, but not a paid membership.

  10. TylerAnder commented at 12:39 AM on May 26, 2021: none

    You need an Apple ID, but not a paid membership.

    Hi

    Maybe they've changed how it works. I've created that account 1 year ago, have the apple ID already. But it wont let me get to the link above if i dont pay for it :(

    I've just created a new account and Apple ID just in case the old one was the issue and the result remains the same, sadly

  11. TylerAnder commented at 2:28 AM on May 26, 2021: none

    I've managed to get several version of Mac SDKs here: https://github.com/phracker/MacOSX-SDKs

    But what to type to start the compilation of the depends on linux cross compile:

    make HOST=x86_64-apple-darwin18 as suggested in the readme or perhaps make HOST=x86_64-apple-darwin20?

    what defines the number at the end of that text, when the version of the SDKs was 10.11, we had to type: make HOST=x86_64-apple-darwin11

    But when the version of the SDKs is for example 11.3, then was would it be?

    I've tried all numbers from 11 to 20 and all failed with the same error mentioned above: fatal error: 'cstddef' file not found"

    All SDKs folder placed at the right place, so that's not the problem

  12. fdoving commented at 9:24 PM on May 26, 2021: contributor

    It is explained here: https://github.com/bitcoin/bitcoin/blob/master/depends/README.md https://github.com/bitcoin/bitcoin/blob/0.21/contrib/macdeploy/README.md And https://github.com/bitcoin/bitcoin/blob/0.21/depends/hosts/darwin.mk

    You need to put the SDK in depends/SDK/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers depends/SDK/MacOSX11.3.sdk or similar, does not work anymore. Paths relative to bitcoin root-directory.

    Try HOST=x86_64-apple-darwin14

    To get the SDK legally from Apple, you need to register and agree to their terms, but you do not have to pay anything.

  13. TylerAnder commented at 3:09 AM on May 29, 2021: none

    i've managed to make it work the other day

    The problems remained on the .xip file which couldnt be available from apple. i kept trying but it was still telling me i had to pay for it.

    Then i dont know why it suddendly stopped and ive finally be able to download it. Had to refresh the page like a thousand times lol I suppose apple had some weird bugs

  14. DrahtBot locked this on Aug 18, 2022

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-04-21 18:14 UTC

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