Author

Topic: compiling altcoins: libdb4.8 vs libdb5.1 (Read 931 times)

hero member
Activity: 540
Merit: 501
chickens and cryptos
March 30, 2016, 09:15:33 PM
#8
so what im getting .. some coins like worldcoin for example can be altered and can harmful??  or lacks proper support.. im scared now
hero member
Activity: 540
Merit: 501
chickens and cryptos
hero member
Activity: 540
Merit: 501
chickens and cryptos
March 30, 2016, 09:03:43 PM
#6
well I help also Smiley
newbie
Activity: 10
Merit: 0
March 01, 2016, 03:01:20 PM
#5
ah okay thank you.. i think the Flags are hardcoded in the setup files.. ( Worldcoin: -O2 ), i don't thnik we should change much here..

To make my attempts clearer: Some coins are created via "./autogen.sh", some are created via "./src/make".. this is the choise of the developer, not mine.. i can now install the former ones:

Code:
cd /home/user/libdb
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db4"
mkdir -p $BDB_PREFIX
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

cd /home/user/libdb
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db5"
mkdir -p $BDB_PREFIX
wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'
tar -xzvf db-5.1.29.NC.tar.gz
cd db-5.1.29.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

cd ~
echo 'cd ~
rm litecoin -rR
git clone https://github.com/litecoin-project/litecoin
cd litecoin
git pull
git checkout master
 cd src
mkdir obj
cd ..
./autogen.sh
BDB_PREFIX="/home/user/libdb/db4"
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --with-gui=no
make
cd src
[ -e litecoind ] && (  rm /usr/bin/litecoind; rm /usr/bin/litecoin-cli;cp litecoind /usr/bin; cp litecoin-cli /usr/bin;/usr/bin/litecoin-cli -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Litecoin.sh
chmod 700 Litecoin.sh
nohup ./Litecoin.sh > Litecoin.log &


cd ~
echo 'cd ~
rm dogecoin -rR
git clone https://github.com/dogecoin/dogecoin
cd dogecoin
git pull
git checkout master
 cd src
mkdir obj
cd ..
./autogen.sh
BDB_PREFIX="/home/user/libdb/db5"
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --with-gui=no
make
cd src
[ -e dogecoind  ] && (  rm /usr/bin/dogecoind ; rm /usr/bin/dogecoin-cli;cp dogecoind  /usr/bin; cp dogecoin-cli /usr/bin;/usr/bin/dogecoin-cli -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Dogecoin.sh
chmod 700 Dogecoin.sh
nohup ./Dogecoin.sh > Dogecoin.log &

but coins without autogen are still not working:

Quote
cd ~
echo 'cd ~
rm worldcoin-v0.8 -rR
git clone https://github.com/worldcoinproject/worldcoin-v0.8
cd worldcoin-v0.8
git pull
git checkout master
 cd src
mkdir obj
export BDB_PREFIX="/home/user/libdb/db4"
export BDB_LIB_PATH="${BDB_PREFIX}/lib/"
export BDB_INCLUDE_PATH="${BDB_PREFIX}/inculde/"
make -f makefile.unix -e
[ -e worldcoind ] && (  rm /usr/bin/worldcoind; rm /usr/bin/worldcoind;cp worldcoind /usr/bin; cp worldcoind /usr/bin;/usr/bin/worldcoind -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Worldcoin.sh
chmod 700 Worldcoin.sh
nohup ./Worldcoin.sh > Worldcoin.log &

this leads to:
Quote
In file included from db.cpp:6:0:
db.h:14:20: fatal error: db_cxx.h: No such file or directory
 #include
                    ^
compilation terminated.
make: *** [obj/db.o] Error 1
Thank you so fucking very much.

I've gonna write an cleaner guide for this later and refer you.
sr. member
Activity: 373
Merit: 250
January 14, 2016, 09:08:25 AM
#4
ah okay thank you.. i think the Flags are hardcoded in the setup files.. ( Worldcoin: -O2 ), i don't thnik we should change much here..

To make my attempts clearer: Some coins are created via "./autogen.sh", some are created via "./src/make".. this is the choise of the developer, not mine.. i can now install the former ones:

Code:
cd /home/user/libdb
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db4"
mkdir -p $BDB_PREFIX
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

cd /home/user/libdb
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db5"
mkdir -p $BDB_PREFIX
wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'
tar -xzvf db-5.1.29.NC.tar.gz
cd db-5.1.29.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

cd ~
echo 'cd ~
rm litecoin -rR
git clone https://github.com/litecoin-project/litecoin
cd litecoin
git pull
git checkout master
 cd src
mkdir obj
cd ..
./autogen.sh
BDB_PREFIX="/home/user/libdb/db4"
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --with-gui=no
make
cd src
[ -e litecoind ] && (  rm /usr/bin/litecoind; rm /usr/bin/litecoin-cli;cp litecoind /usr/bin; cp litecoin-cli /usr/bin;/usr/bin/litecoin-cli -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Litecoin.sh
chmod 700 Litecoin.sh
nohup ./Litecoin.sh > Litecoin.log &


cd ~
echo 'cd ~
rm dogecoin -rR
git clone https://github.com/dogecoin/dogecoin
cd dogecoin
git pull
git checkout master
 cd src
mkdir obj
cd ..
./autogen.sh
BDB_PREFIX="/home/user/libdb/db5"
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" --with-gui=no
make
cd src
[ -e dogecoind  ] && (  rm /usr/bin/dogecoind ; rm /usr/bin/dogecoin-cli;cp dogecoind  /usr/bin; cp dogecoin-cli /usr/bin;/usr/bin/dogecoin-cli -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Dogecoin.sh
chmod 700 Dogecoin.sh
nohup ./Dogecoin.sh > Dogecoin.log &

but coins without autogen are still not working:

Quote
cd ~
echo 'cd ~
rm worldcoin-v0.8 -rR
git clone https://github.com/worldcoinproject/worldcoin-v0.8
cd worldcoin-v0.8
git pull
git checkout master
 cd src
mkdir obj
export BDB_PREFIX="/home/user/libdb/db4"
export BDB_LIB_PATH="${BDB_PREFIX}/lib/"
export BDB_INCLUDE_PATH="${BDB_PREFIX}/inculde/"
make -f makefile.unix -e
[ -e worldcoind ] && (  rm /usr/bin/worldcoind; rm /usr/bin/worldcoind;cp worldcoind /usr/bin; cp worldcoind /usr/bin;/usr/bin/worldcoind -rpcuser=*** -rpcpassword=*** stop)
cd ../..
' > Worldcoin.sh
chmod 700 Worldcoin.sh
nohup ./Worldcoin.sh > Worldcoin.log &

this leads to:
Quote
In file included from db.cpp:6:0:
db.h:14:20: fatal error: db_cxx.h: No such file or directory
 #include
                    ^
compilation terminated.
make: *** [obj/db.o] Error 1
hero member
Activity: 540
Merit: 501
chickens and cryptos
January 13, 2016, 12:36:51 AM
#3
and you said

when i install libdb version 5, then many altcoins consume a very high cpu usage.



.... did you use the 0 cflag 2 on ./configure?? level 2 is for all generic cpus and 03 ect ect for newer?? 
have you tried the flags?? just curious and here is a few links..
try these links

https://libdb.wordpress.com/

http://www.linuxquestions.org/questions/slackware-14/is-this-how-you-set-cflags-and-other-make-options-779444/

https://www.google.com/search?num=100&newwindow=1&client=ubuntu&espv=2&q=./configure+cflags+02&spell=1&sa=X&ved=0ahUKEwjViMHBh6bKAhUQxWMKHZxpAEoQBQgaKAA&biw=1024&bih=653




hero member
Activity: 540
Merit: 501
chickens and cryptos
January 13, 2016, 12:10:23 AM
#2
well, i got curious and tried what you got going..   im also new to this and learned alot in the last year..  i got stuck at this point. .... and this is using 5.1


iribm@siribm:~/db-5.1.29.NC$ wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz'
--2016-01-12 20:30:32--  http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz
Resolving download.oracle.com (download.oracle.com)... 96.6.45.99, 23.61.195.115
Connecting to download.oracle.com (download.oracle.com)|96.6.45.99|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32150353 (31M) [application/x-gzip]
Saving to: ‘db-5.1.29.NC.tar.gz’

db-5.1.29.NC.tar.gz 100%[=====================>]  30.66M  2.12MB/s   in 14s   

2016-01-12 20:30:46 (2.24 MB/s) - ‘db-5.1.29.NC.tar.gz’ saved [32150353/32150353

and i sudo .. using xubuntu 15.10
 


siribm@siribm:~/db-5.1.29.NC/build_unix$ sudo make install
Installing DB include files: /include ...
Installing DB library: /lib ...
libtool: install: cp -p libdb-5.1.a /lib/libdb-5.1.a
libtool: install: chmod 644 /lib/libdb-5.1.a
libtool: install: ranlib /lib/libdb-5.1.a
libtool: install: cp -p libdb.a /lib/libdb.a
libtool: install: chmod 644 /lib/libdb.a
libtool: install: ranlib /lib/libdb.a
libtool: install: cp -p libdb_cxx-5.1.a /lib/libdb_cxx-5.1.a
libtool: install: chmod 644 /lib/libdb_cxx-5.1.a
libtool: install: ranlib /lib/libdb_cxx-5.1.a
libtool: install: cp -p libdb_cxx.a /lib/libdb_cxx.a
libtool: install: chmod 644 /lib/libdb_cxx.a
libtool: install: ranlib /lib/libdb_cxx.a
Installing DB utilities: /bin ...
libtool: install: cp -p db_archive /bin/db_archive
libtool: install: cp -p db_checkpoint /bin/db_checkpoint
libtool: install: cp -p db_deadlock /bin/db_deadlock
libtool: install: cp -p db_dump /bin/db_dump
libtool: install: cp -p db_hotbackup /bin/db_hotbackup
libtool: install: cp -p db_load /bin/db_load
libtool: install: cp -p db_log_verify /bin/db_log_verify
libtool: install: cp -p db_printlog /bin/db_printlog
libtool: install: cp -p db_recover /bin/db_recover
libtool: install: cp -p db_replicate /bin/db_replicate
libtool: install: cp -p db_stat /bin/db_stat
libtool: install: cp -p db_upgrade /bin/db_upgrade
libtool: install: cp -p db_verify /bin/db_verify
Installing documentation: /docs ...
siribm@siribm:~/db-5.1.29.NC/build_unix$ cd $BITCOIN_ROOT
siribm@siribm:~$ ./autogen.sh
bash: ./autogen.sh: No such file or directory



hummmm?? no autogen

sr. member
Activity: 373
Merit: 250
January 12, 2016, 12:05:29 PM
#1
can someone help me compiling different altcoins on linux from source? ( ubuntu linux 14 )

i think i have a problem with libdb (Oracle Berkeley DB ) ...
when i install libdb version 5, then many altcoins consume a very high cpu usage..
installing libdb version 4 reduces that.. but then other problems appear.. some coins will not work

additionally, some header files are missing from time to time..
do you have a hint how to get all coins running?
i think i will have to "switch" between 4.8 and 5.1 between specific coins..
how can i see it in the sourcecode of the coin?
problem is that 4.8 is no longer included in the repositories.. so we will also have to compile it..

db4 coins with configure will work like his..
Quote
BITCOIN_ROOT=$(pwd)
BDB_PREFIX="${BITCOIN_ROOT}/db4"
mkdir -p $BDB_PREFIX
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
make install

cd $BITCOIN_ROOT
./autogen.sh
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/"  --with-gui=no
make

most coins need db4 .. i only know dogecoin which uses db5 (replace with http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz )

but i don't really know how to inculde this in a Makefile ..

to make it further complicated, there is also the newsest version libdb5.3
Jump to: