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

[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, , 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


 * /rosdistro
 * /rosversion

    json_prolog (rosprolog/run_with_prolog_env)


core service [/rosout] found
process[json_prolog-1]: started with pid [12253]
    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

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!        libswipl.a                   

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

export SWI_HOME_DIR=/usr/lib/swi-prolog


 * /rosdistro
 * /rosversion

    json_prolog (rosprolog/run_with_prolog_env)


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/ 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 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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: 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). 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


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 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/ ?

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 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/ /usr/lib/`

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/ 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

Question Tools



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

Seen: 975 times

Last updated: Mar 06 '14