Ask Your Question

knowrob json_prolog problems

asked 2011-10-18 03:31:02 -0500

Ze JI gravatar image

I have got the following errors when I use knowrob/json_prolog.

I tried the examples as in the tutorial:

$ rosrun json_prolog json_prolog package_name(tried several)

ERROR: /usr/lib/swi-prolog/library/ '$open_shared_object'/3: /usr/lib/swi-prolog/lib/i386/ undefined symbol: Sfilefunctions Warning: /usr/lib/swi-prolog/library/ Goal (directive) failed: process:use_foreign_library(foreign(process)) ERROR: /usr/lib/swi-prolog/library/ Exported procedure process:process_wait/3 is not defined ERROR: /usr/lib/swi-prolog/library/ Exported procedure process:process_kill/2 is not defined

I am using Ubuntu 11.04, Ros electric, installed using apt from the online repository.

Is there any compatibility issue of the swi-prolog with json_prolog/jpl etc?


edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2011-10-18 22:10:19 -0500

moritz gravatar image


this has been a problem with the SWI Prolog libraries: They are regularly renamed from to and back...

It should be fixed in the svn version, can you please verify that it works for you? Then I'll start the release as .deb packages.

Thanks Moritz

edit flag offensive delete link more

answered 2011-10-18 21:51:01 -0500

Ze JI gravatar image

Following the above question, it seems the problem comes from swi-prolog...

As the error is from /usr/lib/swi-prolog/library/, I changed it a bit as:

:- module(process,
  [ process_create/3,       % +Exe, +Args, +Options
    process_wait/2,     % +PID, -Status
    process_id/1,       % -PID
    process_id/2,       % +Process, -PID
    is_process/1,       % +PID
    process_release/1,      % +PID
    process_kill/1      % +PID
:- use_module(library(shlib)).
:- use_module(library(lists)).
:- use_module(library(option)).
:- use_module(library(process)).
%:- use_foreign_library(foreign(process)).

Some functions are removed from the process list: process_create/2, process_kill/2, etc. Also, use_foreign_library(foreign(process)) caused other errors, so I also commented it out. I am not sure if this makes sense.

But I can get rid of some of the errors. But certainly this is not the ideal way, as other programs also require some missing functions, such as process_create/2, which I removed from the list. I guess this is somehow the problem of the ubuntu version of the swi-prolog, where the is incompatible.. But as I am not familiar with Prolog, could anyone help?

Many thanks.

edit flag offensive delete link more


The problem is not that things have been removed from, it's rather that you need to have set. This is being done automatically in the rosjava wrapper script bin/json_prolog, which is generated based on the information in CMakeLists.txt
moritz gravatar image moritz  ( 2011-10-18 22:15:30 -0500 )edit
Please remove this since it's not an answer. Any important information to the problem should be moved to the original question.
Asomerville gravatar image Asomerville  ( 2011-11-30 04:07:40 -0500 )edit

answered 2011-10-18 22:25:41 -0500

Ze JI gravatar image

Thanks a lot for your quick response. Yes, all the errors are gone now with the svn version.


edit flag offensive delete link more


Please remove this since it's not an answer.
Asomerville gravatar image Asomerville  ( 2011-11-30 04:07:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2011-10-18 03:31:02 -0500

Seen: 655 times

Last updated: Oct 18 '11