[giraffe-user] Hello World

Phil Clayton phil.clayton at veonix.com
Tue Feb 20 09:53:23 CST 2024


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 
> <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



More information about the giraffe-user mailing list