[MLton-user] Ubuntu: Mlton failing on empty file

Johan Grönqvist johan.gronqvist@gmail.com
Sat, 14 Jan 2006 12:38:43 +0100


Hello,

I have a fresh installation of Ubuntu 5.10 (breezy bagder). After
installation and full upgrade i have installed only smlnj, mlton
vim-gnome and all their dependencies. Thus my configuration should be
very standard.

Mlton fails to compile the empty file. The messages sent to stderr are
quoted below (both for "-codegen c" and "-codegen native").

Any help is appreciated. I do not know how compilers work, and I know
(almost) nothing about how mlton is structured. I have no idea if mlton
just depends on more packages, or if I can change som configuration in
the environment.

Thanks in advance.

/ johan grönqvist


--------------------------------------------------------------------
Output written to stderr when running "mlton empty.sml"
--------------------------------------------------------------------
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
In file included from /usr/lib/mlton/include/main.h:4,
                 from /usr/lib/mlton/include/x86-main.h:4,
                 from /tmp/filemhd09I.1.c:110:
/usr/lib/mlton/include/platform.h:12:58: error: sys/types.h: No such
file or directory
/usr/lib/mlton/include/platform.h:13:20: error: dirent.h: No such file
or directory
/usr/lib/mlton/include/platform.h:14:19: error: errno.h: No such file or
directory
/usr/lib/mlton/include/platform.h:15:19: error: fcntl.h: No such file or
directory
/usr/lib/mlton/include/platform.h:16:18: error: math.h: No such file or
directory
/usr/lib/mlton/include/platform.h:17:20: error: signal.h: No such file
or directory
/usr/lib/mlton/include/platform.h:20:19: error: stdio.h: No such file or
directory
/usr/lib/mlton/include/platform.h:21:20: error: stdlib.h: No such file
or directory
/usr/lib/mlton/include/platform.h:22:20: error: string.h: No such file
or directory
/usr/lib/mlton/include/platform.h:23:22: error: sys/stat.h: No such file
or directory
/usr/lib/mlton/include/platform.h:24:22: error: sys/time.h: No such file
or directory
/usr/lib/mlton/include/platform.h:25:18: error: time.h: No such file or
directory
/usr/lib/mlton/include/platform.h:26:20: error: unistd.h: No such file
or directory
/usr/lib/mlton/include/platform.h:27:19: error: utime.h: No such file or
directory
In file included from /usr/lib/mlton/include/platform.h:42,
                 from /usr/lib/mlton/include/main.h:4,
                 from /usr/lib/mlton/include/x86-main.h:4,
                 from /tmp/filemhd09I.1.c:110:
/usr/lib/mlton/include/platform/linux.h:2:17: error: grp.h: No such file
or directory
/usr/lib/mlton/include/platform/linux.h:3:19: error: netdb.h: No such
file or directory
/usr/lib/mlton/include/platform/linux.h:4:24: error: netinet/in.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:5:25: error: netinet/tcp.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:6:25: error: netinet/udp.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:7:17: error: pwd.h: No such file
or directory
/usr/lib/mlton/include/platform/linux.h:8:23: error: sys/ioctl.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:9:22: error: sys/mman.h: No such
file or directory
/usr/lib/mlton/include/platform/linux.h:10:22: error: sys/poll.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:11:24: error: sys/ptrace.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:12:26: error: sys/resource.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:13:24: error: sys/socket.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:14:25: error: sys/sysinfo.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:15:23: error: sys/times.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:16:20: error: sys/un.h: No such
file or directory
/usr/lib/mlton/include/platform/linux.h:17:25: error: sys/utsname.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:18:22: error: sys/wait.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:19:20: error: syslog.h: No such
file or directory
/usr/lib/mlton/include/platform/linux.h:20:21: error: termios.h: No such
file or directory
/usr/lib/mlton/include/platform/linux.h:21:22: error: ucontext.h: No
such file or directory
/usr/lib/mlton/include/platform/linux.h:22:20: error: values.h: No such
file or directory
In file included from /usr/lib/mlton/include/platform.h:160,
                 from /usr/lib/mlton/include/main.h:4,
                 from /usr/lib/mlton/include/x86-main.h:4,
                 from /tmp/filemhd09I.1.c:110:
/usr/lib/mlton/include/gc.h:408: error: syntax error before ‘*’ token
/usr/lib/mlton/include/gc.h:456: error: field ‘ru_gc’ has incomplete type
/usr/lib/mlton/include/gc.h:457: error: field ‘ru_gcCopy’ has incomplete
type
/usr/lib/mlton/include/gc.h:458: error: field ‘ru_gcMarkCompact’ has
incomplete type
/usr/lib/mlton/include/gc.h:459: error: field ‘ru_gcMinor’ has
incomplete type
/usr/lib/mlton/include/gc.h:472: error: syntax error before ‘sigset_t’
/usr/lib/mlton/include/gc.h:480: error: syntax error before ‘signalsPending’
/usr/lib/mlton/include/gc.h:518: error: syntax error before ‘}’ token
/usr/lib/mlton/include/gc.h:535: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:540: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:553: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:559: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:565: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:571: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:576: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:581: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:586: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:586: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:592: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:611: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:634: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:641: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h: In function ‘GC_isValidFrontier’:
/usr/lib/mlton/include/gc.h:642: error: ‘s’ undeclared (first use in
this function)
/usr/lib/mlton/include/gc.h:642: error: (Each undeclared identifier is
reported only once
/usr/lib/mlton/include/gc.h:642: error: for each function it appears in.)
/usr/lib/mlton/include/gc.h:642: error: ‘frontier’ undeclared (first use
in this function)
/usr/lib/mlton/include/gc.h: At top level:
/usr/lib/mlton/include/gc.h:645: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h: In function ‘GC_isValidSlot’:
/usr/lib/mlton/include/gc.h:646: error: ‘s’ undeclared (first use in
this function)
/usr/lib/mlton/include/gc.h:647: error: ‘slot’ undeclared (first use in
this function)
/usr/lib/mlton/include/gc.h: At top level:
/usr/lib/mlton/include/gc.h:660: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:662: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:664: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:666: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:668: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:670: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:672: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:674: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:676: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:679: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:685: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:688: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:691: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:696: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:701: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:703: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:705: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:709: error: syntax error before ‘s’
/usr/lib/mlton/include/gc.h:712: error: syntax error before ‘GC_state’
In file included from /usr/lib/mlton/include/main.h:4,
                 from /usr/lib/mlton/include/x86-main.h:4,
                 from /tmp/filemhd09I.1.c:110:
/usr/lib/mlton/include/platform.h:182: error: syntax error before ‘s’
/usr/lib/mlton/include/platform.h:182: error: ‘totalRam’ redeclared as
different kind of symbol
/usr/lib/mlton/include/gc.h:514: error: previous declaration of
‘totalRam’ was here
/usr/lib/mlton/include/platform.h:188: error: syntax error before ‘*’ token
/usr/lib/mlton/include/platform.h:189: error: syntax error before ‘*’ token
/usr/lib/mlton/include/platform.h:190: error: syntax error before ‘FILE’
/usr/lib/mlton/include/platform.h:191: error: syntax error before ‘*’ token
/usr/lib/mlton/include/platform.h:192: error: syntax error before ‘FILE’
/usr/lib/mlton/include/platform.h:207: error: syntax error before ‘mode_t’
In file included from /usr/lib/mlton/include/main.h:4,
                 from /usr/lib/mlton/include/x86-main.h:4,
                 from /tmp/filemhd09I.1.c:110:
/usr/lib/mlton/include/platform.h:422:2: error: #error
MLton_Rlimit_virtualMemorySize not defined
/usr/lib/mlton/include/platform.h:824:2: error: #error
Posix_Signal_numSignals not defined
/tmp/filemhd09I.1.c:150: error: syntax error before ‘*’ token
/tmp/filemhd09I.1.c: In function ‘loadGlobals’:
/tmp/filemhd09I.1.c:151: error: ‘file’ undeclared (first use in this
function)
/tmp/filemhd09I.1.c: At top level:
/tmp/filemhd09I.1.c:165: error: conflicting types for ‘stringInits’
/usr/lib/mlton/include/gc.h:499: error: previous declaration of
‘stringInits’ was here
/tmp/filemhd09I.1.c:232: error: conflicting types for ‘sourceSeqs’
/usr/lib/mlton/include/gc.h:489: error: previous declaration of
‘sourceSeqs’ was here
/tmp/filemhd09I.1.c:236: error: conflicting types for ‘sourceLabels’
/usr/lib/mlton/include/gc.h:481: error: previous declaration of
‘sourceLabels’ was here
/tmp/filemhd09I.1.c:238: error: conflicting types for ‘sourceNames’
/usr/lib/mlton/include/gc.h:484: error: previous declaration of
‘sourceNames’ was here
/tmp/filemhd09I.1.c:240: error: conflicting types for ‘sources’
/usr/lib/mlton/include/gc.h:495: error: previous declaration of
‘sources’ was here
/tmp/filemhd09I.1.c: In function ‘MLton_jumpToSML’:
/tmp/filemhd09I.1.c:258: error: ‘stderr’ undeclared (first use in this
function)
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: memory input 1 is not directly addressable
/tmp/filemhd09I.1.c:258: error: memory input 2 is not directly addressable
/tmp/filemhd09I.1.c:258: error: memory input 1 is not directly addressable
/tmp/filemhd09I.1.c:258: error: memory input 2 is not directly addressable
/tmp/filemhd09I.1.c: In function ‘MLton_callFromC’:
/tmp/filemhd09I.1.c:258: error: syntax error before ‘s’
/tmp/filemhd09I.1.c:258: error: ‘stderr’ undeclared (first use in this
function)
/tmp/filemhd09I.1.c:258: error: ‘s’ undeclared (first use in this function)
/tmp/filemhd09I.1.c: In function ‘main’:
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
/tmp/filemhd09I.1.c:258: error: invalid use of undefined type ‘struct
GC_state’
call to system failed with exit status 1:
gcc -c -I/usr/lib/mlton/include -O1 -fno-strict-aliasing
-fomit-frame-pointer -w -fno-strength-reduce -fschedule-insns
-fschedule-insns2 -malign-functions=5 -malign-jumps=2 -malign-loops=2
-mcpu=pentiumpro -o /tmp/fileC7KmE9.o /tmp/filemhd09I.1.c
---------------------------------------------------------------------
End of output when running mlton empty.sml
---------------------------------------------------------------------
Output when running "mlton -codegen c empty.sml"
---------------------------------------------------------------------
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
In file included from /tmp/fileYqowfm.1.c:110:
/usr/lib/mlton/include/c-chunk.h:4:19: error: stdio.h: No such file or
directory
In file included from /tmp/fileYqowfm.1.c:110:
/usr/lib/mlton/include/c-chunk.h: In function ‘Word8_equal’:
/usr/lib/mlton/include/c-chunk.h:383: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h:383: error: (Each undeclared identifier
is reported only once
/usr/lib/mlton/include/c-chunk.h:383: error: for each function it
appears in.)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordS8_lt’:
/usr/lib/mlton/include/c-chunk.h:383: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordU8_lt’:
/usr/lib/mlton/include/c-chunk.h:383: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘Word16_equal’:
/usr/lib/mlton/include/c-chunk.h:384: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordS16_lt’:
/usr/lib/mlton/include/c-chunk.h:384: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordU16_lt’:
/usr/lib/mlton/include/c-chunk.h:384: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘Word32_equal’:
/usr/lib/mlton/include/c-chunk.h:385: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordS32_lt’:
/usr/lib/mlton/include/c-chunk.h:385: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordU32_lt’:
/usr/lib/mlton/include/c-chunk.h:385: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘Word64_equal’:
/usr/lib/mlton/include/c-chunk.h:386: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordS64_lt’:
/usr/lib/mlton/include/c-chunk.h:386: error: ‘stderr’ undeclared (first
use in this function)
/usr/lib/mlton/include/c-chunk.h: In function ‘WordU64_lt’:
/usr/lib/mlton/include/c-chunk.h:386: error: ‘stderr’ undeclared (first
use in this function)
/tmp/fileYqowfm.1.c: In function ‘Chunk0’:
/tmp/fileYqowfm.1.c:165: error: ‘stderr’ undeclared (first use in this
function)
call to system failed with exit status 1:
gcc -c -I/usr/lib/mlton/include -O1 -fno-strict-aliasing
-fomit-frame-pointer -w -fno-strength-reduce -fschedule-insns
-fschedule-insns2 -malign-functions=5 -malign-jumps=2 -malign-loops=2
-mcpu=pentiumpro -o /tmp/filehd0wfo.o /tmp/fileYqowfm.1.c
------------------------------------------------------------------------
End.