Is GTK4 Package Available for Debian, What Am I Doing? (Wrong)

Hi All,

It would appear from the /docs/installations/linux/ page,
that the Gtk 4.0 package is available for Debian Linux!!

Is this true?

I may be spoiled, but last year I did not have to build Gtk 3, and now I’m hoping to skip having to build Gtk 4.

When I originally got started with Gtk last year, I easily installed Gtk3.0 from a package, by using a command from Simon Long’s book, “An Introduction to C & GUI Programming.”

The command as shown in his book is as follows…
He says…
Type: sudo apt-get install libgtk2.0-dev

… into a terminal window and answer yes to any prompts to install the developer libraries for GTK 2.

At the time, I simply changed the ‘2’ to a ‘3’ and successfully installed Gtk 3.0!!

QUESTION:
Is there a reason I cannot seem to do the same sort of thing to install Gtk 4.0?

I try typing: sudo apt-get install libgtk4.0-dev

…and get as a result:
E: Unable to locate package Libgtk4.0-dev
E: Couldn’t find any package by glob ‘libgtk4.0-dev’
E: Couldn’t find any package by regex ‘libgtk4.0-dev’

I also tried typing:
sudo apt-get install libgtk-4-0-dev
and
sudo apt-get- install libgtk-4-0

but I get a result of:
E: Unable to locate package libgtk-4-0-dev (or libgtk-4-0, respectively)

Clearly I am doing something wrong.

If the Gtk4 package is not available for Debian, does anyone have an estimated ETA?

Much appreciated / thanks in advance,

Roark

Hej,

you can use Debian’s package search website for this:

https://packages.debian.org/search?searchon=sourcenames&keywords=gtk%2B4.0

Currently Debian only has an outdated version of GTK4 in Debian experimental, so I suppose you’re better off building a recent version yourself.

Hello and thank you for your reply.

I would not know where to begin to build Gtk4 for Debian, and since it was done for Gtk2 and Gtk3, I suppose I will wait. If Gtk4 is serious about remaining relevant (and likewise for Debian), either or both parties will fix this.

Regards,
Roark

Respectfully, I would say to the Gtk4 team: Application developers should not be required to come up with their own custom build for Gtk, each time there is a major release, in order to utilize the features.

I have seen this sort of lack of support in the industry many times over. I have watched as platforms that are mismanaged, ultimately fall from grace. Quickly in some cases, gradually in others.

If a platform is to succeed, the developer should be able focus on developing the application at hand, not building the development software.

At first glance ( docs.gtk.org/gtk4/building.html page ) it would appear to be rather involved to build Gtk4 with the possibility of many errors along the way.

With Simon Long’s book, “An Introduction To C & GUI Programmng”, I was off and running, after easily installing the Gtk3 package.

Now, every developer is required to build Gtk4?
I am rather disappointed.

The GTK developers are not responsible for downstream packaging of GTK. If a Linux distribution does not ship recent GTK packages, you will have to ask the distribution developers.

If you want to use GTK4 regardless of whether a Linux distribution provides packagers for it, we recommend using the GNOME 40 run time for Flatpak, or the nightly SDK build for more bleeding edge dependencies.

GTK3 was released 10 years ago; it’s not unusual that a 10 years old library is more commonly available than on released 6 months ago.

Well, if you are interested in building GTK4 yourself probably here will be a good start for you.

FYI, it seems Debian has renamed the package as “gtk4” instead of “gtk+4” : Debian -- Package Search Results -- gtk4

gtk4 package is available on experimental with version 4.0.3 currently

1 Like

Yes, it is the same version that is now available in Ubuntu 21.04 (based on Debian) and the package name is libgtk-4-dev.

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