Author

Topic: How to compile a static binary bitcoind in Ubuntu (Read 1861 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
September 30, 2016, 07:30:58 AM
#5
I have the same issue
Someone knows a solution?
Please don't post in these old topics, make a new one.

Just follow the instructions here: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md to build Bitcoin Core for linux.
kzv
legendary
Activity: 1722
Merit: 1285
OpenTrade - Open Source Cryptocurrency Exchange
I have the same issue
Someone knows a solution?
newbie
Activity: 30
Merit: 0
The size difference is probably, because you did not strip your binary.

To build static try to put 'STATIC=all' at the end of your make line. (without quotes)

Also, did you 'make clean' in between retries?
newbie
Activity: 2
Merit: 0
any one know about it?
newbie
Activity: 2
Merit: 0
hi, i complied a bitcoind in Ubuntu Dektop 64bit 12.04.4
Code:
in Ubuntu

./configure
make
install make
completed and works well in Ubuntu

i moved this bitcoind into a Centos 64bit 6.5, ran it and some errors came out
Code:
./bitcoind: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./bitcoind)
linux-vdso.so.1 =>  (0x00007fffa7dff000)
libboost_system.so.1.46.1 => not found
libboost_filesystem.so.1.46.1 => not found
libboost_program_options.so.1.46.1 => not found
libboost_thread.so.1.46.1 => not found
libdb_cxx-4.8.so => not found
libssl.so.1.0.0 => not found
libcrypto.so.1.0.0 => not found
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fbe9c216000)
libm.so.6 => /lib64/libm.so.6 (0x00007fbe9bf92000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fbe9bd7c000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fbe9bb5e000)
libc.so.6 => /lib64/libc.so.6 (0x00007fbe9b7ca000)
/lib64/ld-linux-x86-64.so.2 (0x0000003dc6000000)

i think all *.so lib required need to be compiled together with the bitcoind binnary, but how? i tried
Code:
in Ubuntu

./configure LDFLAGS=-static
make
sudo install make
completed but still doesn't work in Centos, same error


the bitcoind in https://bitcoin.org/bin/0.8.6/bitcoin-0.8.6-linux.tar.gz however works well in both Centos and Ubuntu
another question, why it has only 6.6MB size? my bicoind has 56MB, i am not good at linux, please help in details
Jump to: