Hello Group,
I need help installing packs in SWI-Prolog.
I want to install the mqtt pack but I only get an error while installing.
?- pack_install(mqtt).
% Contacting server at
http://www.swi-prolog.org/pack/query ... ok
Install mq...@1.0.5 from
https://github.com/olsky/swi-mqtt-pack/releases/download/v1.0.5/mqtt-1.0.5.zip Y/n?
% Contacting server at
http://www.swi-prolog.org/pack/query ... ok
% "mqtt-1.0.5.zip" was downloaded 16 times
Package: mqtt
Title: mqtt - pub/sub pack for SWI-Prolog using mosquitto
Installed version: 1.0.5
Author: Oleh Lozynskyy <
oleh.lozyn...@gmail.com>
Maintainer: Oleh Lozynskyy <
oleh.lozyn...@gmail.com>
Packager: Oleh Lozynskyy <
oleh.lozyn...@gmail.com>
Home page:
https://github.com/olsky/swi-mqtt-packDownload URL:
https://github.com/olsky/swi-mqtt-pack/releases/download/v1.0.5/mqtt-1.0.5.zipInstall "mqtt-1.0.5.zip" (112,144 bytes) Y/n?
ERROR: c/mqtt.c:14:10: fatal error: SWI-Stream.h: No such file or directory
ERROR: #include <SWI-Stream.h>
ERROR: ^~~~~~~~~~~~~~
ERROR: compilation terminated.
ERROR: make: *** [<builtin>: c/mqtt.o] Error 1
% gcc -O2 -g -Wall -fno-strict-aliasing -pthread -fPIC -std=c99 -I. -Iext/include -c -o c/mqtt.o c/mqtt.c
ERROR: Process "process(path(make),[all])": exit status: 2
ERROR: In:
ERROR: [19] throw(error(process_error(...,...),_57374))
ERROR: [17] '$apply':forall(prolog_pack:member(all,...),prolog_pack:run_process(...,...,...)) at c:/program files/swipl/boot/
apply.pl:51ERROR: [13] prolog_pack:pack_post_install(mqtt,'c:/program files/swipl/pack/mqtt',[inquiry(true),...|...]) at c:/program files/swipl/library/
prolog_pack.pl:1008ERROR: [7] <user>
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.
If I understand the error correct it fails to find the SWI-Stream.h file. I found the file in my SWI-Prolog installation in the swipl/include folder.
And if I understand the gcc command then the -I parameter adds folders where the make searches for .h files. So i copied the file in swipl/ext/include, but that didn't work either.
So I am guessing that either the pack configurations or my System configuration is not correct. Can someone help me with that?
To change the pack files I downloaded them and tried to install the pack from my harddrive but that didnt't work either.
I unzipped the pack in the folder C:\mqtt and have it as a zip in C:\mqtt.zip. So I tried
?- pack_install('file://C:/mqtt').
false.
?- pack_install('file://C:/mqtt.zip').
false.
and as you can see got only false as response. So I am doing something wrong here too.
My System:
Windows x64
SWI-Prolog 7.6.4
swipl --dump-runtime-variables
CC="gcc";
PLBASE="c:/program files/swipl";
PLARCH="x64-win64";
PLLIBS="";
PLLIB="-lswipl";
PLCFLAGS="";
PLLDFLAGS="";
PLSOEXT="dll";
PLSOPATH="PATH";
PLVERSION="70604";
PLSHARED="yes";
PLTHREADS="yes";