[MLton-user] installation problem on cygwin (missing gmp
functions)
Matthew Fluet
fluet at tti-c.org
Tue Apr 7 11:26:47 PDT 2009
On Mon, 6 Apr 2009, Mark Piffer wrote:
> Hello,
> as a complete beginner to SML and MLTON, I am having problems when installing
> the binary package
> on cygwin. The gc.o module is expecting some gmp functions with a "__imp__"
> prefix where my downloaded
> gmp package builds them without this prefix. Examples are __gmpz_cmp and
> others (but all from the gmpz subtree
> seemingly). Is there a rationale behind this "__imp__" or can I simply rename
> the functions to meet the
> naming convention? I can't make too much sense from the way gmp creates the
> names for these functions, it looks
> like it just renames them per define and there is no variable part in the
> defines, i.e. I don't see a way how
> the functions could ever receive this or any other prefix.
I believe that the "__imp__" prefix comes from the Win32 DLL ABI
conventions. The mlton-20070826-1.x86-cygwin.tgz binary package would
have been built in Aug. 2007 with an up-to-date Cygwin install and the GMP
package installed through Cygwin. From your comments, it sounds like you
may have downloaded and installed GMP from outside the Cygwin installer,
which might account for the difference in the exported GMP interface.
Alternatively, the GMP package installed through Cygwin may have changed
between Aug. 2007 and now.
You might also try a more recent Cygwin binary package from the
Experimental page:
http://mlton.org/Experimental
It looks as though the binary in that package doesn't reference any
"__imp____gmpz_*" symbols. While there were some changes between
mlton-20070826 and r6941 to support finer grained symbol visibility
control with respect to the SML FFI, that shouldn't have affected how the
runtime system library accesses the GMP functions; so, either the builder
of mlton-cygwin.r6941.tar.gz (Wesley Terpstra) also downloaded/installed
GMP from outside the Cygwin installer or the GMP package installed through
Cygwin has changed the ABI between Aug. 2007 and then.
-Matthew
More information about the MLton-user
mailing list