Ubuntu build fails
Fire69 opened this issue · 9 comments
Hi,
I'm trying to make a headless build for my Ubuntu server.
I installed al dependencies except libexecinfo, can't figure out how to install this.
When I try building, I get this:
fire69@Skinner:~/B3-CoinV2/src$ make -f makefile.unix
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DUSE_UPNP=0 -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/netbase.d -o obj/netbase.o netbase.cpp
netbase.cpp:7:22: error: expected identifier before numeric constant
#define MSG_NOSIGNAL 0
^
netbase.cpp:7:22: error: expected ‘}’ before numeric constant
netbase.cpp:7:22: error: expected unqualified-id before numeric constant
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:482,
from /usr/include/c++/5/string:38,
from netbase.h:9,
from netbase.cpp:10:
/usr/include/x86_64-linux-gnu/sys/socket.h:283:1: error: expected declaration before ‘}’ token
__END_DECLS
^
makefile.unix:179: recipe for target 'obj/netbase.o' failed
make: *** [obj/netbase.o] Error 1
Is this error caused by the missing libexecinfo, or is it something in the code?
Thanks!
the issue is fixed now,
please close this issue if it is working
It got a lot further now but it still stops with an error:
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DUSE_UPNP=0 -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/net.d -o obj/net.o net.cpp
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
compilation terminated.
makefile.unix:179: recipe for target 'obj/net.o' failed
make: *** [obj/net.o] Error 1
please disable upnp
'qmake B3-Coin.pro USE_UPNP=-'
I should do it disabled as default
We're getting there, step by step :-)
Got further again, stopped at this now:
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/wallet.d -o obj/wallet.o wallet.cpp
wallet.cpp: In member function ‘uint64_t CWallet::GetStakeWeight() const’:
wallet.cpp:1576:13: warning: unused variable ‘nCurrentTime’ [-Wunused-variable]
int64_t nCurrentTime = GetTime();
^
wallet.cpp: In member function ‘bool CWallet::CreateCoinStake(const CKeyStore&, unsigned int, int64_t, int64_t, CTransaction&, CKey&)’:
wallet.cpp:1708:21: warning: unused variable ‘nTimeWeight’ [-Wunused-variable]
int64_t nTimeWeight = GetWeight((int64_t)pcoin.first->nTime, (int64_t)txNew.nTime);
^
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/walletdb.d -o obj/walletdb.o walletdb.cpp
Building LevelDB ...
make[1]: Entering directory '/home/fire69/B3-CoinV2/src/leveldb'
/bin/sh: 1: ./build_detect_platform: Permission denied
Makefile:18: build_config.mk: No such file or directory
make[1]: *** No rule to make target 'build_config.mk'. Stop.
make[1]: Leaving directory '/home/fire69/B3-CoinV2/src/leveldb'
g++ -c -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -MMD -MF obj/txdb-leveldb.d -o obj/txdb-leveldb.o txdb-leveldb.cpp
g++ -O2 -pthread -Wall -Wextra -Wno-ignored-qualifiers -Wformat -Wformat-security -Wno-unused-parameter -g -DBOOST_SPIRIT_THREADSAFE -I/home/fire69/B3-CoinV2/src -I/home/fire69/B3-CoinV2/src/obj -DENABLE_WALLET -I/home/fire69/B3-CoinV2/src/leveldb/include -I/home/fire69/B3-CoinV2/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2 -o b3coind obj/alert.o obj/version.o obj/checkpoints.o obj/netbase.o obj/addrman.o obj/crypter.o obj/key.o obj/init.o obj/bitcoind.o obj/keystore.o obj/core.o obj/main.o obj/net.o obj/protocol.o obj/rpcclient.o obj/rpcprotocol.o obj/rpcserver.o obj/rpcmisc.o obj/rpcnet.o obj/rpcblockchain.o obj/rpcrawtransaction.o obj/timedata.o obj/script.o obj/sync.o obj/txmempool.o obj/util.o obj/hash.o obj/noui.o obj/kernel.o obj/pbkdf2.o obj/scrypt.o obj/scrypt-arm.o obj/scrypt-x86.o obj/scrypt-x86_64.o obj/chainparams.o obj/db.o obj/miner.o obj/rpcdump.o obj/rpcmining.o obj/rpcwallet.o obj/wallet.o obj/walletdb.o obj/txdb-leveldb.o -Wl,-z,relro -Wl,-z,now -Wl,-Bdynamic -l boost_system -l boost_filesystem -l boost_program_options -l boost_thread -l db_cxx -l ssl -l crypto -Wl,-Bdynamic -l z -l dl -l pthread /home/fire69/B3-CoinV2/src/leveldb/libleveldb.a /home/fire69/B3-CoinV2/src/leveldb/libmemenv.a
g++: error: /home/fire69/B3-CoinV2/src/leveldb/libleveldb.a: No such file or directory
g++: error: /home/fire69/B3-CoinV2/src/leveldb/libmemenv.a: No such file or directory
makefile.unix:186: recipe for target 'b3coind' failed
make: *** [b3coind] Error 1
try building leveldb separately
cd src/leveldb
make libleveldb.a libmemenv.a
for target of your ubntu
ok, bingo :)
Had to chmod 755 build_detect_platform, got a permission denied otherwise.
Make completed now. Ended up with b3coind now :)
Now I just have to figure out how to move my wallet over from my Windows laptop to my server and run it.
Thanks for the help!