The polyc script has been developed mainly to simplify the linking of an
exported ML function and in particular to try to capture the libraries
that need to be included. I've been having another look at this because
of an issue that was reported a while back. Up till now the linking
step has included all the libraries that were needed in order to link
libpolyml itself. That was extracted by the configure script. It turns
out that this is right if libpolyml is compiled as a static library but
has a problem if libpolyml is a dynamic library.
Object files exported by PolyML.export make reference to external
symbols from libpolyml but do not directly reference anything else. If
libpolyml is a dynamic library it exports these symbols but all the
other dependencies are satisfied by loading the appropriate libraries
dynamically.
The issue was reported in the Fedora distribution but may also affect
other distributions that package up Poly/ML and have separate packages
for libraries (e.g. libgmp and libffi) and development packages. They
were building libpolyml as a shared library but because polyc included
the dependencies of libpolyml itself polyc was including -lgmp -lffi in
the link step. This meant that it needed the development versions of
these libraries even though they were not actually used.
I've now modified the configure script so that polyc only includes the
dependent libraries if libpolyml has been built with shared libraries
disabled and at the same time changed the default so that it builds a
shared library unless --disable-shared is given. Hopefully this hasn't
broken anything but I'd appreciate any reports of problems.
David
_______________________________________________
polyml mailing list
polyml@inf.ed.ac.uk
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml