[MLton] Posix.IO bug?

Adam Chlipala adam@hcoop.net
Sun, 22 May 2005 16:53:01 -0400


When I try to build the following source:

val lockFile = "test"
val fd = Posix.FileSys.openf (lockFile, Posix.FileSys.O_WRONLY, 
Posix.FileSys.O.flags [])
val lk = Posix.IO.setlkw (fd, Posix.IO.FLock.flock {ltype = 
Posix.IO.F_WRLCK,
                                                     whence = 
Posix.IO.SEEK_SET,
                                                     start = 0,
                                                     len = 0,
                                                     pid = NONE})

I get this error:

mlton setlk.sml
/tmp/fileQqa1VZ.o(.text+0x1e5f): In function `L_170':
: undefined reference to `Posix_IO_FLock_typ'
/tmp/fileQqa1VZ.o(.text+0x240f): In function `L_126':
: undefined reference to `Posix_IO_FLock_typ'
/tmp/fileQqa1VZ.o(.text+0x306f): In function `L_256':
: undefined reference to `Posix_IO_FLock_typ'
collect2: ld returned 1 exit status
call to system failed with exit status 1:
gcc -o setlk /tmp/fileTN0ntu.o /tmp/fileQqa1VZ.o -L/usr/lib/mlton/self 
-lmlton /usr/lib/libgmp.a -lgdtoa -lm

The version I'm using is:
MLton 20041109 (built Tue Nov 09 23:59:39 2004 on debian30)

Is this an already-known bug?