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

[FATAL ERROR: Not a SWI-Prolog saved state]

asked 2014-03-03 00:14:22 -0500

Noah gravatar image

updated 2014-03-06 04:15:41 -0500

Dear all,

I correctly installed knowrob and knowrob tutorials. (No warning and errors!) Following this question, http://answers.ros.org/question/47289... , I tried to run tutoria.launch, because I'm interested in quering ontology using Ros services. So I computed

roslaunch tutorial.launch

and I get

started roslaunch server http://192.168.10.11:40049/

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    json_prolog (rosprolog/run_with_prolog_env)

ROS_MASTER_URI=http://192.168.10.10:11311

core service [/rosout] found
process[json_prolog-1]: started with pid [12253]
[FATAL ERROR:
    Not a SWI-Prolog saved state]
[json_prolog-1] process has died [pid 12253, exit code 2, cmd /opt/ros/fuerte/stacks/knowrob/rosprolog/scripts/run_with_prolog_env ias_semantic_map /opt/ros/fuerte/stacks/knowrob/json_prolog/bin/json_prolog __name:=json_prolog __log:=/home/nearlab/.ros/log/ba155972-a2b4-11e3-a500-00e08170ece8/json_prolog-1.log].
log file: /home/nearlab/.ros/log/ba155972-a2b4-11e3-a500-00e08170ece8/json_prolog-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I don't know if it could help but this is the list of libraries that I get when I install KnowRob under /usr/lib/swi-prolog/lib/amd64. As you can see, libswipl is only .a version!

archive4pl.so        libswipl.a      process.so    socket.so      uid.so
cgi.so               memfile.so      protobufs.so  ssl4pl.so      unicode4pl.so
crypt.so             mime.so         rdf_db.so     streaminfo.so  unix.so
double_metaphone.so  ntriples.so     readutil.so   syslog.so      uri.so
files.so             odbc4pl.so      rlimit.so     table.so       uuid.so
http_stream.so       pdt_console.so  sgml2pl.so    time.so        zlib4pl.so
isub.so              pl2xpce.so      sha4pl.so     tipc.so
json.so              porter_stem.so  snowball.so   turtle.so

This Is what I get when I launch roslaunch tutorial.launch With this option in .bashrc

export SWI_HOME_DIR=/usr/lib/swi-prolog
export LD_PRELOAD=libswipl.so


SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES
  /
    json_prolog (rosprolog/run_with_prolog_env)

ROS_MASTER_URI=http://192.168.10.10:11311

core service [/rosout] found
process[json_prolog-1]: started with pid [23771]
% /home/nearlab/.plrc compiled 0.00 sec, 2 clauses
%     library(error) compiled into error 0.00 sec, 81 clauses
%     library(pairs) compiled into pairs 0.00 sec, 22 clauses
%    library(lists) compiled into lists 0.01 sec, 205 clauses
%   library(shlib) compiled into shlib 0.01 sec, 246 clauses
%   library(option) compiled into swi_option 0.00 sec, 32 clauses
%  library(process) compiled into process 0.01 sec, 320 clauses
% /opt/ros/fuerte/stacks/knowrob/rosprolog/prolog/init.pl compiled 0.01 sec, 334 clauses
%     library(jpl) compiled into jpl 0.02 sec, 542 clauses
%         library(sgml) compiled into sgml 0.01 sec, 168 clauses
%           library(quintus) compiled into quintus 0.00 sec, 54 clauses
%          rewrite compiled into rewrite 0.00 sec, 81 clauses
%          library(uri) compiled into uri 0.00 sec, 36 clauses
%          library(record) compiled into record 0.00 sec, 69 clauses
%         rdf_parser compiled into rdf_parser 0.01 sec, 342 clauses
%          library(gensym) compiled into gensym 0.00 sec, 9 clauses
%         rdf_triple compiled into rdf_triple 0.00 sec, 80 clauses
%        library(rdf) compiled into rdf 0.03 sec, 664 clauses
%         library(debug) compiled ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-03-03 00:33:56 -0500

moritz gravatar image

updated 2014-03-06 19:08:49 -0500

Have you set the SWI_HOME_DIR environment variable?

Googling the error message indicates that a second SWI prolog installation could have produced the error: http://www.codecompiling.net/node/137 You should be able to use the version of SWI Prolog that comes with Ubuntu (at least on Precise and Raring). Other versions of Prolog may be incompatible (I cannot test all of them, but the default ones in Ubuntu do work).

libswipl.so is not supposed to be in the folder you listed, but in /usr/lib, as I said above. The LD_PRELOAD should not be in the .bashrc since it can cause problems for other programs; you should only export this variable before launching the program.

edit flag offensive delete link more

Comments

Thank you Moritz, Yes, I set the SWI_HOME_DIR. However I used another version of SWI Prolog, because in the default one, the shared library libswipl.so was missing (better, there is only the static version libswipl.a). How do you get the .so version? Thank you

Noah gravatar image Noah  ( 2014-03-03 04:22:13 -0500 )edit

Which Ubuntu version are you using? I haven't seen that issue so far, maybe you need to create a symlink to e.g. /usr/lib/libswipl.so.5.10.4 ?

moritz gravatar image moritz  ( 2014-03-03 06:02:42 -0500 )edit

Dear @moritz , I'm running Ubuntu 12.04. When I'm searching in the SWI prolog installation I can only find libswipl.a and not libswipl.so. That is why I installed also the swipl-5.10.3. Where should I add this link and to what? Thank you,

Noah gravatar image Noah  ( 2014-03-03 23:37:03 -0500 )edit

I'm also running Ubuntu 12.04 and have recently installed a new system without problems. Do you have all of these packages installed? swi-prolog-nox swi-prolog-x swi-prolog-odbc swi-prolog? If the .so file is not present, but the .so.5.10.4 is, create a link using `sudo ln -s /usr/lib/libswipl.so.5.10.4 /usr/lib/libswipl.so`

moritz gravatar image moritz  ( 2014-03-04 00:26:02 -0500 )edit

That is very strange: I tried to re-install the system, but we had the same problem. I tried also to create a link as you said but then, we got bad errors related to other libraries, and then the overall system is no more usable.

Noah gravatar image Noah  ( 2014-03-05 03:21:36 -0500 )edit

Hmm, sorry, then I'm out of ideas. It seems to be a problem related to the underlying SWI Prolog, not KnowRob itself, and we haven't had problems with using the default Ubuntu installation in a number of installations during the past years.

moritz gravatar image moritz  ( 2014-03-05 03:39:40 -0500 )edit

@moritz, I edited the question maybe it could help. Thank you anyway for you support

Noah gravatar image Noah  ( 2014-03-06 02:43:08 -0500 )edit

Ok, Thank you @moritz and what about the last error? ERROR: /opt/ros/fuerte/stacks/knowrob/comp_temporal/prolog/comp_temporal.pl:74: rdf_db:rdf_transaction/2: Undefined procedure: rdf_db:rdf_transaction_/2 However, there are definitions for: rdf_db:rdf_transaction/1

rperro88 gravatar image rperro88  ( 2014-03-06 22:20:52 -0500 )edit

The last error shows that you use the .deb packages for fuerte. They are broken, as stated in the installation instructions, and since they are not built any more, there's no way for me to fix this. Please install KnowRob as described here http://www.knowrob.org/installation#installation_from_source

moritz gravatar image moritz  ( 2014-03-06 22:58:41 -0500 )edit

That is not true, I did source installation!

Noah gravatar image Noah  ( 2014-03-06 23:00:11 -0500 )edit

I re-did source installation, during rosmake knowrob I get: Finished <<< srldb [PASS] [ 22.95 seconds ] -- WARNING: 4 compiler warnings and Finished <<< jpl [PASS] [ 8.92 seconds ] -- WARNING: 6 compiler warnings

Noah gravatar image Noah  ( 2014-03-06 23:08:53 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2014-03-03 00:14:22 -0500

Seen: 976 times

Last updated: Mar 06 '14