- Reference repository: https://github.com/riecointeam/riecoin
- Latest release with reference binaries
- This how to will use Bdb 5.3 (for the wallet data), which is incompatible with the version used in the reference build, keep that in mind and do not forget to backup your private keys. You can alternatively find the Gitian documentation to build binaries matching with the reference ones;
- Report any problem here.
Tip: when using make, add "-j numberOfThreads" after make to use more cores if you wish.
In all cases, install the dependencies and needed tools as root:
Code: Select all
# apt install build-essential libboost-all-dev libssl1.0-dev libdb5.3-dev libdb5.3++-dev libevent-dev autotools-dev libtool automake pkg-config bsdmainutils python3 curl git qt5-default qttools5-dev-tools
Compilation on Debian 9 (for Linux)
install these additional dependencies (that must not be installed for cross compiling) as root:
Code: Select all
# apt install libprotobuf-dev protobuf-compiler
Code: Select all
git clone https://github.com/riecointeam/riecoin.git Riecoin
cd Riecoin
Code: Select all
./autogen.sh
./configure --disable-tests --with-incompatible-bdb --with-gui
make
Remove libprotobuf-dev and protobuf-compiler if you installed them before, else you will get a very annoying error much later:
Code: Select all
# apt remove libprotobuf-dev protobuf-compiler
Code: Select all
# apt install g++-mingw-w64-x86-64
Code: Select all
# update-alternatives --config x86_64-w64-mingw32-g++ # Set the default mingw32 g++ compiler option to posix.
Code: Select all
git clone https://github.com/riecointeam/riecoin.git Riecoin
cd Riecoin
Code: Select all
package=bdb
$(package)_version=5.3.28
$(package)_download_path=http://download.oracle.com/berkeley-db
$(package)_file_name=db-$($(package)_version).NC.tar.gz
$(package)_sha256_hash=76a25560d9e52a198d37a31440fd07632b5f1f8f9f2b6d5438f4bc3e7c9013ef
$(package)_build_subdir=build_unix
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags=-std=c++11
endef
define $(package)_preprocess_cmds
sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' src/dbinc/atomic.h && \
sed -i.old 's/atomic_init/atomic_init_db/' src/dbinc/atomic.h src/mp/mp_region.c src/mp/mp_mvcc.c src/mp/mp_fget.c src/mutex/mut_method.c src/mutex/mut_tas.c && \
sed -i.old 's/WinIoCtl.h/winioctl.h/' src/dbinc/win_db.h && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub dist
endef
define $(package)_config_cmds
../dist/$($(package)_autoconf)
endef
define $(package)_build_cmds
$(MAKE) libdb_cxx-5.3.a libdb-5.3.a
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
endef
Compile dependencies:
Code: Select all
cd depends
make HOST=x86_64-w64-mingw32
Code: Select all
cd ..
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/ --disable-tests -with-incompatible-bdb --with-gui
make