[MLton] MacOS linking broken?
John Reppy
jhr at cs.uchicago.edu
Thu Dec 7 08:28:13 PST 2006
It appears to be even stranger. I grabbed the generated C and
assembly files from the two compilers and
compiled and linked them by hand. In both cases it works, but when I
use mlton, it doesn't work. The
commands I use by hand are the same as what is produces by the -
verbose flag (except that I'm not using
/tmp for the object files). Is it possible that what is getting
echoed to the terminal is not what is
actually getting executed?
- John
On Dec 7, 2006, at 9:57 AM, Matthew Fluet wrote:
>
>> It appears that linking MLton programs with Mac OS X frameworks is
>> broken in the latest SVN revision (it was working in r4796). When
>> I try to compile a program that compiled before, I get errors like
>> the following:
>>
>> /usr/bin/ld: Undefined symbols:
>> _glBegin
> ...
>
>> Did something change in the compiler that might account for this
>> problem? The actual linking commands look almost identical:
>
> There was a big merge of changes to the runtime (and some
> consequent changes to the implementation of the Basis Library), but
> I wouldn't have expected this to affect linking behavior.
>
>> OLD:
>> gcc -o triangle /tmp/fileeUELQt.o /tmp/filegsk2yH.o \
>> /Users/jhr/Work/hacking/sml3d/glut/glut-glue.o \
>> -L/Users/jhr/Work/mlton/mlton.OLD/build/lib/self -lmlton -
>> L/sw/lib \
>> -lgmp -lgdtoa -lm -framework GLUT -framework OpenGL -
>> framework \
>> Foundation
>>
>> NEW:
>> gcc -o triangle /tmp/fileZ7FdMM.o /tmp/fileL3aAgK.o \
>> /Users/jhr/Work/hacking/sml3d/glut/glut-glue.o \
>> -L/Users/jhr/Work/mlton/mlton/build/lib/self -lmlton -L/
>> sw/lib \
>> -lgdtoa -lm -lgmp \
>> -framework GLUT -framework OpenGL -framework Foundation
>
> I note that if you compile with -keep o and then replicate the gcc
> linking line at your shell, then the linking succeeds; so, it looks
> like the call to gcc is being messed up somehow, probably in the
> way arguments are being passed. I'll investigate.
>
>
More information about the MLton
mailing list