[MLton] bootstrap problem

Matthew Fluet fluet@cs.cornell.edu
Tue, 9 Aug 2005 07:38:55 -0400 (EDT)


> When updating my MLton to the current HEAD, I found this:
> 
> It would seem that older MLton versions can't compile the latest HEAD.
> I think this is a desirable property for the release.

This is only a problem if you attempt compile from un-clean sources.  If
your host compiler is not found in ./build/bin/mlton, then compilation
bootstraps using the mlton.cm file, which does not use annotations (and
then does a second compile using mlton.mlb, now that ./build/bin/mlton
exists)

You should find that from clean sources, it compiles without (annotation)  
warnings using the latest release (we're not aiming for bootstrap
capability beyond that).  If that isn't the case, then there are issues.

> There's also a bug in the dependency information for *.grm.* and  
> *.lex.*.
> When I ran a svn update, the ml.grm got updated, but the rule in
> mlton/Makefile lists a whole whack of front-end/ml.lex.sml ... without
> stating what they depend upon. This is only covered in the front-end
> subdirectory. Therefore, mlton tried to build with out of date *.grm.*.

I seem to recall that there is a reason for this, not related to recursive 
make invocations.  Something having to do with not wanting to rely upon 
having mllex and mlyacc pre-installed (though we do rely upon having 
mlton pre-installed).  I'm not adverse to fixing the dependencies (as I've 
run afoul of this as well), but there may be a reason.

> There were also a few warnings:
> gcc -std=gnu99 -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 -fomit- 
> frame-pointer -c -o platform/darwin.o platform/darwin.c
> In file included from platform/darwin.c:5:
> ./platform.h:81:1: warning: "bool" redefined
> In file included from /usr/include/mach-o/dyld.h:35,
>                   from platform/darwin.c:1:
> /usr/lib/gcc/powerpc-apple-darwin8/4.0.0/include/stdbool.h:36:1:  
> warning: this is the location of the previous definition
> platform/darwin.c: In function 'getTextStart':
> platform/darwin.c:30: warning: passing argument 2 of  
> '_dyld_lookup_and_bind' from incompatible pointer type
> platform/darwin.c:30: warning: passing argument 3 of  
> '_dyld_lookup_and_bind' from incompatible pointer type
> platform/darwin.c:31: warning: passing argument 1 of  
> '_dyld_get_image_header_containing_address' makes pointer from  
> integer without a cast
> platform/darwin.c:31: warning: assignment discards qualifiers from  
> pointer target type

You are welcome to submit a patch with the appropriate casts to silence 
the warnings; I don't have a darwin box to test with.