Solution Timeline

All versions (edits) of solutions to Need help editing a so that shared libraries (Boost, etc.) are included in the Ubuntu build appear below in the order they were created. Comments that appear under revisions were those created when that particular revision was current.

To see the revision history of a single solution (with diffs), click on the solution number (ie. "#1") in the upper right corner of a solution revision below.

← Bounty Expand all edits


the principle of so library in their name is that they are "shared objects" and cannot be included in your binary.
Possible things to try are the following :

  • build with "-static" flag, in order to use static library instead of shared if available
  • use a tool to make your shared library static like this one

You don't need to edit the Makefiles. You only need to run
./configure LDFLAGS="-static" instead of ./configure.

After taking a quick look at the makefile, I believe that forcing a static compilation through the configure script would not work.

I tried statifier and it gave me some binaries that would just segfault when run on another machine. One or two of the binaries even segfaulted on the original machine itself. That's likely due to statifier's inability to deal with memory randomization, as stated on the homepage.

There is however this commercial product called Ermine that can do the job. I don't know how much it costs, but there's a free trial version.

Download the .i386 or the .x86_64 binary depending on your architecture. Make it executable with chmod +x. Then run ./ErmineProTrial.<arch> <path to original binary> --output <path to output binary> for all four binaries. For example: ./ErmineProTrial.i386 multichain-2.0-dev/src/multichain-cli --output ~/multichain-cli. The light version may work too.

I tried it on a 32-bit Ubuntu 14.04 virtual machine and I could then successfully run all four of the binaries on a 32-bit Debian virtual machine that did not have the dependencies installed.

Winning solution