-
-
Save desnudopenguino/cc6af843b596f5d2151d86d7ea1a534b to your computer and use it in GitHub Desktop.
0. Make sure some dependencies are installed! | |
automake (1.15), autoconf (2.69), git, libtool, berkleydb (installed from source 4.8), boost, protobuf, python > 3.5, gmake, leveldb | |
5.9 guide: https://github.com/bitcoin/bitcoin/blob/master/doc/build-openbsd.md | |
1. Clone the repo | |
git clone https://github.com/bitcoin/bitcoin.git | |
2. Checkout newest stable branch (0.13.0 currently) | |
git checkout v0.13.0 | |
3. run autogen script | |
./autogen.sh | |
Error: Provide an AUTOCONF_VERSION environment variable, please. | |
3.1 export AUTOCONF_VERSION 2.69 | |
.autogen.sh | |
Error: Provide an AUTOMAKE_VERSION environment variable, please. | |
3.2 export AUTOMAKE_VERSION 1.15 | |
.autogen.sh | |
4. configure | |
./configure | |
4.1 set CC & CXX vars | |
CC=egcc CXX=eg++ ./configure | |
4.2 Errors, missing random parts | |
db4 from source, protobuf, qt, | |
5. make it | |
make | |
5.1 make throws as issue with PYTHONPATH | |
use gmake as per OpenBSD 5.9 method | |
5.2 gmake | |
6. gmake check | |
error: "virtual memory exhausted..." | |
6.1 /etc/login.conf - add memory | |
for staff user set datasize=infinity (commented out other datasize lines, > 2GB should work) | |
6.2 gmake check (again) | |
New Error | |
installed leveldb | |
CXX leveldb/db/leveldb_libleveldb_a-builder.o | |
<command-line>:0:12: warning: ISO C99 requires whitespace after the macro name | |
In file included from ./leveldb/port/port.h:14:0, | |
from ./leveldb/db/filename.h:14, | |
from leveldb/db/builder.cc:7: | |
./leveldb/port/port_posix.h:50:36: error: '__BYTE_ORDER' was not declared in this scope | |
#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN) | |
^ | |
./leveldb/port/port_posix.h:81:35: note: in expansion of macro 'PLATFORM_IS_LITTLE_ENDIAN' | |
static const bool kLittleEndian = PLATFORM_IS_LITTLE_ENDIAN; | |
^ | |
./leveldb/port/port_posix.h:50:52: error: '__LITTLE_ENDIAN' was not declared in this scope | |
#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN) | |
^ | |
./leveldb/port/port_posix.h:81:35: note: in expansion of macro 'PLATFORM_IS_LITTLE_ENDIAN' | |
static const bool kLittleEndian = PLATFORM_IS_LITTLE_ENDIAN; | |
^ | |
gmake[2]: *** [Makefile:3983: leveldb/db/leveldb_libleveldb_a-builder.o] Error 1 | |
gmake[2]: Leaving directory '/home/bucky/Workspaces/src/bitcoin/src' | |
gmake[1]: *** [Makefile:8349: check-recursive] Error 1 | |
gmake[1]: Leaving directory '/home/bucky/Workspaces/src/bitcoin/src' | |
gmake: *** [Makefile:677: check-recursive] Error 1 |
Message from OpenBSD 5.9 guide writer:
Hello,
I am working on building Bitcoin on OpenBSD 6.0 and noticed you had written
the doc for 5.9. I am stuck with the error below when runninggmake check
.
I also had to bump the datasize to > 2GB in /etc/login.conf to get gmake to
run without running out of memory.
What branch / tag are you trying to build?
CXX leveldb/db/leveldb_libleveldb_a-builder.o
:0:12: warning: ISO C99 requires whitespace after the macro name
In file included from ./leveldb/port/port.h:14:0,
from ./leveldb/db/filename.h:14,
from leveldb/db/builder.cc:7:
./leveldb/port/port_posix.h:50:36: error: '__BYTE_ORDER' was not declared in this scope
#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
Seems LevelDB platform is confused.
This may be a problem solved with commit 883175f in master (pull #8604)
If you're on 0.13 you couuld try to cherry-pick that one.
Wladimir
Built with no wallet and no gui following 5.9 steps
Will build with wallet and GUI on a fresh (and larger) vm to sync up the full blockchain tomorrow.
Pretty much got the basics done, but now running into stranger issues...