SML/NJ 110.54 fails to build on Cygwin
SML/NJ at version 110.54 fails to build on Cygwin. The first problem is in
src/runtime/mach-dep/cygwin-fault.c, which fails to compile thus:
.../mach-dep/cygwin-fault.c: In function `ctrl_c_handler':
.../mach-dep/cygwin-fault.c:33: error: structure has no member named
`vp_numPendingSysSigs'
I guessed the following patch from how similar code in nearby files had
changed:
--- cygwin-fault.c.orig 2005-07-09 15:09:42.827750000 +0100
+++ cygwin-fault.c 2005-07-09 15:13:48.343375000 +0100
@@ -29,8 +29,8 @@
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT:
{ vproc_state_t * vsp = SELF_VPROC;
- EnqueueSignal(vsp, SIGINT);
- vsp->vp_numPendingSysSigs++;
+ vsp->vp_sigCounts[SIGINT].nReceived++;
+ vsp->vp_totalSigCount.nReceived++;
if (vsp->vp_inMLFlag &&
(! vsp->vp_handlerPending) &&
(! vsp->vp_inSigHandler))
That took me a bit further, but I get a problem with linking:
gcc -o run.x86-cygwin -O2 main.o c-libraries.o unix-raise-syserr.o
ml-options.o boot.o load-ml.o run-ml.o globals.o ml-state.o error.o
timers.o unix-timers.o qualify-name.o swap-bytes.o unix-fault.o
signal-util.o unix-signal.o unix-prof.o prim.o
.../c-libs/posix-os/libposix-os.a ../c-libs/smlnj-runtime/libsmlnj-runt.a
.../c-libs/smlnj-signals/libsmlnj-sig.a ../c-libs/smlnj-prof/libsmlnj-prof.a
.../c-libs/smlnj-sockets/libsmlnj-sock.a
.../c-libs/smlnj-time/libsmlnj-time.a ../c-libs/smlnj-date/libsmlnj-date.a
.../c-libs/smlnj-math/libsmlnj-math.a
.../c-libs/posix-process/libposix-process.a
.../c-libs/posix-procenv/libposix-procenv.a
.../c-libs/posix-filesys/libposix-filesys.a ../c-libs/posix-io/libposix-io.a
.../c-libs/posix-sysdb/libposix-sysdb.a
.../c-libs/posix-signal/libposix-signal.a ../c-libs/posix-tty/libposix-tty.a
.../c-libs/posix-error/libposix-error.a ../gc/libgc.a ../memory/libmem.a
.../c-libs/dl/libunix-dynload.a -lws2_32 -Wl,--export-all cygwin.def -lm
Cannot export EnqueueSignal: symbol not defined
Cannot export GCSignal: symbol not defined
collect2: ld returned 1 exit status
From a grep, I suspect that this is because of references to these symbols
in the file src/runtime/objs/cygwin.def, but I have no idea what that file
is for, so it's not clear to me what to try next.
Regards,
Rob.
|