Well, I never ran the binaries headless, but I did run it many times by compiling myself. I don't remember the exact steps in fixing dependencies, but using macports it wasn't hard at all, but I did have to muck around the makefile to get the paths correct.
The following is for r156, but should work pretty much unchanged for current svn head, I think. Just make sure paths are correct for you, and you are using 64bit OSX. If you're on 32bit, change the x86_64 to i386 (untested). Also, build with
make -f makefile.osx bitcoind
, if you don't specify the target it will try to build bitcoin which is the GUI version.
# Copyright (c) 2009-2010 Satoshi Nakamoto
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
# Mac OS X makefile for bitcoin
# Laszlo Hanyecz (
[email protected])
CXX=llvm-g++
DEPSDIR=/opt/local
INCLUDEPATHS= \
-I"$(DEPSDIR)/include" -I"$(DEPSDIR)/include/db46"
LIBPATHS= \
-L"$(DEPSDIR)/lib" -L"$(DEPSDIR)/lib/db46"
WXLIBS=
LIBS= -dead_strip \
$(DEPSDIR)/lib/db46/libdb_cxx-4.6.a \
$(DEPSDIR)/lib/libboost_system-mt.a \
$(DEPSDIR)/lib/libboost_filesystem-mt.a \
$(DEPSDIR)/lib/libboost_program_options-mt.a \
$(DEPSDIR)/lib/libboost_thread-mt.a \
$(DEPSDIR)/lib/libboost_regex-mt.a \
$(DEPSDIR)/lib/libssl.a \
$(DEPSDIR)/lib/libcrypto.a
DEFS=-D__WXMAC_OSX__ -DNOPCH -DMSG_NOSIGNAL=0 -DFOURWAYSSE2
DEBUGFLAGS=-g -DwxDEBUG_LEVEL=0 $(DF)
# ppc doesn't work because we don't support big-endian
CFLAGS=-mmacosx-version-min=10.5 -arch x86_64 -O3 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
script.h db.h net.h irc.h main.h rpc.h uibase.h ui.h noui.h init.h
OBJS= \
obj/util.o \
obj/script.o \ obj/db.o \ obj/net.o \
obj/irc.o \
obj/main.o \
obj/rpc.o \
obj/init.o \
cryptopp/obj/sha.o \
obj/sha256.o \
cryptopp/obj/cpu.o
all: bitcoin
obj/%.o: %.cpp $(HEADERS)
$(CXX) -c $(CFLAGS) -DGUI -o $@ $<
cryptopp/obj/%.o: cryptopp/%.cpp
$(CXX) -c $(CFLAGS) -O3 -DCRYPTOPP_DISABLE_ASM -o $@ $<
bitcoin: $(OBJS) obj/ui.o obj/uibase.o
$(CXX) $(shell $(DEPSDIR)/bin/wx-config --cxxflags) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(shell $(DEPSDIR)/bin/wx-config --libs --static) $(LIBS)
obj/nogui/%.o: %.cpp $(HEADERS)
$(CXX) -c $(CFLAGS) -o $@ $<
bitcoind: $(OBJS:obj/%=obj/nogui/%)
$(CXX) $(CFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
clean:
-rm -f bitcoin bitcoind
-rm -f obj/*.o
-rm -f obj/nogui/*.o
-rm -f cryptopp/obj/*.o