[MLton-user] experimental x86-darwin packages
Matthew Fluet
fluet at cs.cornell.edu
Mon Oct 30 10:07:45 PST 2006
> I'm afraid I failed to install this experimental version of MLton on
> my MacBook Pro.
Thanks for the report.
> I downloaded the tar file and unpacked it into a subdirectory of my
> home directory, used fink commander to install gmp, changed the lib
> variable in bin/mlton, but this is what happens when I try running
> mlton:
>
> edoras:~/local/mlton-20061030/usr/local/bin$ ./mlton
> dyld: Library not loaded: /usr/local/lib/libgmp.3.dylib
> Referenced from:
> /Users/joe/local/mlton-20061030/usr/local/lib/mlton/mlton-compile
> Reason: image not found
> Trace/BPT trap
> edoras:~/local/mlton-20061030/usr/local/bin$
>
> How can I tell it the relevant library lives in /sw/lib? It looks like
> this should be done automatically by the new darwinLinkOpts variable
> in mlton, but even if I tell it explicitly with a -link-opts -L/sw/lib
> it produces the same output.
The '-link-opt' and '-target-link-opt' command line options tell mlton how
to invoke gcc when linking the final executable. They don't have any
impact on the loading of libraries when the compiler is invoked.
I suspect what happened is that John's machine doesn't have gmp installed
via fink in /sw/lib, but rather has gmp installed in /usr/local/lib.
There may be some linker magic that one can use to 'relink' against gmp in
/sw/lib. Alternatively, you could add a symlink in /usr/local/lib to the
/sw/lib gmp dynlib.
More information about the MLton-user
mailing list