Trying to get DR-PROLOG up running, following the instructions found here.
I have installed SWI Prolog and XSB Prolog. In order to compile SWI-Prolog, I had to install the following packages in Ubuntu (9.04), as mentioned in the README.debian file:
libxext-dev libice-dev libjpeg62-dev libxinerama-dev libxft-dev libxpm-dev libxt-dev pkg-config
It is now possible to start the DR-PROLOG Java application, but not to start the DR-PROLOG engine (from the DR-PROLOG menu in the Java application) . There is some problem with Java/XSB Prolog.
In the drprolog starter script, I'm pointing to the XSB binary folder like this:
#!/bin/bash java -Djava.library.path=/home/samuel/install/xsb-compiler/XSB/config/i686-pc-linux-gnu/bin -jar /home/samuel/program/drprolog/drprologApp.jar
DR-PROLOG > Preferences
inside the DR-PROLOG Java Application before trying to start the DR-PROLOG engine. The folder content is:samuel@m2300:~/install/xsb-compiler/XSB/config/i686-pc-linux-gnu/bin$ ls -l total 920 -rwxr-xr-x 1 samuel samuel 66684 2009-09-14 21:41 gpp -rwxr-xr-x 1 samuel samuel 863693 2009-09-14 21:41 xsb
I get the following error stack:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no xsb in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at com.xsb.interprolog.NativeEngine.<clinit>(NativeEngine.java) at drprologApp.prologApi.createPrologEngine(prologApi.java:77) at drprologApp.prologApi.<init>(prologApi.java:47) at drprologApp.InterprologGUIView.jMenuItem2ActionPerformed(InterprologGUIView.java:1264) at drprologApp.InterprologGUIView.access$600(InterprologGUIView.java:29) at drprologApp.InterprologGUIView$7.actionPerformed(InterprologGUIView.java:408) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.AbstractButton.doClick(AbstractButton.java:357) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1225) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1266) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Well, have to continue digging into this...
Comments
Update...
According to this forum thread it seems I'm setting the correct path.
It seems though that Java is looking for a 'libxsb.so' file rather than just 'xsb'. ( I tried creating a file named 'libxsb.so' in /home/samuel/install/xsb-compiler/XSB/config/i686-pc-linux-gnu/bin, and then the error message was not the same as before:
Seems like I have to create the libxsb.so file somehow... but don't know how.
Have mailed xsb-users@lists.sourceforge.net, so will see if they can help.
Solved
The specific problem is now solved, with the help of this page:
http://osdir.com/ml/ai.prolog.xsb.general/2006-01/msg00009.html
I had to compile xsb with this command, in order to create the libxsb.so file:
(after running
./makexsb
)Still getting some errors though:
After trying the latest XSB
After trying the latest XSB package, 3.1, (I was trying XSB 2.7.1 before, since it seems that was the latest stable version when DR-PROLOG was released) I get a slightly different error message:
Compiled XSB with debugging,
Compiled XSB with debugging, so got more detailed error now:
I even tried to tie the Java
I even tried to tie the Java process to a single CPU, in case that would help (following this tutorial), but without success :(