In trying to use the new --emulator
functionality to produce a saved state to run in multiple architectures I get the following error:
ERROR: /tmp/swipl-devel/build.release/home/xpce/prolog/boot/pce_principal.pl:215: Initialization goal raised exception:
ERROR: pl2xpce: cannot open shared object file: No such file or directory
ERROR: In:
ERROR: [19] throw(error(shared_object(open,'pl2xpce: cannot open shared object file: No such file or directory'),context(...,_4360)))
ERROR: [17] <meta call>
ERROR: [16] with_mutex('$foreign',load_foreign_library(foreign(pl2xpce),pce_principal,default(install))) <foreign>
ERROR: [12] '$run_init_goal'('$syspreds':use_foreign_library_noi(...)) at /usr/lib/swipl/boot/init.pl:808
ERROR: [11] catch(system:'$run_init_goal'(...),_4498,system:'$initialization_error'(_4520,...,...)) at /usr/lib/swipl/boot/init.pl:561
ERROR: [10] catch_with_backtrace(system:'$run_init_goal'(...),_4556,system:'$initialization_error'(_4578,...,...)) at /usr/lib/swipl/boot/init.pl:628
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.
ERROR: Initialization goal '$syspreds':use_foreign_library_noi(pce_principal:foreign(pl2xpce)) raised exception:
ERROR: pl2xpce: cannot open shared object file: No such file or directory
ERROR: In:
ERROR: [28] throw(error(shared_object(open,'pl2xpce: cannot open shared object file: No such file or directory'),context(...,_12986)))
ERROR: [26] <meta call>
ERROR: [25] with_mutex('$foreign',load_foreign_library(foreign(pl2xpce),pce_principal,default(install))) <foreign>
ERROR: [21] '$run_init_goal'('$syspreds':use_foreign_library_noi(...)) at /usr/lib/swipl/boot/init.pl:808
ERROR: [20] catch(system:'$run_init_goal'(...),_13124,system:'$initialization_error'(_13146,...,-)) at /usr/lib/swipl/boot/init.pl:561
ERROR: [19] catch_with_backtrace(system:'$run_init_goal'(...),_13182,system:'$initialization_error'(_13204,...,-)) at /usr/lib/swipl/boot/init.pl:628
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.
ERROR: Failed to initialise the XPCE toolkit. This is normally
ERROR: caused by a missing or incompatible X11 library.
ERROR: See http://www.swi-prolog.org/build/issues/xpce.html
ERROR: Sorry, cannot recover from this. Process terminates.
I built the saved state using:
swipl -o xx --emulator=/usr/bin/swipl -c xx.pl
It produces a file that works in the original system where it was compiled.
When I run the file on another system, which uses an swi-prolog compilation that has no X11 support I get the error above because the xpce shared library is not present. However, the application does not use xpce at all, so it seems to me that boot/pce_principal.pl
should not have been included in the saved state because the application does not use X11 at all.