Tiny Core Extensions > TCE Talk

gtk4 extension on armv7l (RaspberryPi)

(1/4) > >>

yvs:
Hi everyone,

trying to compile gtk4 app on RaspberryPi3B+ (armv7l) got these complains from pkg-config:

--- Quote ---% pkg-config --cflags gtk4

Package xcursor was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcursor.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcursor', required by 'gtk4', not found

Package xcomposite was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcomposite.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcomposite', required by 'gtk4', not found

Package xinerama was not found in the pkg-config search path.
Perhaps you should add the directory containing `xinerama.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xinerama', required by 'gtk4', not found

--- End quote ---

After added 'libXcursor-dev libXcomposite-dev libXinerama-dev' to gtk4-dev dependencies
building started and quickly finished because of GTK_MAJOR_VERSION is less than 4. It became a bit confusing.
Then toggling off GTK4 version checking I got (despite that gtk3.98.2 is almost gtk4) there's still too mush difference in API, too many functions need to be replaced or rewritten in gtk3 style to get it works, not sure if gtk3.98 should be named gtk4 (after trying to adapt gtk4 code to gtk3.98.2 api).

Has anyone tried to build a bit more compat gtk4 extension for armv7l? (to not spend time on it if that's unlikely to build successfully)

Rich:
Hi yvs
Unfortunately, when some packages change major versions (i.e. 3.x.x to 4.x.x) it
causes breakage elsewhere.


--- Quote from: yvs on July 07, 2024, 07:54:03 PM --- ... (despite that gtk3.98.2 is almost gtk4) ...
--- End quote ---
I think version numbering can continue to go up like this:

--- Code: ---gtk3.98.2
gtk3.99.0
gtk3.100.0
 ...
gtk3.150.0
 ...
gtk3.200.0
 ...
gtk3.500.0
--- End code ---


--- Quote --- ... not sure if gtk3.98 should be named gtk4 ...
--- End quote ---
GTK version numbers are used to document changes. You can't just arbitrarily
rename GTK like that.

Maybe try finding a slightly older version of the app that depends on an
older version of GTK.

It's also possible there was some kind of packaging error. I unpacked
gtk4-dev.tcz and the  pkgconfig/gtk4.pc  file contained the following:

--- Code: --- ----- Snip -----
gtk_binary_version=4.0.0
gtk_host=arm-linux

Name: GTK
Description: GTK Graphical UI Library
Version: 3.98.2
 ----- Snip -----
--- End code ---
I don't know enough about it to say one way or the other, but
based on what I see in the x86_64 versions of gtk3-dev and
gtk4-dev, I'd expect the  UI Library Version  number should be
greater than or equal to the  gtk_binary_version  number.

Maybe Juanito can provide more insight.

Juanito:
As you’ve discovered, the gtk4 extension is a very early version, updating it to something more recent would probably involve updating some of its dependencies as well.

I can take a look, but it wouldn’t be before a week or so.

yvs:
@Rich
> Maybe try finding a slightly older version of the app that depends on an older version of GTK.
>
  Gtk is a bit oversophisticated, gtk2/3/4 could be considered as toolkits with different concepts and distinct API, so that an app for gtk2 or gtk3 it's rather different one.  If I got it correctly gtk3.9x is a transit version (already not gtk3 but not gtk4 yet), suppose that it's easier to build needed libs than adapt to transit versions.

@Juanito
> updating it to something more recent would probably involve updating some of its dependencies as well.
>
  On purpose of test on RPI3B+ I've locally built gtk4.12.5 (last one that's not overvulkanised and still with default GL renderer) completed with cairo and pango update too, it works (at least with a couple apps that I tried to build and run).

Juanito:
gtk4 updated on piCore-15.x

gtk4 is at the limit of slowness on an RPi3 as gtk4-widget-factory shows.

Navigation

[0] Message Index

[#] Next page

Go to full version