Installing GTK

I have been trying to install GTK connection voor swi-prolog by command:

pack_install(plgi).

i get these errors below in the swi-prolog terminal,

Contacting server at https://www.swi-prolog.org/pack/query ... ok “plgi-1.1.0.tgz” was downloaded 36 times
Package: plgi
Title: PLGI - Prolog bindings for GLib/GObject/GIO/GTK+
Installed version: 1.1.0
Author: Keri Harris keri@gentoo.org
Download URL: http://dev.gentoo.org/~keri/plgi/plgi-*.tgz
Install “plgi-1.1.0.tgz” (147,814 bytes) Y/n?
ERROR: source_sink `path(autoheader)’ does not exist
ERROR: In:
ERROR: [24] throw(error(existence_error(source_sink,…),_73844))
ERROR: [20] process:process_create(path(autoheader),,[stdout(…),…|…]) at /usr/lib/swi-prolog/library/process.pl:263
ERROR: [19] prolog_pack:run_process(path(autoheader),,[directory(‘/home/drspro/.local/share/swi-prolog/pack/plgi’)]) at /usr/lib/swi-prolog/library/prolog_pack.pl:2203
ERROR: [18] prolog_pack:make_configure(‘/home/drspro/.local/share/swi-prolog/pack/plgi’,[build_foreign(if_absent),…|…]) at /usr/lib/swi-prolog/library/prolog_pack.pl:1122
ERROR: [17] prolog_pack:configure_foreign(‘/home/drspro/.local/share/swi-prolog/pack/plgi’,[build_foreign(if_absent),…|…]) at /usr/lib/swi-prolog/library/prolog_pack.pl:1102
ERROR: [16] prolog_pack:post_install_foreign(plgi,‘/home/drspro/.local/share/swi-prolog/pack/plgi’,[build_foreign(if_absent),…|…]) at /usr/lib/swi-prolog/library/prolog_pack.pl:1052
ERROR: [15] prolog_pack:pack_post_install(plgi,‘/home/drspro/.local/share/swi-prolog/pack/plgi’,[inquiry(true),…|…]) at /usr/lib/swi-prolog/library/prolog_pack.pl:1017
ERROR: [9]
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.
Exception: (17) prolog_pack:configure_foreign(‘/home/drspro/.local/share/swi-prolog/pack/plgi’, [build_foreign(if_absent), inquiry(true), pack(plgi), url(‘http://dev.gentoo.org/~keri/plgi/plgi-1.1.0.tgz’)]) ? abort
% Execution Aborted

Are you on Linux and have installed the requirements ?
At the time (5 years ago, how time flies!) I needed Keri’ help to fulfill a correct installation - specially for GObject Introspection…
Anyway, I have tried to install now (on a different machine), but I got an error in the test phase…

Install "plgi-1.1.0.tgz" (147,814 bytes) Y/n? 
% checking for a BSD-compatible install... 
% /usr/bin/install -c
% checking for gcc... 
% gcc
% checking whether the C compiler works... 
% yes
...
%    [CC]      plgi_namespace.o
%    [CC]      plgi_object.o
Warning: plgi_object.c: In function 'plgi_object_new__impl':
Warning: plgi_object.c:337:13: warning: implicit declaration of function 'g_object_new_with_properties'; did you mean 'g_object_info_get_n_properties'? [-Wimplicit-function-declaration]
Warning:    gobject = g_object_new_with_properties(object_gtype, n_parameters, names, gvalues);
Warning:              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Warning:              g_object_info_get_n_properties
Warning: plgi_object.c:337:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
Warning:    gobject = g_object_new_with_properties(object_gtype, n_parameters, names, gvalues);
Warning:            ^
%    [CC]      plgi_overrides.o
...
%    [GEN]     Regress-1.0.typelib
% LD_LIBRARY_PATH=. /home/carlo/lib/swipl/bin/x86_64-linux/swipl -f test.pl -g "run_tests,halt" -t "halt(0)"
% % PL-Unit: plgi_namespace 
% .
...
% .
% .
ERROR: ......... done
ERROR: % PL-Unit: plgi_marshaller_interface /home/carlo/lib/swipl/bin/x86_64-linux/swipl: symbol lookup error: /home/carlo/.local/share/swi-prolog/pack/plgi/src/plgi.so: undefined symbol: g_object_new_with_properties
% Makefile:131: recipe for target 'check' failed
...

Maybe the problem is not blocking, at least the simpler example seems to work…

yes I am on linux on ubuntu, i have tried this on 2 different ubuntu machines which give about the same ,

despite the errors, the plgi folder was installed, i tried to run the .pl examples, but that didnt work, maybe because the installation wasnt finished without errors. would be nice if it worked because with gtk you can graphically make anything, connect it to swi-prolog and run on windows, linux and mac os

GTK 2.2 was present on the system before i performed the installation

The error you see should be caused by missing the ‘autotools’ suite. Try installing what you see on this page. Copy and paste in console the full text of the sudo apt-get ... box. It should allow you to proceed. I think that after that you will need to install further the GTK dependencies.

ok great, thankyou for your answer, I will try to install the autotools and post the result

seems I’m in a bad position to help you further. Indeed on my system I should upgrade gtk2, since g_object_new_with_properties has been introduced in 2.54 and deprecated g_object_newv.