ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

knowrob json_prolog problems

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

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/process.pl:47: '$open_shared_object'/3: /usr/lib/swi-prolog/lib/i386/process.so: undefined symbol: Sfilefunctions Warning: /usr/lib/swi-prolog/library/process.pl:47: Goal (directive) failed: process:use_foreign_library(foreign(process)) ERROR: /usr/lib/swi-prolog/library/process.pl:334: Exported procedure process:process_wait/3 is not defined ERROR: /usr/lib/swi-prolog/library/process.pl:334: 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?

Thanks.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

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

moritz gravatar image

Hi,

this has been a problem with the SWI Prolog libraries: They are regularly renamed from libpl.so to libswipl.so 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
-1

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

Ze JI gravatar image

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

Ze

edit flag offensive delete link more

Comments

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

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

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/process.pl, 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 process.pl is incompatible.. But as I am not familiar with Prolog, could anyone help?

Many thanks.

edit flag offensive delete link more

Comments

The problem is not that things have been removed from process.pl, it's rather that you need to have LD_PRELOAD=libswipl.so 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 -0600 )edit
2
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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 750 times

Last updated: Oct 18 '11