Installing gtk4 for testing on /opt II

Again I missed the 14 day response time by a few hours :frowning:

jtojnarJan Tojnar

I just tried what you suggested as

meson --prefix /opt/gtk builddir
ninja -C builddir
ninja -C builddir install

So I did

rm -rf /opt/gtk
rm -rf gtk
git clone https://gitlab.gnome.org/GNOME/gtk.git
cd gtk
meson --prefix /opt/gtk builddir

But that results in

meson.build:358:2: ERROR: Inconsistency: Subproject has overriden the dependency with another variable than 'libpangoft2_dep'

So that recipe is too simple. I have no idea what the concrete problem is, but I think I have to fall back to my initial solution, hope that that one will still work.

And I now get the same error with my initial install script!

Maybe my meson is broken?

$ meson -v
0.54.1

Or maybe GTK4 now requires pango 1.45, what is not available?

Dependency pango from subproject subprojects/pango found: YES 1.45.0
Dependency fribidi found: YES 1.0.9 (cached)
Pkg-config binary for MachineChoice.HOST is cached.
Determining dependency 'pangoft2' with pkg-config executable '/usr/bin/pkg-config'
PKG_CONFIG_PATH: /opt/gtk/lib64/pkgconfig
Called `/usr/bin/pkg-config --modversion pangoft2` -> 0
1.42.4
PKG_CONFIG_PATH: /opt/gtk/lib64/pkgconfig
Called `/usr/bin/pkg-config --cflags pangoft2` -> 0
-I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/lib64/libffi/include -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
PKG_CONFIG_PATH: /opt/gtk/lib64/pkgconfig
Called `/usr/bin/pkg-config pangoft2 --libs` -> 0
-L/usr/lib64 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
PKG_CONFIG_PATH: /opt/gtk/lib64/pkgconfig
Called `/usr/bin/pkg-config pangoft2 --libs` -> 0
-lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype
Using 'PKG_CONFIG_PATH' from environment with value: '/opt/gtk/lib64/pkgconfig'
Run-time dependency pangoft2 found: YES 1.42.4
Dependency pangoft2 found: YES 1.42.4 (cached)

meson.build:358:2: ERROR: Inconsistency: Subproject has overriden the dependency with another variable than 'libpangoft2_dep'

I feel you, I am subscribed to hundreds of open source projects so it may sometimes take more that two weeks to follow up. Discourse already has β€œthis topic is old” warning to discourage necro-bumps so I feel force closing is more annoying than necessary.

Regardng the error, Meson 0.54 started caching dependencies so it would notice inconsistencies like this. Perhaps GTK/Pango still did not catch up? Try downgrading Meson to 0.53.2.

1 Like

Thanks for your reply.

Yes, I will try downgrading Meson, I think my gentoo box upgraded it recently.

If that will not help then I will use gtk 3.98.3 git tag, as that worked some weeks ago. From the gtk readme I got the impression that current gtk is already 3.98.4.

Indeed, it is an issue with meson 0.54.1. Downgrading to 0.53.1 has fixed the issue.

And your simple instructions for GTK4 install works indeed, I did

cd
rm -rf /opt/gtk
rm -rf gtk
git clone https://gitlab.gnome.org/GNOME/gtk.git
cd gtk
meson --prefix /opt/gtk builddir
ninja -C builddir
ninja -C builddir install

and I can launch gtk4-demo with

GSETTINGS_SCHEMA_DIR=/opt/gtk/share/glib-2.0/schemas /opt/gtk/bin/gtk4-demo

During install there where a few error messages, but I ignored them and can not remember the content now.

Please open an issue on GTK issue tracker so the developers can fix it:

https://gitlab.gnome.org/GNOME/gtk/issues

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.