Subject: Re: problem with JPL 1.0.1 and SWI Prolog 3.3.0

From: Fred Dushin <[email-masked]>
Date: Fri, 21 Jan 2000 08:48:10 -0500

> I'm trying to get JPL running on my Linux box. I have JDK 1.2.2, JPL 1.0.1 and
> SWI Prolog 3.3.0 (the January 17th 2000 version).
> 
> When I run the Test.java program in the test directory, I get this error
> message:
> 
> [PROLOG INTERNAL ERROR:
>         Undefined predicate: system:print_message/2
> 
> PROLOG STACK:
>     [42405] system: (module_transparent _L508925)
>     [42404] system: (module_transparent _G127252, _G127253)
>     [42403] system: (module_transparent _G127249, _G127250)
>     [42402] system: (module_transparent _G127246, _G127247)
>     [42401] system: (module_transparent _G127243, _G127244)
>     [42400] system: (module_transparent _G127240, _G127241)
>     [42399] system: (module_transparent _G127237, _G127238)
>     [42398] system: (module_transparent _G127234, _G127235)
>     [42397] system: (module_transparent _G127231, _G127232)
>     [42396] system: (module_transparent _G127228, _G127229)
> ]
> 
> It looks like the definition of print_message is not available to the Prolog
> system.

I have not tried 3.3.0 yet, but I will soon.  I have had no problems up to
3.2.9.  In the meantime, you may want to check a few things.

1. Make sure that when you build 3.3.0, you did not have any previous versions
of SWI-Prolog in your executable path; I may be wrong here (and Jan please
correct me if I am), but there can be problems that arise from the fact that the
locations of Prolog system resources can be compiled into the SWI executable.

2. Similarly, when you build JPL.

3. Because JPL does not have proper configure scripts, configuration has to be
done by hand in the rules.mk file that come with the JPL distribution.  Check
this file, especially the libraries that get linked into the libjpl.so library. 
There are reported problems with some Linux distributions and libreadline.  If
you build SWI with libreadline support and you find that the SWI interpreter is
not supporting libreadline, this is a likely indication that the problem is
there.  People have gotten around that by rebuilding SWI without libreadline
support and then doing the same for JPL (remove -lreadline).

Configure scripts are on the TODO list, as well as support for modules.

Anyone have any other specific needs/desires/wishes, wrt JPL?  Embedding a java
VM in prolog seems like a fun idea, but I don't know what utility that would
have, exactly.  Unless anyone has any ideas.

Cheers,
Fred