Skip to content

How to compile a static binary bitcoind in Ubuntu #3781

@bitcoinder

Description

@bitcoinder

hi, i complied a bitcoind in Ubuntu Dektop 64bit 12.04.4
./autogen.sh
./configure
make
sudo make install
completed and works well in Ubuntu

i moved this bitcoind into a Centos 64bit 6.5, ran it and some errors came out
./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
./autogen.sh
./configure LDFLAGS=-static
make
sudo make install
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions