The error that Martin reports below seems to be due to some structure
name changes in newer versions of OS X due to Unix 2003 compliance. I made
the attached patch to address this problem. The patch changes the
definitions of SIG_GetPC(scp) and SIG_SetPC(scp, addr) in
runtime/mach-dep/signal-sysdep.h.
Put the patch in the same directory as the smlnj.info file (which is
/sw/fink/10.5/unstable/main/finkinfo/languages/ on my system), and add the
following two lines to the end of the PatchScript in smlnj.info (between
the lines "done" and "<<" that are already there):
cd ../src
patch -p1 < %a/%n.patch
I am CCing the package maintainer.
Noam Sturmwind
On Sunday 17 February 2008 02:41:00 pm Martin Hecko wrote:
I have tried to install the SMLNJ package 110.58-1 from the unstable
tree but it wouldn't compile. I have tried to do a fink selfupdate as
well as searching fink mailing lists, but I couldn't find anything that
would offer solution to the problem. I have recently performed a clean
install of the whole Fink subsystem, so I don't think it is a problem
with my Fink installation.
I am running a MacBook Pro with OS X 10.5.2 and other Fink packages
install fine. The compilation log is below, although I am not sure how
helpful it is going to be.
[log snip]
cc -ansi -c -g -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_DARWIN
-DOPSYS_MACOS_10_2 -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs
-I../include ../kernel/timers.c
cc -ansi -c -g -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_DARWIN
-DOPSYS_MACOS_10_2 -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs
-I../include ../kernel/unix-timers.c
cc -ansi -c -g -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_DARWIN
-DOPSYS_MACOS_10_2 -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs
-I../include ../kernel/qualify-name.c
cc -ansi -c -g -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_DARWIN
-DOPSYS_MACOS_10_2 -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs
-I../include ../kernel/swap-bytes.c
cc -ansi -c -g -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_DARWIN
-DOPSYS_MACOS_10_2 -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs
-I../include ../mach-dep/unix-fault.c
../mach-dep/unix-fault.c: In function 'FaultHandler':
../mach-dep/unix-fault.c:68: error: 'struct __darwin_mcontext32' has no
member named 'ss'
../mach-dep/unix-fault.c:73: error: 'struct __darwin_mcontext32' has no
member named 'ss'
../mach-dep/unix-fault.c:77: error: 'struct __darwin_mcontext32' has no
member named 'ss'
../mach-dep/unix-fault.c:82: error: 'struct __darwin_mcontext32' has no
member named 'ss'
make[1]: *** [unix-fault.o] Error 1
make: *** [all] Error 2
config/install.sh: !!! Run-time system build failed for some reason.
### execution of (cd failed, exit code 1
diff -urN src/runtime/mach-dep/signal-sysdep.h
src-new/runtime/mach-dep/signal-sysdep.h
--- src/runtime/mach-dep/signal-sysdep.h 2006-02-27 09:47:32.000000000
-0800
+++ src-new/runtime/mach-dep/signal-sysdep.h 2008-05-28 14:22:13.000000000
-0700
@@ -496,7 +496,7 @@
# define INT_DIVZERO(s, c) ((s) == SIGFPE)
# define SIG_ZeroLimitPtr(scp) { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; }
-# elif defined(OPSYS_DARWIN)
+# elif defined(OPSYS_DARWIN) && !__DARWIN_UNIX03
/** x86, Darwin **/
# define SIG_FAULT1 SIGFPE
# define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_FLTDIV))
@@ -507,6 +507,17 @@
# define SIG_SetPC(scp, addr) { (scp)->uc_mcontext->ss.eip = (int)
addr; }
# define SIG_ZeroLimitPtr(scp) { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; }
+# elif defined(OPSYS_DARWIN) && __DARWIN_UNIX03
+ /** x86, Darwin (Unix 2003 compliant) **/
+# define SIG_FAULT1 SIGFPE
+# define INT_DIVZERO(s, c) (((s) == SIGFPE) && ((c) == FPE_FLTDIV))
+# define INT_OVFLW(s, c) (((s) == SIGFPE) && ((c) == FPE_FLTOVF))
+ /* see /usr/include/mach/i386/thread_status.h */
+# define SIG_GetCode(info,scp) ((info)->si_code)
+# define SIG_GetPC(scp) ((scp)->uc_mcontext->__ss.__eip)
+# define SIG_SetPC(scp, addr) { (scp)->uc_mcontext->__ss.__eip =
(int) addr; }
+# define SIG_ZeroLimitPtr(scp) { ML_X86Frame[LIMITPTR_X86OFFSET] = 0; }
+
# else
# error "unknown OPSYS for x86"
# endif
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users