Trouble compiling bitcoind on OSX with homebrew I've read the README on the bitcoin github page which instructs you to install the following libraries using MacPorts - boost db48 dbus openssl.
I have these installed using homebrew which I use instead of MacPorts. They are also the correct versions as homebrew installs, later, incompatible versions.
With these installed I edited the make to point to the libraries homebrew installed namely DEPSDIR=/usr/local and adding  -I&quot;$(DEPSDIR)/Cellar/berkeley-db4/4.8.30/include&quot; to INCLUDEPATHS
However I'm getting this compiler error which is cryptic to me:
https://gist.github.com/ashleyconnor/944f611b969444f06430145972b880cf
Has anybody managed to get this working?
Update: These instructions or similar are included in the bitcoin source as of 19 February 2013. See doc/build-osx.md for details. As such, the below instructions may fall out of date. Alternatively, make it easy on yourself an use WyseNynja's homebrew tap with brew tap wysenynja/bitcoin &amp;&amp; brew install bitcoind.

Building bitcoind on OSX 10.8 with homebrew

I got bitcoind working using these instructions. For reference, I'm on OSX 10.8.2 with homebrew 0.9.3. I've made an assumption throughout that homebrew is installed in /usr/local. I've also assumed that you've installed the Xcode command line utilities and any other packages that are essential to building code. If you build any code regularly, e.g. you have RVM installed to build ruby occasionally, you're probably OK!

Install some necessary libraries from homebrew.

brew install boost miniupnpc openssl


Revert berkeley-db formula to an older version

cd /usr/local
git checkout e6a374d Library/Formula/berkeley-db.rb


You may have to unlink it if you've already installed the latest version.

brew unlink berkeley-db


Install berkeley-db 4.8 now that you've got the right formula in place.

brew install berkeley-db


Checkout from Github.

git clone https://github.com/bitcoin/bitcoin.git


Edit the makefile.osx to change it a bit. Here's a diff that shows what you need to change, or you can just use this as a patch by doing echo '$patch-text' | patch, where $patch-text is the patch text below.

diff --git a/src/makefile.osx b/src/makefile.osx
index 9629545..ffac9a3 100644
--- a/src/makefile.osx
+++ b/src/makefile.osx
@@ -7,17 +7,19 @@
 # Originally by Laszlo Hanyecz (solar@heliacal.net)

 CXX=llvm-g++
-DEPSDIR=/opt/local
+DEPSDIR?=/opt/local

 INCLUDEPATHS= \
  -I"$(CURDIR)" \
  -I"$(CURDIR)"/obj \
  -I"$(DEPSDIR)/include" \
- -I"$(DEPSDIR)/include/db48"
+ -I"$(DEPSDIR)/include/db48" \
+ -I"/usr/local/Cellar/openssl/1.0.1c/include"

 LIBPATHS= \
  -L"$(DEPSDIR)/lib" \
- -L"$(DEPSDIR)/lib/db48"
+ -L"$(DEPSDIR)/lib/db48" \
+ -L"/usr/local/Cellar/openssl/1.0.1c/lib"

 USE_UPNP:=1
 USE_IPV6:=1


Start the build.

cd bitcoin/src
make -f makefile.osx DEPSDIR=/usr/local


It's now available at ./bitcoind. We have to first create the rpc configuration file, though. Run ./bitcoind to get the filename where it should be put, or just try the below text.

echo "rpcuser=bitcoinrpc
rpcpassword=HdAseQSRkirfoNuUSzqzixyL9sM1T6ABfzV1nyNmbuwg" &gt; "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"


When next you run it, it will start downloading the blockchain, but it won't output anything while it's doing this. This process may take several hours.

Mine appears to be working fine, but it's still downloading the blockchain. I'll be able to tell after some testing if it's working normally or not, but I suspect that it is!

Inspirations:


https://github.com/WyseNynja/homebrew-bitcoin/blob/master/bitcoind.rb
What are the steps in building bitcoind on Mac OS X 10.6?
Trouble compiling bitcoind on OSX with homebrew