From g.buday at sheffield.ac.uk Tue Feb 20 04:53:59 2024 From: g.buday at sheffield.ac.uk (Gergely Buday) Date: Tue, 20 Feb 2024 10:53:59 +0000 Subject: [giraffe-user] Hello World Message-ID: Hi there, I was able to compile the Gtk Hello World example at https://giraffelibrary.org/eg-gtk3-hello-world.html but only with a Poly/ML 5.9, installed from sources on my Ubuntu. I don't know enough makefiles and pkg config, could you help me what the problem is with other versions of Poly/ML? - Gergely -------------- next part -------------- An HTML attachment was scrubbed... URL: From g.buday at sheffield.ac.uk Tue Feb 20 09:42:47 2024 From: g.buday at sheffield.ac.uk (Gergely Buday) Date: Tue, 20 Feb 2024 15:42:47 +0000 Subject: [giraffe-user] Hello World Message-ID: Hi there, I was able to compile the Gtk Hello World example at https://giraffelibrary.org/eg-gtk3-hello-world.html but only with a Poly/ML 5.9, installed from sources on my Ubuntu. I don't know enough makefiles and pkg config, could you help me what the problem is with other versions of Poly/ML? - Gergely -------------- next part -------------- An HTML attachment was scrubbed... URL: From phil.clayton at veonix.com Tue Feb 20 09:53:23 2024 From: phil.clayton at veonix.com (Phil Clayton) Date: Tue, 20 Feb 2024 15:53:23 +0000 Subject: [giraffe-user] Hello World In-Reply-To: References: Message-ID: <42bfcf30-7115-d0af-99b6-8bfb0133a80d@veonix.com> On 20/02/2024 10:53, Gergely Buday wrote: > Hi there, > > I was able to compile the Gtk Hello World example at > > https://giraffelibrary.org/eg-gtk3-hello-world.html > > > but only with a Poly/ML 5.9, installed from sources on my Ubuntu. > > I don't know enough makefiles and pkg config, could you help me what the > problem is with other versions of Poly/ML? Poly/ML 5.7.1 should be fine. Unfortunately, the Ubuntu package is missing the polyml.pc file so pkg-config cannot provide the required linker flags. This would cause the following error message: Package polyml was not found in the pkg-config search path. Perhaps you should add the directory containing `polyml.pc' to the PKG_CONFIG_PATH environment variable No package 'polyml' found I reported this issue a while ago (https://bugs.launchpad.net/ubuntu/+source/polyml/+bug/1947789) but the package seems to be unmaintained. For GTK programs, the linking must be done explicitly because `polyc` has no mechanism to pass in additional linker flags relating to GTK libraries. There is no issue with the Fedora packages, which provide an up-to-date Poly/ML. Alternatively it should not be too hard to work with a manual installation of Poly/ML, e.g. build and install using ./configure --prefix=/opt/polyml/5.9 make sudo make install and then add the following to ~/.bash_profile: # Poly/ML PATH=/opt/polyml/5.9/bin:${PATH} LD_LIBRARY_PATH=/opt/polyml/5.9/lib:${LD_LIBRARY_PATH} PKG_CONFIG_PATH=/opt/polyml/5.9/lib/pkgconfig:${PKG_CONFIG_PATH} ... export LD_LIBRARY_PATH export PKG_CONFIG_PATH Phil