Compile+execution problems on: SWI-Prolog 6.6.3

jon <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Hi,

I have 2 problems.. first on the compilation, then on running it once
compiled. This is on Ubuntu 12.04 LTS.

*1. Compile - incorrect syntax*

I just unpack, configure (with no extra flags), then make :
...
ar: creating ../lib/i686-linux/libswipl.a
ranlib ../lib/i686-linux/libswipl.a
gcc -c -I. -I. -I./rc -Wall -O2  -fno-strict-aliasing -pthread  pl-main.c -o
pl-main.o
gcc -rdynamic -O2 -pthread   -o swipl pl-main.o -L../lib/i686-linux -lswipl
-lgmp -lrt -lreadline -lncurses -lm -lrt -ldl  
: -c swipl || true
if [ ! -d ../include ]; then mkdir -p ../include; fi
cp ./SWI-Prolog.h ../include/SWI-Prolog.h
cp ./os/SWI-Stream.h ../include/SWI-Stream.h
rm -f swipl.prc
./swipl.sh -O -o swipl.prc -b ../boot/init.pl
Loading boot file ...
Loading Prolog startup files
*Message:
error(syntax_error(operator_clash),file(/usr/local/src/pl-6.6.3/boot/syspred.pl,85,25,2546))*
%  messages boot compiled into $messages 0.02 sec, 425 clauses
%  toplevel boot compiled into $toplevel 0.01 sec, 161 clauses
%  attvar boot compiled into $attvar 0.00 sec, 42 clauses
%  bags boot compiled into $bags 0.00 sec, 15 clauses
%  apply boot compiled into $apply 0.00 sec, 3 clauses
%  history boot compiled into $history 0.00 sec, 51 clauses
%  dwim boot compiled into $dwim 0.00 sec, 75 clauses
%  parms boot compiled into $parms 0.00 sec, 10 clauses
%  autoload boot compiled into $autoload 0.00 sec, 55 clauses
%  qlf boot compiled into $qlf 0.00 sec, 10 clauses
%  rc boot compiled into $rc 0.00 sec, 7 clauses
%  predopts boot compiled into $predopts 0.00 sec, 24 clauses
%  packs boot compiled into $pack 0.00 sec, 29 clauses
%  topvars boot compiled into toplevel_variables 0.00 sec, 28 clauses
% /usr/local/src/pl-6.6.3/boot/load.pl boot compiled 0.09 sec, 1,415 clauses
SWI-Prolog boot files loaded
Boot compilation has created swipl.prc
..

The offending predicate is:

map_bits(_, Var, _, _) :-
	*var(Var), !,*

Should be a full stop at the end ?

If I manually fix the full step, it compiles correctly.  Then I try to run
it:

*2.  Stack overflow on exit.*
Fire it up, then immediately do a Ctrl+C/E to exit (before doing
anything..).
The first Ctrl+C/E just puts it into a zombie state, so do the same again,
and it bombs out:

$ prolog
Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 6.6.3)
Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.

For help, use ?- help(Topic). or ?- apropos(Word).

?- 
[forced] Action (h for help) ? exit

[forced] Action (h for help) ? exit
[Thread 1]: failed to recover from local-overflow
Stack trace labeled "unhandled stack overflow":
  [0] prolog() [0x80f7f39]
  [1] prolog() [0x805a4a4]
  [2] prolog() [0x805a7fb]
  [3] prolog(PL_open_query+0x458) [0x805dec8]
  [4] prolog() [0x8097e85]
  [5] prolog() [0x80cdb0c]
  [6] prolog(PL_halt+0x18) [0x80594f8]
  [7] prolog() [0x80b32a9]
  [8] prolog() [0x80b05b4]
  [9] prolog() [0x80fb6a1]
  [10] [0xb7748400]
  [11] [0xb7748424]
  [12] /lib/i386-linux-gnu/libpthread.so.0(read+0x23) [0xb760c9b3]
  [13] /lib/i386-linux-gnu/libreadline.so.6(rl_getc+0x44) [0xb768bb14]
  [14] /lib/i386-linux-gnu/libreadline.so.6(rl_read_key+0x15d) [0xb768c3dd]
  [15] /lib/i386-linux-gnu/libreadline.so.6(readline_internal_char+0x6c)
[0xb7675d9c]
  [16] /lib/i386-linux-gnu/libreadline.so.6(readline+0x65) [0xb76762f5]
  [17] prolog() [0x80fb5e3]
  [18] prolog(S__fillbuf+0x81) [0x80eaa01]
  [19] prolog(Sgetcode+0x420) [0x80eb470]
  [20] prolog() [0x80a48e1]
  [21] prolog() [0x80a5d16]
  [22] prolog() [0x80ab4b6]
  [23] prolog(PL_next_solution+0x57d1) [0x8063a91]
  [24] prolog() [0x8097e97]
  [25] prolog() [0x80986da]
  [26] prolog(PL_toplevel+0x21) [0x80594c1]
  [27] prolog(main+0x35) [0x8051825]
  [28] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb746d4d3]
  [29] prolog() [0x8051869]
Stack trace labeled "crash":
  [0] prolog() [0x80f7f39]
  [1] prolog() [0x805a632]
  [2] prolog() [0x805a7fb]
  [3] prolog(PL_open_query+0x458) [0x805dec8]
  [4] prolog() [0x8097e85]
  [5] prolog() [0x80cdb0c]
  [6] prolog(PL_halt+0x18) [0x80594f8]
  [7] prolog() [0x80b32a9]
  [8] prolog() [0x80b05b4]
  [9] prolog() [0x80fb6a1]
  [10] [0xb7748400]
  [11] [0xb7748424]
  [12] /lib/i386-linux-gnu/libpthread.so.0(read+0x23) [0xb760c9b3]
  [13] /lib/i386-linux-gnu/libreadline.so.6(rl_getc+0x44) [0xb768bb14]
  [14] /lib/i386-linux-gnu/libreadline.so.6(rl_read_key+0x15d) [0xb768c3dd]
  [15] /lib/i386-linux-gnu/libreadline.so.6(readline_internal_char+0x6c)
[0xb7675d9c]
  [16] /lib/i386-linux-gnu/libreadline.so.6(readline+0x65) [0xb76762f5]
  [17] prolog() [0x80fb5e3]
  [18] prolog(S__fillbuf+0x81) [0x80eaa01]
  [19] prolog(Sgetcode+0x420) [0x80eb470]
  [20] prolog() [0x80a48e1]
  [21] prolog() [0x80a5d16]
  [22] prolog() [0x80ab4b6]
  [23] prolog(PL_next_solution+0x57d1) [0x8063a91]
  [24] prolog() [0x8097e97]
  [25] prolog() [0x80986da]
  [26] prolog(PL_toplevel+0x21) [0x80594c1]
  [27] prolog(main+0x35) [0x8051825]
  [28] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb746d4d3]
  [29] prolog() [0x8051869]
[FATAL ERROR:
	Sorry, cannot continue]

I have been reliably using 6.2.6 day in, day out, so there's nothing in
principle completely broken in my configuration.

After getting the above error,  if I make clean in 6.6.3, and revert back to
6.2.6 (again, compiling from source), I am able to exit prolog correctly.

If you need any further logs, compilations on different versions / dev
versions etc, please shout, and I'll do it.

Regards,
Jon.



--
View this message in context: http://swi-prolog.996271.n3.nabble.com/Ann-SWI-Prolog-6-6-3-tp14526p14536.html
Sent from the SWI Prolog mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.