[MLton-user] experimental release 20051109

Wesley W. Terpstra wesley@terpstra.ca
Tue, 15 Nov 2005 01:02:19 +0100

On Nov 15, 2005, at 12:33 AM, Stephen Weeks wrote:
> Am I doing something wrong?

I've been trying to get it to work on Tiger, but have not been
able to do it, either.

> Of course, everything works with what's currently in the SVN.

Sadly, that I can't say.
I ran into this bug too, but didn't report it.
Anyone who has Tiger has this problem.

>  1. We put tests in main.fun to add -fno-tree-ch if
>     (a) we're using gcc 4.x, and
>     (b) time profiling is on, and
>     (c) the C codegen is being used
>  2. Put an #ifdef in c-chunk.h that uses the extern void definition
>     of DeclareProfileLabel if gcc version is 4.x (assuming someone has
>     verified that that works with gcc 4.x).
> Alternatively, we could change nothing, and simply document the
> -fno-tree-ch solution, since, at least for now, the current definition
> of {Declare,}ProfileLabel works with that (unless I've
> misunderstood).

It doesn't work for me; I've been trying.
The .o compiles, but the link fails:

       gcc -std=gnu99 -c -I/usr/local/lib/mlton/include -O1 \
           -fno-strict-aliasing -fomit-frame-pointer -w -I/sw/include \
           -fno-tree-ch -o /tmp/file9ffQ3w.o /tmp/filehrnJPQ.0.c
    Compile C and Assemble finished in 10.68 + 0.01 (0% GC)
    Link starting
       gcc -std=gnu99 -o ufo /tmp/fileCIjGJj.o /tmp/file5wbjrn.o \
           /tmp/file9ffQ3w.o -L/usr/local/lib/mlton/self -lmlton -L/ 
sw/lib \
           -lgmp -lgdtoa -lm
/usr/bin/ld: Undefined symbols:
/usr/bin/ld: warning weak symbol references not set in output with  
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
/usr/bin/ld: warning weak referenced symbols:
collect2: ld returned 1 exit status