How to actually build bitcoin on Mac OSX 10.9.1

First of all, if you have Macports, do yourself a favor and get rid of it.

Then make sure you have Homebrew installed and all the packages installed by it up to date.

1. Let’s install all the dependencies for Bitcoin hacking.

brew install autoconf automake berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt libtool

2. Make sure you have the right OpenSSL version installed. Type the following on your terminal:

openssl version

you should see “OpenSSL 1.0.1f 6 Jan 2014.”

if you see an older version, do

brew update
brew upgrade

OpenSSL should be upgraded, you may or may not have to issue a “brew link openssl” or even a “brew link --overwrite openssl” if it’s giving you trouble.

3. Now, let’s configure, and make. I strongly suggest you add the boost library path when configuring, otherwise you may get nasty “Undefined symbols for architecture x86_64” compilation errors. During the time I wrote this, homebrew had installed boost 1.55 in my system, and the boost lib path was /usr/local/Cellar/boost/1.55.0/lib so I invoked the following:

./configure --with-boost-libdir=/usr/local/Cellar/boost/1.55.0/lib

After that I just issued a

make

And I was done.

If you want to hack the bitcoin-qt client like me, head to src/qt/, there should be a bitcoin-qt executable there now.

Enjoy

7 thoughts on “How to actually build bitcoin on Mac OSX 10.9.1

  1. I’m stuck on the “Undefined symbols for architecture x86_64” part.
    How do I use the ./configure stuff?

    If I build now by doing: make -f makefile.osx
    I get the Undefined symbols for architecture x86_64 error. Could you help me out :D?

    1. whenever you get undefined symbols for architecture error, it’s usually because some part of the code didn’t compile because of some reason, you might try cleaning (make clean) and rebuilding again to see what the first compilation error is and go after it.

      1. i know this is old but i am getting the same error and it is the only error i am getting, however in the guide above it says ./configure –with-boost-libdir=/usr/local/Cellar/boost/1.55.0/lib to do that to get rid of those errors after installing with homebrew but it does not say how, when i run that command i get ./configure command not found

        1. the build process is a lot easier nowadays with Boost’s b2.
          This is how I build libtorrent for Mac (where BOOST_ROOT is the boost folder):

          $BOOST_ROOT/b2 –user-config=config/macosx-x86_64-config.jam \
          toolset=darwin-x86_64 target-os=darwin location=bin/macosx/x86_64 \
          cxxflags=”-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include”

Leave a Reply

Your email address will not be published. Required fields are marked *