compile Mac version in Linux? #11189

issue eMosbat opened this issue on August 29, 2017
  1. eMosbat commented at 10:30 AM on August 29, 2017: none

    Is it possible to cross-compile for Mac in linux? and if yes, How?

  2. fanquake added the label Questions and Help on Aug 29, 2017
  3. MarcoFalke commented at 8:07 AM on August 30, 2017: member

    I'd assume the easiest would be to run the gitian script for deterministic cross platform builds.

  4. eMosbat commented at 6:23 PM on August 30, 2017: none

    I dont want to use gitian

  5. jonasschnelli commented at 4:40 PM on September 3, 2017: contributor

    It also works without gitian. Just – on Linux – compile the depends/ for OSX (make -C depends HOST=x86_64-apple-darwin11). Also make sure you have SDKs/MacOSX10.11.sdk installed (https://github.com/bitcoin/bitcoin/blob/master/doc/README_osx.md).

    Then compile with the prefix set to you depends compiler directory (./configure --prefix=pwd/depends/x86_64-apple-darwin11).

  6. MarcoFalke closed this on Sep 5, 2017

  7. eMosbat commented at 3:30 PM on July 26, 2018: none

    what about older version of bitcoin that doesnt have depends?

  8. MarcoFalke commented at 3:42 PM on July 26, 2018: member

    @eMosbat Those are EOL for a long time: https://bitcoincore.org/en/lifecycle/

  9. ghost commented at 7:28 AM on August 26, 2019: none

    sudo apt-get update

    sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

    sudo apt-get install libboost-all-dev

    sudo apt-get install software-properties-common

    sudo add-apt-repository ppa:bitcoin/bitcoin

    sudo apt-get update

    sudo apt-get install libdb4.8-dev libdb4.8++-dev

    sudo apt-get install libminiupnpc-dev

    sudo apt-get install libzmq3-dev

    sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

    sudo apt-get install libqrencode-dev

    sudo apt install python-pip

    pip install setuptools

    sudo apt install cmake

    sudo apt install libcap-dev

    sudo apt install libbz2-dev

    make -C depends HOST=x86_64-apple-darwin11 -j8 ( the number 8 is in fact the number of cpus you have )

    ./autogen.sh

    ./configure --prefix=$PWD/depends/x86_64-apple-darwin11 --disable-tests --disable-bench --disable-gui-tests

    make -j8

  10. TylerAnder commented at 10:50 PM on September 25, 2020: none

    sudo apt-get update

    sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

    sudo apt-get install libboost-all-dev

    sudo apt-get install software-properties-common

    sudo add-apt-repository ppa:bitcoin/bitcoin

    sudo apt-get update

    sudo apt-get install libdb4.8-dev libdb4.8++-dev

    sudo apt-get install libminiupnpc-dev

    sudo apt-get install libzmq3-dev

    sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler

    sudo apt-get install libqrencode-dev

    sudo apt install python-pip

    pip install setuptools

    sudo apt install cmake

    sudo apt install libcap-dev

    sudo apt install libbz2-dev

    make -C depends HOST=x86_64-apple-darwin11 -j8 ( the number 8 is in fact the number of cpus you have )

    ./autogen.sh

    ./configure --prefix=$PWD/depends/x86_64-apple-darwin11 --disable-tests --disable-bench --disable-gui-tests

    make -j8

    HAving error:

    fatal error: 'unistd.h' file not found

    at make -C depends HOST=x86_64-apple-darwin11 -j8

  11. BlockMechanic commented at 1:41 AM on December 29, 2020: contributor

    Did you include the SDK ?

  12. MarcoFalke locked this on Feb 15, 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-17 06:15 UTC

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