[MLton-devel] pre-release

Matthew Fluet Matthew Fluet <fluet@CS.Cornell.EDU>
Mon, 26 Aug 2002 12:24:26 -0400 (EDT)


> > The only remaining problem that I am aware of is the one that Matthew
> > is having in going between Red Hat 7.3 and 7.1 machines.  Matthew,
> > have you made any progress there?  
> 
> No, but I haven't really tried anything.  I'll see what I can find out.

Here's what I've figured out.  I'm fairly certain that it's something to
do with the compliation of the runtime.  Two machines CFS05 is a 
RedHat 7.1 machine and CFS38 is a RedHat 7.3 machine.  Relevant(?)
information below:

[fluet@cfs05 mlton 16]% cat /proc/version 
Linux version 2.4.9-31smp (bhcompile@daffy.perf.redhat.com) 
(gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)) 
#1 SMP Tue Feb 26 06:55:00 EST 2002
[fluet@cfs05 mlton 17]% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
[fluet@cfs05 mlton 24]% as -V
GNU assembler version 2.11.90.0.8 (i386-redhat-linux) using BFD version
2.11.90.0.8
[fluet@cfs05 mlton 25]% ld -V
GNU ld version 2.11.90.0.8 (with BFD 2.11.90.0.8)
  Supported emulations:
   elf_i386
   i386linux
   elf_i386_glibc21
[fluet@cfs05 mlton 26]% ar -V
GNU ar 2.11.90.0.8
Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
[fluet@cfs05 mlton 27]% /lib/libc.so.6
GNU C Library stable release version 2.2.4, by Roland McGrath et al.
Copyright (C) 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 2.96 20000731 (Red Hat Linux 7.2 2.96-108.1).
Compiled on a Linux 2.4.9-31smp system on 2002-04-02.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        The C stubs add-on version 2.1.2.
        linuxthreads-0.9 by Xavier Leroy
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton 
        libthread_db work sponsored by Alpha Processor Inc
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
[fluet@cfs05 mlton 28]% 

[fluet@cfs38 mlton 15]% cat /proc/version
Linux version 2.4.18-5smp (bhcompile@daffy.perf.redhat.com) 
(gcc version 2.96 20 000731 (Red Hat Linux 7.3 2.96-110)) 
#1 SMP Mon Jun 10 15:19:40 EDT 2002
[fluet@cfs38 mlton 16]% gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
[fluet@cfs38 mlton 17]% as -V
GNU assembler version 2.11.93.0.2 (i386-redhat-linux) using BFD version
2.11.93.0.2 20020207
[fluet@cfs38 mlton 18]% ld -V
GNU ld version 2.11.93.0.2 20020207
  Supported emulations:
   elf_i386
   i386linux
   elf_i386_glibc21
[fluet@cfs38 mlton 19]% ar -V
GNU ar 2.11.93.0.2 20020207
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
[fluet@cfs38 mlton 20]% /lib/libc.so.6
GNU C Library stable release version 2.2.5, by Roland McGrath et al.
Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 2.96 20000731 (Red Hat Linux 7.3 2.96-110).
Compiled on a Linux 2.4.9-9 system on 2002-06-18.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        The C stubs add-on version 2.1.2.
        linuxthreads-0.9 by Xavier Leroy
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton 
        libthread_db work sponsored by Alpha Processor Inc
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
[fluet@cfs38 mlton 21]% 

My working directories are NFS mounted on both machines.

Here's the test program:
[fluet@cfs05 temp 32]% cat z.sml
val _ = 
(print "name: ";
 print (CommandLine.name ());
 print "\n";
 print "args:";
 List.app (fn s => (print " "; print s)) (CommandLine.arguments ());
 print "\n")

Make the runtime on CFS05:
[fluet@cfs05 mlton 28]% rm build/lib/self/*.a ; make -C runtime clean ; make runtime

Run the test on CFS05:
[fluet@cfs05 temp 33]% mlton -debug false z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3
[fluet@cfs05 temp 34]% mlton -debug true z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3

Run the test on CFS38:
[fluet@cfs38 temp 9]% mlton -debug false z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3
[fluet@cfs38 temp 10]% mlton -debug true z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3


So far so good.  Make the runtime on CFS38:
[fluet@cfs38 mlton 21]% rm build/lib/self/*.a ; make -C runtime clean ; make runtime

Run the test on CFS38:
[fluet@cfs38 temp 11]% mlton -debug false z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3
[fluet@cfs38 temp 12]% mlton -debug true z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3

Run the test on CFS05:
[fluet@cfs05 temp 39]% mlton -debug false z.sml ; ./z @MLton -- 1 2 3
Segmentation fault
[fluet@cfs05 temp 40]% mlton -debug true z.sml ; ./z @MLton -- 1 2 3
GC_init::argc = 6
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3

Hmm.  I wasn't getting a segfault before.  Putting in a couple more
printfs in GC_init, I get this:

[fluet@cfs05 temp 41]% mlton -debug false z.sml ; ./z @MLton -- 1 2 3
 1
it::@MLton
 1
ton_init::start = 1
name: ./z
args: @MLton -- 1 2 3
[fluet@cfs05 temp 42]% mlton -debug true z.sml ; ./z @MLton -- 1 2 3
GC_init::i = 1
GC_init::argc = 6
GC_init::@MLton
GC_init::i = 3
MLton_init::start = 3
name: ./z
args: 1 2 3

So, the debugging version looks o.k.  But something screwy is going on
with the non-debugging version.  Possibilities include a bug in 
RedHat 7.3's gcc, ld, ar.  The fact that the MLton_init::start string was
corrupted made me think something about linking was wrong.  But, you'll
also notice that the non-debugging version is even missing the call to
printf ("GC_init::argc = %i\n", argc).

I don't really have anything else to go on.  Seems as though we can get
away with building on a RedHat 7.1 machine an stuff will run on a 7.3.

Using the runtime built on either CFS05 or CFS38 works fine on my 
Mandrake 8.2.



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel