Title: How to compile static version bitcoind? Post by: kzv on October 04, 2016, 07:35:32 PM Hi
i complied a bitcoind in Ubuntu Dektop 64bit Code: ./configure i moved this bitcoind into a Centos 64bit 6.5, ran it and some errors came out Code: ./bitcoind: error while loading shared libraries: libboost_system.so.1.58.0: cannot open shared object file: No such file or directory i think all *.so lib required need to be compiled together with the bitcoind binnary, but how? i tried Code: ./configure --disable-shared and tried Code: ./configure the bitcoind in https://bitcoin.org/bin/bitcoin-core-0.13.0/bitcoin-0.13.0-x86_64-linux-gnu.tar.gz however works well in both Centos and Ubuntu Title: Re: How to compile static version bitcoind? Post by: achow101 on October 04, 2016, 07:53:41 PM You should use the depends system and compile the libs. Then you can build with those and it would work.
Title: Re: How to compile static version bitcoind? Post by: kzv on October 04, 2016, 08:02:24 PM You should use the depends system and compile the libs. Then you can build with those and it would work. This is all my steps: Code: sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils exactly what I need to do more? Title: Re: How to compile static version bitcoind? Post by: achow101 on October 04, 2016, 08:16:25 PM Do exactly this from the Bitcoin source dir.
Code: cd depends The binaries produced should work across platforms. Title: Re: How to compile static version bitcoind? Post by: kzv on October 05, 2016, 02:01:35 PM Do exactly this from the Bitcoin source dir. Code: cd depends The binaries produced should work across platforms. I tried but I got such errors in CentOS Code: ./bitcoind: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./bitcoind) Title: Re: How to compile static version bitcoind? Post by: achow101 on October 05, 2016, 03:48:50 PM Try this configure command instead
Code: ./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" Title: Re: How to compile static version bitcoind? Post by: kzv on October 06, 2016, 07:58:35 AM Try this configure command instead Code: ./configure --prefix=`pwd`/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" I tried. Were such errors Code: ./bitcoind: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./bitcoind) Title: Re: How to compile static version bitcoind? Post by: achow101 on October 06, 2016, 12:30:55 PM Ok.. How about this command?
Code: ./configure --enable-glibc-back-compat --prefix=`pwd`/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" Title: Re: How to compile static version bitcoind? Post by: kzv on October 06, 2016, 01:08:02 PM Ok.. How about this command? Code: ./configure --enable-glibc-back-compat --prefix=`pwd`/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" It works!!! Thank you very much!!! :) |