Help build gtk on linux mint

Hello,
I am trying to build gtk on linux mint 20.3 Cinnamon).
$ meson setup --prefix /opt/gtk builddir
The Meson build system
Version: 0.53.2
Source dir: /home/gidi/git/gtk/gtk
Build dir: /home/gidi/git/gtk/gtk/builddir
Build type: native build

meson.build:1:0: ERROR: Meson version is 0.53.2 but project requires >= 0.63.0

I am trying to get the required version, it does not show in Updates Manager. Is it requiring upgrading my Linux mint version ? How do I download gtk source code that aligns with my Linux mint version ?

Thanks,
Gidi

I am trying to get the required version, it does not show in Updates Manager. Is it requiring upgrading my Linux mint version ?

If you’re building GTK from latest git, you will need newer version of GTK dependencies which mostly will not be present in older releases ( 20.3 etc ). So, building from git is a lot of work ( a.k.a - not possible ) in your case.

How do I download gtk source code that aligns with my Linux mint version ?

This involves adding deb-src entries in /etc/apt/sources.list, which can be done by

Menu -> Software Sources -> Enable the Source code repositories -> update the APT cache

If you just need the source code for the exact GTK version installed version on your system

$ apt-get source <libgtk-package-name>

If you want to build that version too:

Run as root:

# apt-get build-dep <libgtk-package-name>

Run as normal user:

$ apt-get source -b <libgtk-package-name>

Cheers!
Sid

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