When building from source for Linux - how to handle shared libraries?

+1 vote

Using the instructions provided for at the Github repository (https://github.com/MultiChain/multichain/tree/2.0-dev), the resulting multichaind, multichaind-cold, multichain-ci and multichain-util files do not execute properly when put onto another machine, throwing the following error;

multichain-util: error while loading shared libraries: libboost_system.so.1.58.0: cannot open shared object file: No such file or directory

The apps work fine when executed on the same -build- machine (already has the dependencies installed as per the build instructions).

 

 

 

asked Jan 4, 2018 by ericjarvies
Via Ubuntu, and subsequent to the above mentioned build, I built EXEs for Windows, and those appear to work fine.
The Mac build fails;
checking for boostlib >= 1.20.0... configure: We could not detect the boost libraries (version 1.20 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::System library is available... no
checking whether the Boost::Filesystem library is available... no
checking whether the Boost::Program_Options library is available... no
checking whether the Boost::Thread library is available... no
checking whether the Boost::Chrono library is available... no
checking for working boost reduced exports... no
configure: WARNING: boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.
checking whether the Boost::Unit_Test_Framework library is available... no
checking for dynamic linked boost test... no
configure: error: No working boost sleep implementation found.
Which OS X version are you trying to compile on?
10.13 High Sierra
I originally used Ubuntu 16.04, and today I setup Ubuntu 14.04 for the build process, but the same problem occurs... the shared libraries do not load (are not included in the build).

1 Answer

0 votes
Yes, the documented build process does not include the shared libraries within the executable, so what you build will generally need to run on the build machine. The process we use for building the executable we distribute, which can run on many varieties of Linux, is a lot more complex and not yet documented. But if this is important to you, you should be able to take a look at what Bitcoin Core does, and more-or-less do the same with MultiChain.
answered Jan 7, 2018 by MultiChain
...