Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cassiniNMC/335764eef533e33080a5 to your computer and use it in GitHub Desktop.
Save cassiniNMC/335764eef533e33080a5 to your computer and use it in GitHub Desktop.
Notes on building Namecoin-Qt 0.3.80 for OSX
Notes on building/deploying Namecoin-Qt 0.3.80 for OSX from https://github.com/namecoin/namecoin (branch namecoinq-release),
at commit a00c33d, see
https://github.com/namecoin/namecoin/commit/a00c33d7c74a4ab4c27a9f98f722fd4d2e3c8d33
Warning: no guarantees that it still works like this. This is a snapshot from when Homebrew installed its packages on Dec 22, 2014.
Install Homebrew, http://brew.sh/
Install Command Line Developer Tools
xcode-select --install
and select "Command Line Developer Tools".
brew install berkeley-db4 miniupnpc openssl qt
Hint: if the build should run on all types of Intel CPUs then install all packages with --build-bottle (this takes significantly longer). Otherwise this build contains AVX and SSE4 instructions which cause a EXC_BAD_INSTRUCTION (SIGILL) when running on a different CPU, e.g. Xeon, some Core2Duo etc.
Install boost 1.49.0 (do not install 1.5x.x)
(e.g. download directly from http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.bz2,
unzip, then
./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.49.0 --libdir=/usr/local/Cellar/boost/1.49.0/lib
./b2 --layout=tagged (for creating "-mt" file versions (mt = Multi-thread))
and ignore these warnings:
...failed darwin.compile.c++ bin.v2/libs/signals/build/darwin-4.2.1/release/threading-multi/named_slot_map.o...
...skipped <pstage/lib>libboost_signals.dylib for lack of <pbin.v2/libs/signals/build/darwin-4.2.1/release/threading-multi>named_slot_map.o...
)
brew link boost
Check if /usr/local/opt
contains:
boost -> ../Cellar/boost/1.49.0
Check if both directories
/usr/local/Cellar/boost/1.49.0/include/boost/
/usr/local/Cellar/boost/1.49.0/lib/
exist.
brew link --force berkeley-db4
(creates /usr/local/lib/libdb_cxx-4.8.dylib)
mkdir namecoin380 && cd namecoin380
git clone http://github.com/namecoin/namecoin
cd namecoin
git checkout namecoinq-release
Edit src/cryptopp/config.h and add
&& !defined(__clang__)
to line 266. Should then look like this:
#if !defined(CRYPTOPP_DISABLE_ASM) && ((defined(_MSC_VER) && defined(_M_IX86)) || (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))) && !defined(__clang__)
qmake
(ignore warnings)
edit Makefile,
edit line "CXXFLAGS", insert as first parameter: -w (i.e. no warnings)
and: (very important for macdeployqt)
edit line "LIBS", directly after "LIBS = $(SUBLIBS)", insert this: -L/usr/local/Cellar/openssl/1.0.1h/lib (or whatever openssl version Homebrew downloaded. DO NOT compile against openssl 1.0.1k or 1.0.2 !!! see gmaxwell's thread)
Edit the file src/util.cpp,
(because of "src/util.cpp, line 6, error: call to function 'to_internal' ..."), insert
#include <boost/program_options/detail/convert.hpp>
as the third include instruction.
Check lines 22 to 25 in src/net.cpp if there is "miniupnpc/", see pr180 and pr196
make clean
make
macdeployqt Namecoin-Qt.app -verbose=2
That's it.
If the icons need to be changed manually: see http://qt-project.org/doc/qt-4.8/appicon.html , section "Setting the Application Icon on Mac OS X".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment