[MLton] building mlton on Solaris 10
Matthew Fluet
fluet at cs.cornell.edu
Tue Oct 31 07:02:13 PST 2006
> I compile mlton for and on a Solaris 10 (64-bit) machine so don't
> understand why is it a problem that libgmp.so is 64-bit:
Because mlton is compiled as a 32-bit application on all platforms; this
will change in the future, but for now it is the state of affairs.
You can see in the bin/mlton-script wrapper the flag:
-target-cc-opt sparc '-mcpu=v8 -m32' \
On the other hand, I don't see a corresponding link-opt flag.
At the minimum you should install a 32-bit version of gmp. That alone
seems to have worked on sparc-solaris platforms in the past. You might
also have to add the flag
-target-link-opt sparc '-m32' \
to the bin/mlton-script to get the linker to link against the 32-bit
versions.
> Creating constants file.
> /home/budayg/mltonbuild/mlton-20051202/build/bin/mlton
> -build-constants true >tmp.c
> /home/budayg/mltonbuild/mlton-20051202/build/bin/mlton -output tmp tmp.c
> ld: fatal: file /usr/local/lib/libgmp.so: wrong ELF class: ELFCLASS64
> ld: fatal: File processing errors. No output written to tmp
> collect2: ld returned 1 exit status
> call to system failed with exit status 1:
> gcc -std=gnu99 -o tmp /tmp/fileEZi09z.o
> -L/home/budayg/mltonbuild/mlton-20051202/build/lib/self -lmlton -lgmp
> -lnsl -lsocket -lrt -lgdtoa -lm
> gmake[1]: *** [constants] Error 1
> gmake[1]: Leaving directory `/home/budayg/mltonbuild/mlton-20051202'
> gmake: *** [all-no-docs] Error 2
> -bash-3.00$ uname 0a
> usage: uname [-snrvmapiX]
> uname [-S system_name]
> -bash-3.00$ uname -a
> SunOS ssrv25sd 5.10 Generic_118822-25 sun4u sparc SUNW,Sun-Blade-2500
>
> - Gergely
>
> _______________________________________________
> MLton mailing list
> MLton at mlton.org
> http://mlton.org/mailman/listinfo/mlton
>
More information about the MLton
mailing list