4

The instructions to build bitcoind are vague enough, but I can't work out what to do on OpenBSD. I've installed boost, and the system has berkeley db 4.6, OpenSSL, etc already in the base install of OpenBSD.

# gmake -f makefile.unix                             
Building LevelDB ...
gmake[1]: Entering directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'
g++ -I. -I./include -fno-builtin-memcmp -D_REENTRANT -DOS_OPENBSD -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/root/bitcoin/bitcoin-0.8.3/src -I/root/bitcoin/bitcoin-0.8.3/src/obj -I/usr/local/include/boost -DUSE_UPNP=0 -DUSE_IPV6=1 -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/include -I/root/bitcoin/bitcoin-0.8.3/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c db/builder.cc -o db/builder.o
In file included from ./port/port.h:14,
             from ./db/filename.h:14,
             from db/builder.cc:7:
./port/port_posix.h:80: error: '__BYTE_ORDER' was not declared in this scope
./port/port_posix.h:80: error: '__LITTLE_ENDIAN' was not declared in this scope
gmake[1]: *** [db/builder.o] Error 1
gmake[1]: Leaving directory `/root/bitcoin/bitcoin-0.8.3/src/leveldb'
gmake: *** [leveldb/libleveldb.a] Error 2

Since writing I found I didn't have BDB 4.8 so I got it and compiled it into /usr/local/BerkeleyDB.4.8

I found some build instructions on github: https://github.com/bitcoin/bitcoin/pull/1815

I modified these as follows to suit where I installed BDB...

BOOST_INCLUDE_PATH=/usr/local/include \
BOOST_LIB_PATH=/usr/local/lib \
BDB_INCLUDE_PATH=/usr/local/BerkeleyDB.4.8/include \
BDB_LIB_PATH=/usr/local/BerkeleyDB.4.8/lib \
BOOST_LIB_SUFFIX=-mt \
gmake -f makefile.unix -j8 USE_UPNP= bitcoind test_bitcoin

Now the build fails, it looks boost related. There are hundreds of errors until some final ones...

db.cpp:510: error: 'boost' has not been declared
db.cpp:510: error: expected `;' before 'pathTmp'
db.cpp:511: error: 'pathTmp' was not declared in this scope
db.cpp:527: error: 'pathAddr' was not declared in this scope
db.cpp:527: error: 'RenameOver' cannot be used as a function
db.cpp: In member function 'bool CAddrDB::Read(CAddrMan&)':
db.cpp:536: error: 'pathAddr' was not declared in this scope
gmake: *** [obj/alert.o] Error 1
gmake: *** [obj/db.o] Error 1
gmake: *** [obj/checkpoints.o] Error 1
  • Where did you download the source tarball for this bitcoind? – sendmoreinfo Jul 13 '13 at 6:50
  • It's it 0.8.2 zip from github, it has qt in there as well. You build bitcoind with make -f makefile.unix and I only want bitcoind. Maybe I should be using the master off github? I thought that might be unstable. – John Tate Jul 13 '13 at 16:10
1

Use the bitcoin port from OpenBSD-WIP: https://github.com/jasperla/openbsd-wip/tree/master/net/bitcoin.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.