I built SWI-Prolog on my Linux computer (openSUSE Tumbleweed) by running these exact commands:
git clone https://github.com/SWI-Prolog/swipl-devel.git
cd swipl-devel
git submodule update --init
cd swipl-devel
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/logic ..
make
ctest -j 4
sudo make install
I passed every test from the ctest -j 4 command.
Now when I start swipl and run emacs. I get this error: ERROR: Unknown procedure: emacs/0 (DWIM could not correct goal). On my previous install of SWI-Prolog I had once tried to use PceEmacs and gotten this same error but didn’t think much of it and moved on. That was several months ago.
The only information I can find on this error is from this Stack Overflow post, which doesn’t actually provide a solution to the problem.
@?- check_installation.
% Checking your SWI-Prolog kit for common issues ...
%
% Version: ............. 8.3.10-10-gc2e4524a3
% Address bits: ........ 64
% Architecture: ........ x86_64-linux
% Installed at: ........ /usr/local/logic/lib/swipl
% Cores: ............... 8
%
% Checking tcmalloc ............................ not present
Warning: See http://www.swi-prolog.org/build/issues/tcmalloc.html
% Checking gmp ................................. ok
% Loading library(archive) ..................... ok
% Supported filters: bzip2, compress, gzip, grzip, lrzip, lzip, lzma, lzop, none, rpm, uu, xz
% Supported formats: 7zip, ar, cab, cpio, empty, gnutar, iso9660, lha, mtree, rar, raw, tar, xar, zip
% Loading library(cgi) ......................... ok
% Loading library(crypt) ....................... ok
Warning: library(bdb) .......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/bdb.html
% Loading library(double_metaphone) ............ ok
% Loading library(filesex) ..................... ok
% Loading library(http/http_stream) ............ ok
% Loading library(http/json) ................... ok
% Loading library(http/jquery) ................. ok
% jQuery from /usr/local/logic/lib/swipl/library/http/web/js/jquery-1.11.3.min.js
% Loading library(isub) ........................ ok
Warning: library(jpl) .......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/jpl.html
% Loading library(memfile) ..................... ok
Warning: library(odbc) ......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/odbc.html
Warning: library(pce) .......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/xpce.html
% Loading library(pcre) ........................ ok
% Loading library(pdt_console) ................. ok
% Loading library(porter_stem) ................. ok
% Loading library(process) ..................... ok
% Loading library(protobufs) ................... ok
Warning: library(editline) ..................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/editline.html
% Loading library(readline) .................... ok
% Loading library(readutil) .................... ok
% Loading library(rlimit) ...................... ok
% Loading library(semweb/rdf_db) ............... ok
% Loading library(semweb/rdf_ntriples) ......... ok
% Loading library(semweb/turtle) ............... ok
% Loading library(sgml) ........................ ok
% Loading library(sha) ......................... ok
% Loading library(snowball) .................... ok
% Loading library(socket) ...................... ok
% Loading library(ssl) ......................... ok
% Loading library(crypto) ...................... ok
% Loading library(syslog) ...................... ok
% Loading library(table) ....................... ok
% Loading library(time) ........................ ok
% Loading library(tipc/tipc) ................... ok
% Loading library(unicode) ..................... ok
% Loading library(uri) ......................... ok
Warning: library(uuid) ......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/uuid.html
% Loading library(zlib) ........................ ok
Warning: library(yaml) ......................... NOT FOUND
Warning: See http://www.swi-prolog.org/build/issues/yaml.html
Warning: Found 8 issues.
true.
You need library(pce) for the tools. You probably also want library(editline) for the command line editing. The other reported problems are optional components.