process: failed to load library

22 views
Skip to first unread message

olivier sallou

unread,
Dec 21, 2018, 1:50:51 AM12/21/18
to SWI-Prolog

Hi,

I am trying to run an executable on Debian package swi-prolog 7.7.25

Don't know if it is related to package or an issue with swi-prolog itself. It works on swi-prolog 7.6.4 (Ubuntu version).


I compile with swipl-ld a prolog file that executes a process and process raise the error:


ERROR: /usr/lib/swi-prolog/library/process.pl:57: Initialization goal raised exception:
ERROR: process: cannot open shared object file: No such file or directory
ERROR: In:
ERROR:   [18] throw(error(shared_object(open,'process: cannot open shared object file: No such file or directory'),context(...,_918)))
ERROR:   [16] <meta call>
ERROR:   [15] with_mutex('$foreign',load_foreign_library(foreign(process),process,default(install))) <foreign>
ERROR:   [12] '$run_init_goal'(shlib:load_foreign_library(...)) at /usr/lib/swi-prolog/boot/init.pl:616
ERROR:   [11] catch(system:'$run_init_goal'(...),_1044,system:'$initialization_error'(_1066,...,...)) at /usr/lib/swi-prolog/boot/init.pl:384
ERROR:   [10] catch_with_backtrace(system:'$run_init_goal'(...),_1096,system:'$initialization_error'(_1118,...,...)) at /usr/lib/swi-prolog/boot/init.pl:434
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.


There is a file open issue, but it does not specify which file is the problem.


Attaching simple example:


swipl-ld -o test.exe test.c test.pl
./test.exe pi/2



Running the test.pl directly in swipl (not compiled version with swipl-ld) works fine:


swipl -s test.pl

?- calc('pi/2').

=> expected result


How can I debug this issue (find root cause).


Thanks

test.pl
test.c

olivier sallou

unread,
Dec 21, 2018, 2:20:28 AM12/21/18
to SWI-Prolog

I tried to recompile swi-prolog from scratch on Debian system following http://www.swi-prolog.org/build/unix.html

I tested it again, and get same error, so this is not related to Debian package itself.
Reply all
Reply to author
Forward
0 new messages