On Thu, 1 Aug 2013, David Matthews wrote:
Switching to static linking by default in SVN has turned up a few problems. In particular it seems that it's important to include the libraries required by libpolyml. The problem is that this can depend on how it was built. In particular, the configure script will use GMP if it is present but falls back to the internal arbitrary precision package if it is not. That has the effect that if GMP was detected during the build process then the linking line must include -lgmp. However, if GMP is not present then including -lgmp will result in an error message.
I usually try to compile with gmp, but there are some snags. What I usually do is to compile on one machine with libgmp, then copy the required libgmp.so files to the polyml target directory, and run on another machine with LD_LIBRARY_PATH changed to that. This works most of the time.
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.)
Makarius