javashared-librariesswi-prologubuntu-11.04jpl

How to solve "Symbol lookup error" by using JPL on Ubuntu11.04?


I'm coding a program in Java and I would like to connect to Prolog. Thus, I decided to use JPL. It is perfectly to use JPL on Windows Vista. Later, I have to change the OS platform to be Ubuntu 11.04. Unfortunately, there is an error:

symbol lookup error: /usr/lib/swi-prolog/lib/i386/libjpl.so: undefined symbol: PL_is_initialised

Environment:

  1. Ubuntu 11.04
  2. Java version 1.6.0_24
  3. Eclipse Galileo Version: 3.5.2
  4. SWI-Prolog version 5.10.1 for i386
  5. Jpl (apt-get install swi-prolog-java)
  6. Family.java + family.pl

I explain steps of working and problems as follows. step1: Install swi-prolog + jpl using Synaptic Package Manager Swi-prolog Installation

step2: Run Family.java , found an error JPL not found Error

step3: Configure the library path at VMarguments Set VMarguments step4: Run again, there is an error /usr/lib/jvm/java-6-sun-1.6.0.24/bin/java: symbol lookup error: /usr/lib/swi-prolog/lib/i386/libjpl.so: undefined symbol: PL_is_initialised step5: I also config the environment but the error still the same. set environment arguments

The method that I used to solve the problem as in step 3 and 5 I searched from the internet. I can not find other solutions to try. Does anyone have any idea?
Thanks in advance.


Solution

  • Thank you very much for every supports. Now,i can manage this problem. I found a suggestion from page http://code.google.com/p/javanaproche/wiki/HowToJPL

    Following the instructions, i change the swi-prolog version to be a building form source pl-5.10.1. Finally, it works. I think the problem happens because the swi-prolog getting from synaptic manager doesn't set to be a shared library. If anyone knows how to set a share library , it might be work.