From sergiom@gnp.com Wed Dec 12 23:55:44 2001
Received: from northwall.gnp.com (lsanca1-ar8-066-060.biz.dsl.gtei.net [4.35.66.60])
	by swi.psy.uva.nl (8.11.6/8.11.2) with ESMTP id fBCMth507562
	for <prolog@swi.psy.uva.nl>; Wed, 12 Dec 2001 23:55:44 +0100 (MET)
Received: (from smap@localhost)
	by northwall.gnp.com (8.8.7/8.8.7) id OAA03908
	for <prolog@swi.psy.uva.nl>; Wed, 12 Dec 2001 14:55:38 -0800
Received: from borealis.gnp.com(64.242.32.241) by northwall.gnp.com via smap (V2.1)
	id xma003903; Wed, 12 Dec 01 14:55:09 -0800
Received: by gnp.com (SMI-8.6/SMI-SVR4)
	id OAA05082; Wed, 12 Dec 2001 14:54:47 -0800
Received: from boboli(192.168.11.68) by polaris via smap (V2.1)
	id xma005077; Wed, 12 Dec 01 14:54:19 -0800
Received: from oyster by boboli (8.9.1b+Sun) id OAA08339; Wed, 12 Dec 2001 14:54:19 -0800 (PST)
Message-ID: <010601c1835f$edf25ce0$7514a8c0@gnp.com>
From: "Sergio Martinez" <sergiom@gnp.com>
To: <prolog@swi.psy.uva.nl>
Date: Wed, 12 Dec 2001 14:54:17 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Subject: [SWIPL] StrongARM Install Problem


I'm attempting to compile SWI Prolog on a StrongARM processor.  I used the
following commands to
configure and build from the source:

CFLAGS='-I/mnt/disk/usr/include' CPPFLAGS='-I/mnt/disk/usr/include'
./configure --prefix=/mnt/disk/usr --cache-file=/dev/null \
--includedir=/mnt/disk/usr/include --host=arm-unknown-linux --disable-mapped
-stacks --disable-segv-handling

gmake CIFLAGS='-I/mnt/disk/usr/include'

After the 'pl' executable was built, I got the following assert error:

gcc -export-dynamic  -o pl 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 -lrc -ldl -lreadline -lncurses -lm
./pl -O -o pl.prc -b ../boot/init.pl
Loading boot file ...
Loading Prolog startup files
pl: pl-rec.c:848: copyRecordToGlobal: Assertion `b.gstore ==
((&PL_local_data)->stacks.global.top)' failed.
gmake[1]: *** [pl.prc] Aborted
gmake[1]: Leaving directory `/mnt/disk/pl-4.0.11/src'
gmake: *** [all] Error 2

I added some some printf's and found out that 'b.gstore' is 4 larger than
the other value.
Here's the function in question:

void
copyRecordToGlobal(term_t copy, Record r ARG_LD)
{ copy_info b;

  DEBUG(3, Sdprintf("PL_recorded(%p)\n", r));

  b.base = b.data = dataRecord(r);
  b.gstore = allocGlobal(r->gsize);

  INITCOPYVARS(b, r->nvars);
  copy_record(valTermRef(copy), &b);
  FREECOPYVARS(b, r->nvars);

  assert(b.gstore == gTop);
  SECURE(checkData(valTermRef(copy)));
}

I saw that "allocGlobal" increments "gTop" by 12.  "r->gsize" is 3.
The "copy_record" call increments "b.gstore" by 16.  Then the
assert fails.

I would greatly appreciate any help with this.

Thanks a lot,

Sergio Martinez
GNP Computers



