[MLton] bootstrap problem

Wesley W. Terpstra wesley@terpstra.ca
Tue, 9 Aug 2005 12:04:40 +0200


--Apple-Mail-2--754207156
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	delsp=yes;
	format=flowed

When updating my MLton to the current HEAD, I found this:

...
/Users/terpstra/src/mlton/bin/upgrade-basis "/Users/terpstra/src/ 
mlton/build/bin:/Users/terpstra/src/mlton/build/bin:/Users/terpstra/ 
src/mlton/build/bin:/Users/terpstra/src/mlton/bin:/Users/terpstra/src/ 
mlton/build/bin:/Users/terpstra/src/mlton/bin:/sw/bin:/sw/sbin:/bin:/ 
sbin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin" >upgrade- 
basis.sml
Compiling mlton (takes a while)
mlton @MLton ram-slop 0.7 gc-summary  -- -default-ann  
'sequenceNonUnit warn' -target self -verbose 2 -output mlton-compile   
mlton.mlb
invalid -default-ann flag: sequenceNonUnit warn
usage: mlton [option ...] file.{c|cm|mlb|o|sml} [file.{c|o|s|S} ...]
     -align {4|8}                   object alignment
...

It would seem that older MLton versions can't compile the latest HEAD.
I think this is a desirable property for the release.

Interestingly, I only get warnings from the mlb:
...
          parseAndElaborate starting
Warning: ../lib/mlton/basic/sources.mlb 3.30.
   Unrecognized annotation: redundantMatch warn.
Warning: ../lib/mlton/basic/sources.mlb 3.4.
   Unrecognized annotation: nonexhaustiveMatch warn.
Warning: ../lib/mlton/basic/sources.mlb 2.4.
...

I think it would be best if the command-line option were removed.

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.*.

More generally, this problem stems from recursively invoking make.
I'm sure everyone has heard the rants about not abusing make in this
way, and I imagine the current scheme is in place to avoid requiring
GNU make, so I won't say anything more on this.

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

However, this seem ok.


--Apple-Mail-2--754207156
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="patch.diff"
Content-Disposition: attachment;
	filename=patch.diff

Index: mlton/Makefile
===================================================================
--- mlton/Makefile	(revision 3959)
+++ mlton/Makefile	(working copy)
@@ -13,7 +13,7 @@
 ifeq (self, $(shell if [ -x $(BIN)/mlton ]; then echo self; fi))
   # We're compiling MLton with itself, so don't use any stubs.
   FILE = mlton.mlb
-  FLAGS += -default-ann 'sequenceNonUnit warn'
+#  FLAGS += -default-ann 'sequenceNonUnit warn'
 else
 ifeq (cygwin, $(shell $(SRC)/bin/host-os))
   # The stubs don't work on Cygwin, since they define spawn in terms of

--Apple-Mail-2--754207156--