On 01/08/2013 19:40, Makarius wrote:
Is there a way to assimilate libgmp.so into the compiled poly executable in the plain-old static manner? If yes, it might solve the problem described above.
One might be more brutal in making a completely static link, with the C/C++ libraries included, but I was educated in never doing that. (The transition from SunOS 4.x to SunOS 5.x/Solaris was critically depending on the operating system being able to provide fresh shared libraries for old executables.)
I found the following http://stackoverflow.com/questions/4156055/gcc-static-linking-only-some-libr... when this came up on the list before.
Linking with an explicit path to the static library for GMP rather than using -lgmp seems to work. i.e. on Debian 32-bit gcc -o hello hello.o -L/home/david/mypolyml -lpolymain -lpolyml /usr/lib/i386-linux-gnu/libgmp.a -lpthread -lrt -lm -ldl -lstdc++ -lgcc_s -lgcc
This produces a binary that works on a machine that does not have the GMP libraries.
David