[MLton-user] Re: experimental x86-darwin packages

John Reppy jhr at cs.uchicago.edu
Mon Oct 30 14:43:48 PST 2006


On Oct 30, 2006, at 2:01 PM, mlton-user-request at mlton.org wrote:

> Message: 3
> Date: Mon, 30 Oct 2006 13:07:45 -0500 (EST)
> From: Matthew Fluet <fluet at cs.cornell.edu>
> Subject: Re: [MLton-user] experimental x86-darwin packages
> To: Joe Hurd <joe.hurd at cl.cam.ac.uk>
> Cc: mlton-user at mlton.org
> Message-ID: <Pine.LNX.4.62.0610301300490.18505 at lion.cs.cornell.edu>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>
>
>> 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.
>

That's right.  In installed gmp from source before Fink was  
supporting the
Intel hardware.  I've reinstalled it and will rebuild mlton.

	- John




More information about the MLton-user mailing list