Bitcoin Forum
November 23, 2019, 01:15:40 AM *
News: The forum is 10 years old today!
   Home   Help Search Login Register More  
Pages: [1]
Author Topic: Has Anyone Run Bitcoin Headless On Mac  (Read 5977 times)
Offline Offline

Activity: 21
Merit: 0

View Profile WWW
December 05, 2010, 05:01:35 PM

The title says it all. If you have successfully run bitcoin headless on Mac OS X please share your experience. Or if you think you know how to pull it off please let us know how to make it happen.

The OS X GUI usually lags behind and even when it's up to date with win/linux it doesn't have the Mac OS feel, and I don't think anyone is interested in making that happen at present. The best option I can see would be to just run it sans GUI.

If someone can figure out how to run it headless on Mac OS X I'll try to figure out how to display the details on the desktop using GeekTool and share it here.
The Bitcoin Forum is turning 10 years old! Join the community in sharing and exploring the notable posts made over the years.
Hero Member
Offline Offline

Posts: 1574471740

View Profile Personal Message (Offline)

Reply with quote  #2

Report to moderator
Offline Offline

Activity: 1540
Merit: 1000

View Profile
December 05, 2010, 05:30:10 PM

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

# Mac OS X makefile for bitcoin
# Laszlo Hanyecz (


 -I"$(DEPSDIR)/include"  -I"$(DEPSDIR)/include/db46"

 -L"$(DEPSDIR)/lib"  -L"$(DEPSDIR)/lib/db46"


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 \


# 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

    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 \

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)

        -rm -f bitcoin bitcoind
        -rm -f obj/*.o
        -rm -f obj/nogui/*.o
        -rm -f cryptopp/obj/*.o
Offline Offline

Activity: 21
Merit: 0

View Profile WWW
December 05, 2010, 06:15:05 PM

Very nice. I'll have to give that a try (or ten). I also posted a solution for those that don't want to try to run headless:
Offline Offline

Activity: 19
Merit: 0

View Profile
February 08, 2013, 09:11:46 PM
Last edit: February 08, 2013, 10:27:23 PM by ikbrunel

Current instructions for compiling a headless version:

edited to add:
configuration checking script and makefile generator. totes useful!
Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!