SWI-Prolog/swish

library/crypto.pl on OSX

Closed this issue · 1 comments

Hi :)
I would like to install trill on prolog, call swipl on my OSX mojave 10.14.6 (18G95), get the prolog prompt and issue:

pack_install(trill).

After that my swipl installation tells me (see below) I need some libraries (which are located besides swipl like /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/crypto4pl.so) which are (?) missing, so the import stops here.

What can/should I do please in order to cleanly install trill? (I am having other problems using the docker variant of swish - but one thing after another ...)

Here what my swipl says after trying to install (hope that helps a bit):

Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.2)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?- pack_install(trill).
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/crypto.pl:68:
/Applications/SWI-Prolog.app/Contents/swipl/library/crypto.pl:68: Initialization goal raised exception:
dlopen(/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/crypto4pl.so, 1): Library not loaded: @rpath/libcrypto.1.1.dylib
Referenced from: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/crypto4pl.so
Reason: image not found
In:
[95] throw(error(shared_object(open,'dlopen(/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/crypto4pl.so, 1): Library not loaded: @rpath/libcrypto.1.1.dylib\n Referenced from: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/crypto4pl.so\n Reason: image not found'),context(...,_5506)))
[93]
[92] with_mutex('$foreign',load_foreign_library(foreign(crypto4pl),crypto,default(install)))
[89] '$run_init_goal'(shlib:load_foreign_library(...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:618
[88] catch(system:'$run_init_goal'(...),_5632,system:'$initialization_error'(_5654,...,...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:386
[87] catch_with_backtrace(system:'$run_init_goal'(...),_5684,system:'$initialization_error'(_5706,...,...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:436

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:rsa_public_encrypt/4 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:crypto_n_random_bytes/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:crypto_name_curve/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:rsa_private_decrypt/4 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:rsa_private_encrypt/4 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:57:
Exported procedure crypto:rsa_public_decrypt/4 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:59:
/Applications/SWI-Prolog.app/Contents/swipl/library/ssl.pl:59: Initialization goal raised exception:
dlopen(/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/ssl4pl.so, 1): Library not loaded: @rpath/libssl.1.1.dylib
Referenced from: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/ssl4pl.so
Reason: image not found
In:
[72] throw(error(shared_object(open,'dlopen(/Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/ssl4pl.so, 1): Library not loaded: @rpath/libssl.1.1.dylib\n Referenced from: /Applications/SWI-Prolog.app/Contents/swipl/lib/x86_64-darwin/ssl4pl.so\n Reason: image not found'),context(...,_7328)))
[70]
[69] with_mutex('$foreign',load_foreign_library(foreign(ssl4pl),ssl,default(install)))
[66] '$run_init_goal'(shlib:load_foreign_library(...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:618
[65] catch(system:'$run_init_goal'(...),_7454,system:'$initialization_error'(_7476,...,...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:386
[64] catch_with_backtrace(system:'$run_init_goal'(...),_7506,system:'$initialization_error'(_7528,...,...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:436

Note: some frames are missing due to last-call optimization.
Re-run your program in debug mode (:- debug.) to get more detail.
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:load_crl/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:load_private_key/3 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:load_public_key/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:load_certificate/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:system_root_certificates/1 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:ssl_peer_certificate_chain/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:ssl_peer_certificate/2 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:ssl_negotiate/5 is not defined
ERROR: /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_ssl_plugin.pl:37:
Exported procedure ssl:ssl_session/2 is not defined
% Contacting server at https://www.swi-prolog.org/pack/query ...
ERROR: Undefined procedure: ssl:'_ssl_context'/4
ERROR: However, there are definitions for:
ERROR: ssl:ssl_context/3
ERROR:
ERROR: In:
ERROR: [19] throw(error(existence_error(procedure,...),context(...,_2698)))
ERROR: [17] catch(http:http_protocol_hook(https,...,(0x7ff547f3c530,0x7ff547f3c670),_2742,...),error(existence_error(procedure,...),context(...,_2762)),http_open:(...,...)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:387
ERROR: [16] http_open:try_http_proxy(direct,[uri('https://www.swi-prolog.org/pack/query'),...|...],_2808,[cacert_file(...),...|...]) at /Applications/SWI-Prolog.app/Contents/swipl/library/http/http_open.pl:425
ERROR: [14]
ERROR: [13] '$sig_atomic'(prolog_pack:http_open('https://www.swi-prolog.org/pack/query',_2902,...))
ERROR: [12] setup_call_catcher_cleanup(prolog_pack:http_open('https://www.swi-prolog.org/pack/query',_2946,...),prolog_pack:read_reply(_2958,_2960,_2962),_2932,prolog_pack:close(_2972)) at /Applications/SWI-Prolog.app/Contents/swipl/boot/init.pl:469
ERROR: [10] prolog_pack:query_pack_server(locate(trill),_3004,[]) at /Applications/SWI-Prolog.app/Contents/swipl/library/prolog_pack.pl:1736
ERROR: [9] prolog_pack:pack_default_options(trill,trill,[],_3046) at /Applications/SWI-Prolog.app/Contents/swipl/library/prolog_pack.pl:516
ERROR: [8] prolog_pack:pack_install(trill) at /Applications/SWI-Prolog.app/Contents/swipl/library/prolog_pack.pl:457
ERROR: [7]
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.

Seems unrelated to trill. The hosting Prolog system doesn't have library(ssl), typically because it was explicitly without or the dependency (OpenSSL) was not installed when Prolog was built. Use ?- check_installation. in Prolog to check the system is complete.