[MLton-devel] Compatibility between RedHat 7.2 and 9

Stephen Weeks MLton@mlton.org
Wed, 9 Jul 2003 17:37:13 -0700


> We encountered the following problem with MLton binaries built on 7.2 
> and run on RedHat 9.0:
> 
> Incorrectly built binary which accesses errno, h_errno or _res directly. 
> Needs to be fixed.
>        libm.so.6 => /lib/libm.so.6 (0x40023000)
>        libc.so.6 => /lib/libc.so.6 (0x40045000)
>        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

This sounds like a known problem with programs that use errno
incorrectly running with new versions of glibc.  See, e.g.

	http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=90002
	http://article.gmane.org/gmane.mail.qmail.general/13960

The problem happens when errno is used (as type int) without
#including errno.h.  But errno is really a macro and there is no
guaranteed errno symbol.  The latest glibc on RedHat 9.0 is actually
enforcing this.  Hence the above error.

I looked at the MLton runtime sources and don't see any incorrect uses
of errno, so I can't see why the problem is happening.

I've also tried using mlton 20030708 and compiling executables on 7.1,
7.2, 7.3, 8.1, and running them on 9.0, all without encountering this
problem.  So, something must be differen about our setup.  Could you
please provide more information on:

o the version of MLton used
o the flags used to compile the executable
o anything else that you linked with
o the SML code (a small test program would be best)
o the glibc on the 7.2 and 9.0 machines, and anything else that
  might make the machines different than a stock installation

The best guess I have right now is that there is an errno problem in
some older version of MLton or that you are linking with something
that is built incorrectly.



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel