Re: SML Compile on 64-bit linux platform

Vesa A Norrman <[email protected]>
Newsgroups gmane.comp.lang.sml.smlnj
Message-ID <[email protected]>
> Hi,
>
> Have been trying to compile 110.0.7 downloaded from
> http://www.smlnj.org/dist/release/110.0.7/index.html

I recommend newer version (110.46) if you can use 2002 basis library.

>
> On an
> Intel Xeon 64-bit architecture running
>
> Linux 2.4.21-15.EL x86_64
> glibc 2.3.2-95.20
> gcc 3.2.3
>
> Here is what I see:
>
> compiling the run-time system
> (make RUNTIME="run.x86-linux" VERSION="v-x86-linux" CC="gcc -ansi"
> CFLAGS="-O2" CPP="gcc -x c -E -P -ansi" TARGET=X86 DEFS="  -DHOST_X86
> -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_LINUX -D_POSIX_SOURCE -D_BSD_SOURCE
> -DVREGS -DCALLEESAVE=3" XOBJS="" XLIBS="" LD_LIBS="" run.x86-linux)
> make[1]: Entering directory
> `/home/rmittal/clustering/sml/src/runtime/objs'
> gcc -ansi -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_LINUX
> -D_POSIX_SOURCE -D_BSD_SOURCE -DVREGS -DCALLEESAVE=3 -I../objs
> -I../include ../mach-dep/unix-fault.c
> In file included from ../mach-dep/unix-fault.c:9:
> ../mach-dep/signal-sysdep.h:353: redefinition of `struct sigcontext'
> ../mach-dep/unix-fault.c: In function `FaultHandler':
> ../mach-dep/unix-fault.c:89: warning: cast to pointer from integer of
> different size
> make[1]: *** [unix-fault.o] Error 1
>
> I saw a similar question posted here
> http://lists.debian.org/debian-qa/2001/08/msg00014.html
> but there wasnt a reply that suggested a solution.
>
> Early on in the compilation, .arch-n-opsys failed to detect the
> archtecture because uname -m reports x86_64 rather than i3/4/5/686.
> Included the following line in that file:
>
> x86_64) ARCH=x86;;

I think SML/NJ only works in 32 bit mode. Can 64 bit Linux system compile 
and run 32 bit programs? In that case you can change what compiler 
and compiler flags are used. To do that you can unpack runtime system 
manually and change definitions in mk.x86-linux.

The runtime system must go to src directory, for example:
gunzip < config.tgz | tar xvf -
mkdir src
cd src
gunzip < ../runtime.tgz | tar xvf -
cd ..
[edit files in runtime system]
./install.sh

Hope this helps.

Vesa


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.