Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#125] build script is broken on Cygwin-x86

Date:
2014-02-27 09:32
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
x86
Operating System:
Other
Component:
Installer
Resolution:
Fixed
Severity:
Critical
OS Version:
Cygwin on Windows7(Pro,32bit)
SML/NJ Version:
110.75
Keywords:
install, SEH, windows, cygwin
URL:
Transcript (of reproduction):
Source (for reproduction):
$ export SMLNJ_CYGWIN_RUNTIME=1 $ tar -xf config.tgz $ ./config/install.sh
Summary:
build script is broken on Cygwin-x86

Detailed description

config/install.sh fail compiling SML/NJ on current version cygwin env.
Off-cource I am using SMLNJ_CYGWIN_RUNTIME=1 :)

an error is occured like below:

$ ./config/install.sh
brah...
brah...
.
.
gcc -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_CYGWIN -DGNU_ASSEMBLER -DDLOPEN -I../objs -I../include ../kernel/timers.c
gcc -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_CYGWIN -DGNU_ASSEMBLER -DDLOPEN -I../objs -I../include ../kernel/unix-timers.c
gcc -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_CYGWIN -DGNU_ASSEMBLER -DDLOPEN -I../objs -I../include ../kernel/qualify-name.c
gcc -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_CYGWIN -DGNU_ASSEMBLER -DDLOPEN -I../objs -I../include ../kernel/swap-bytes.c
gcc -c -O2 -DHOST_X86 -DTARGET_X86 -DOPSYS_UNIX -DOPSYS_CYGWIN -DGNU_ASSEMBLER -DDLOPEN -I../objs -I../include ../mach-dep/unix-fault.c
In file included from ../mach-dep/unix-fault.c:10:0:
../mach-dep/cygwin-fault.c:21:43: fatal error: exceptions.h: No such file or directory
#include exceptions.h /* Cygwin stuff */
^
compilation terminated.
makefile:242: recipe for target unix-fault.o failed
make[1]: *** [unix-fault.o] Error 1
make[1]: Leaving directory /cygdrive/c/usr/sml/base/runtime/objs
mk.x86-cygwin:22: recipe for target all failed
make: *** [all] Error 2
./config/install.sh: !!! Run-time system build failed for some reason.
$



Fix:

I add the exception_list definition as below, compiling process seems to work well.
But I am not an assembly or SEH hacker.
So, I do not have the confidence in which this is right.

/* base/runtime/include/cygwin-fault.h */
#if !defined CYGWIN_FAULT_INCLUDED
#define CYGWIN_FAULT_INCLUDED

#include windows.h

typedef int (exn_handler_fn)(EXCEPTION_RECORD *, void *, CONTEXT *, void *);
typedef struct exception_list {
struct exception_list * prev;
exn_handler_fn * handler;
} exception_list;

#endif /* CYGWIN_FAULT_INCLUDED */


/* base/runtime/mach-dep/cygwin-fault.c */
$ diff base/runtime/mach-dep/cygwin-fault.c base/runtime/mach-dep/cygwin-fault.new.c
20,21c20
#include windows.h
#include exceptions.h /* Cygwin stuff */
---
#include cygwin-fault.h /* Cygwin stuff */



Submitted via web form by takayuki goto nephits@gmail.com

Comments:

Message  ↓
Date: 2014-08-20 11:41
Sender: John Reppy

Found a copy of exceptions.h on the web and included it verbatim in the cygwin-fault.c file.

Fixed for 110.77.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2014-08-20 11:41jhr
assigned_tonone2014-08-20 11:41jhr
close_date2014-08-20 11:412014-08-20 11:41jhr
ResolutionNone2014-08-20 11:41jhr