<huge_val.h> and more

John Gerard Malecki johnm@artisan.com
Fri, 26 Mar 1999 09:00:41 -0800 (PST)


I tried compiling mlton-1999-3-19.1 on my system and had to change a
few things

:; uname -a
SunOS odin 5.6 Generic_105181-07 sun4u sparc SUNW,Ultra-2
:; gcc -v
Reading specs from /home/johnm/apps/sun4os5/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.6/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
:; 

Is <huge_val.h> a standard include file?  It's not on my system.  I
changed it to <math.h> to get a definition for the macro HUGE_VAL.

Egcs-2.9.1 complains about some of the magic compiler incantations.
in particular:

cc1: Invalid option `486'
cc1: -malign-loops=2 is not between 4 and 128 or is not a power of two
cc1: -malign-jumps=2 is not between 4 and 128 or is not a power of two
cc1: -malign-functions=2 is not between 4 and 128 or is not a power of two

So i used 4 for all those values and threw away -m486.

I then received the warning

/usr/include/math.h:126: conflicting types for `frexp'

which can be ignored.  One could also remove the declaration from
mlton-lib.h.

After about 15 minutes i get an error about an unknown -nt operator
when compiling the runtime system.  I presume that -nt is tha

:; bin/mlton examples/hello-world.sml
bin/mlton: test: unknown operator -nt

I changed my shell to /usr/bin/ksh to get around this problem.

Next, 

my-lib.c:78: `MININT' undeclared (first use in this function)

I used INT_MIN and included <limits.h> to fix this.

Next i ran into some asm problems and gave up for now.  Maybe i should
read the documentation.  Okay, i just looked at the web page under
requirements and see MLton runs on X86 machines under Linux.

Sorry for bothering you.

PS - Sorry for the terse email.  If it sounds like i really know what
i'm doing it's because i'm in a rush.

PPS - One of the reasons i down-loaded MLton is to study your comment

    The heap and stack are automatically resized.