[MLton] Building MLton

Ray Racine rracine@adelphia.net
Mon, 04 Jul 2005 08:38:22 -0400


On Mon, 2005-07-04 at 16:03 +1000, John Skaller wrote:
> On Sun, 2005-07-03 at 14:57 -0400, Matthew Fluet wrote:
> > > I note I have these switches:
> > > 
> > > -mtune=opteron -m32
> > > 

That's probably from my small patch to get MLton to compile on myy AMD
64 bit opteron on Fedora Core 3 - 64 bit using gcc version 3.4.x

Concerning your build failure...
================================================
For bytecode:

gcc -std=3Dgnu99 -fomit-frame-pointer -I../runtime -I../include -Wall
-mtune=3Dopteron -m32  -o print-opcodes -I../runtime -L../runtime        \
        print-opcodes.c -lmlton
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux/4.0.0/../../../libc.so when
searching for -lc
/usr/bin/ld: skipping
incompatible /usr/lib/gcc/x86_64-linux/4.0.0/../../../libc.a when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.so when
searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libc.a when searching
for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for
-lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for
-lc
/usr/bin/ld: cannot find -lc

This looks like a bug in my system configuration .. anyone
have any clues?
====================================================

This was way back in January end of last year but as I recall, the
incompatible error is attempting to link a 32 bit library when compiling
64 bit and vica versa or something like that.

I also recall that I initially commented out the byte code build and
then latter did some adjustment in its makefile directly because it was
not "inheriting" the base makefile properties from the rest of the build
system.  

I think you just need to pop into the makefile for the byte code and
adjust some of the build values.

I think you are just a tweak or two away from getting it to go modulo
any gcc 4.0 adjustments.

Ray