Is it possible to build a binary with dependent .so files included so that the binary can be built once and used on machines with the same hardware and OS, without them having the .so files?
For example, I am building curl with nghttp2. I do
Then I ran make. I got the curl binary. When I copy over this binary on to another machine and try to run it, it says
./curl: error while loading shared libraries: libnghttp2.so.14: cannot open shared object file: No such file or directory
I also tried running make as follows:
make SHARED=0 CFLAGS='-static'
I still get that same error.