From jan@swi.psy.uva.nl Tue May  1 12:47:27 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f41AlR301053;
	Tue, 1 May 2001 12:47:27 +0200 (MET DST)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f41AlRX15962;
	Tue, 1 May 2001 12:47:27 +0200
Date: Tue, 1 May 2001 12:47:27 +0200
Message-Id: <200105011047.f41AlRX15962@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: SWI-Prolog configure
To: Jean Wang <yqwang@unbc.ca>
In-Reply-To: Jean Wang's message of Mon, 30 Apr 2001 14:23:13 -0700
Phone: +31 - 20 - 525 6121
Cc: prolog@gollem.swi.psy.uva.nl

Jean,

> I am installing the SWI-Prolog on our SGI Origin 3400 workstation. It is
> an IRIX system. When I ran configure, I got this information:
> ...
>        cc -c -I. -I. -I./rc  -O   pl-main.c -o pl-main.o
>         cc  -o pl -Lrc pl-atom.o pl-wam.o pl-stream.o pl-error.o
> pl-arith.o pl-bag.o  pl-comp.o pl-rc.o pl-dwim.o pl-ext.o pl-file.o
> pl-flag.o  pl-fmt.o pl-funct.o pl-gc.o pl-glob.o pl-itf.o pl-list.o
> pl-load.o pl-modul.o pl-op.o pl-os.o pl-prims.o pl-pro.o  pl-proc.o
> pl-prof.o pl-read.o pl-rec.o pl-rl.o pl-setup.o  pl-sys.o pl-table.o
> pl-trace.o pl-util.o pl-wic.o pl-write.o  pl-term.o pl-buffer.o
> pl-thread.o pl-xterm.o  pl-feature.o pl-ctype.o pl-main.o pl-extend.o
> -lrc -ldl -lcurses -lm
> ld32: WARNING 84 : /usr/lib32/libdl.so is not used for resolving any
> symbol.
>         ./pl -O -o pl.prc -b ../boot/init.pl
> Loading boot file ...
> [PROLOG SYSTEM ERROR:
>         Recursively received fatal signal 11
> 
> PROLOG STACK:
> ]
> *** Error code 1 (bu21)

Which version of SWI-Prolog?  The current public source is 4.0.4.
The most likely cause are alignment problems, sometimes initiated
by compiler differences.  My current development platform (SuSE
linux on PC hardware) has no trouble with this. Luckily the system is
regulary used on SPARC and ALPHA hardware, giving similar problems.

In some occasions these problems are caused by buggy compilers.

In some other cases the system configures signal-based stack overflow,
but it doesn't work on the platform.

I know SWI-Prolog generally runs fine using gcc on IRIX platforms.

My suggestions (in order):

	* If not done by configure, add #define NO_SEGV_HANDLING 1 to
	  config.h and recompile (remove old object files before doing
	  so).

	* Recompile for debugging and run the Prolog boot compilation
	  under a debugger.  Send the stack-trace to me.  Make sure
	  it has line-number information!

	* Try GCC (if this is an option)

	* Provide me with a guest account (again if this is an option).
	
	--- Jan

