Subject: Re: Trying to build Multi-thread version

From: Jan Wielemaker <[email-masked]>
Date: Thu, 29 Mar 2001 18:46:40 +0200

Danny,

>     I posted this to the mailing list but did not receive a response. I get
> the error below when I try to build a multi-thread version of pl on linux.
> If I remove the offending line from init.pl, the system seems to build but
> the thread predicates are not present in the executable. 

Guess I missed the message for some reason.  

> From: Danny Wages [mailto:[email-masked]]
> Sent: Monday, March 26, 2001 10:23 AM
> To: SWI SWI (E-mail)
> Subject: [SWIPL] Cannot build Multi-threading version
> 
> I am trying to build a multi-threading version of SWI-Prolog 4.0.2 on Linux
> 7.0. The standard build works fine but if I build the Multi-thread version
> as:

Guess Linux 7.0 is not SuSE 7.0, which I'm running here and works
flawlessly :-)  Please include the details, especially including a
transcript of the configure session.

print_message/2 indeed is a normal Prolog predicate, but it is defined
in Prolog and only loaded somewhere during the boot compilation.  Normally
this is fine as there aren't supposed to be any messages before the
predicate gets defined.  Apearently something goes wrong from the very
start, causing this message.

In addition to the configure log, you may want to recompile for debugging
and get the stack-trace:

	% make clean
	% make COFLAGS=-g
	<crashes at the end>
	% gdb pl
	(gdb) break sysError
	(gdb) r -b ../boot/init.pl
	<wait for it hitting the breakpoint>
	(gdb) bt
	<here you get the stack>

Finally, please include gcc versions as well as libc/pthread
library versions.  Mine are gcc version 2.95.2 using glibc 2.1.3.

	Cheers --- Jan

> configure --enable-mt
> make clean
> make
> .
> .
> .
> Loading boot file...
> [PROLOG SYSTEM ERROR: Thread 1
>     Undefined predicate: system:print_message/2
> 
> PROLOG STACK:
>     (1) system:format(Loading boot file...~n,[])
> ]
> 
> I am not sure why print_message is not defined in this case. Any help would
> be appreciated.
> 
> Danny Wages :- Avaya Communication, 303-538-3972, [email-masked]