Recent

Author Topic: GTK3 additional dependancies ?  (Read 4457 times)

dbannon

  • Hero Member
  • *****
  • Posts: 3016
    • tomboy-ng, a rewrite of the classic Tomboy
GTK3 additional dependancies ?
« on: November 12, 2023, 10:19:16 am »
The release notes for Lazarus 3.0 indicate -
Quote
    Gtk3 pascal bindings are completely reworked.
    A number of stability improvements.

But I find it will no longer build even the basic one button form.

Code: [Select]
.....
(1002) Target OS: Linux for x86-64
(3104) Compiling GTK3Tiny.lpr
(3104) Compiling unit1.pas
....
(9015) Linking /home/dbannon/Pascal/GTK3Tiny/GTK3Tiny
/usr/bin/ld: /home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/units/x86_64-linux/gtk3/lazgtk3.o: in function `GET_ID':
/home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/interfaces//gtk3/gtk3bindings/lazgtk3.pas:30346: undefined reference to `gtk_plug_accessible_get_id'
/usr/bin/ld: /home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/units/x86_64-linux/gtk3/lazgtk3.o: in function `EMBED':
/home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/interfaces//gtk3/gtk3bindings/lazgtk3.pas:31991: undefined reference to `gtk_socket_accessible_embed'
/usr/bin/ld: /home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/units/x86_64-linux/gtk3/lazglib2.o: in function `GET_ADDED_DATE_TIME':
/home/dbannon/bin/Lazarus/lazarus-fixes_3_0/lcl/interfaces//gtk3/gtk3bindings/lazglib2.pas:5954: undefined reference to `g_bookmark_file_get_added_date_time'
// and lots more.
....
/home/dbannon/Pascal/GTK3Tiny/GTK3Tiny.lpr(21,1) Error: (9013) Error while linking
/home/dbannon/Pascal/GTK3Tiny/GTK3Tiny.lpr(21,1) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /home/dbannon/bin/FPC/fpc-3.2.2/bin/ppcx64 returned an error exitcode

Now, that looks like missing dev libraries but I cannot see how to identify just what those libraries are. The GTK3 wiki pages have not been touched for a couple of years, I have not seen any announcements about GTK3 here, the Gnome documentation describes the functions but not which library they appear in. I don't know where else to look.

I used to be able to build a quite large app in GTK3 with just libgtk-3-dev, much of it did not work but at least it built.

Any suggestions as to what is now needed ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

AmatCoder

  • Jr. Member
  • **
  • Posts: 59
    • My site
Re: GTK3 additional dependancies ?
« Reply #1 on: November 12, 2023, 04:12:35 pm »
gtk_plug_accessible_get_id/gtk_socket_accessible_embed require GTK >= 3.24.24

g_bookmark_file_get_added_date_time requires Glib >= 2.66

Are you using Ubuntu 20.04 (focal) or Debian 10 (buster)?
These distributions do not meet the requirements...

dbannon

  • Hero Member
  • *****
  • Posts: 3016
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK3 additional dependancies ?
« Reply #2 on: November 12, 2023, 11:29:01 pm »

Wow, thanks AmatCoder. Is this documented somewhere ? Numbers seems a bit strange -

gtk_plug_accessible_get_id/gtk_socket_accessible_embed require GTK >= 3.24.24
Debian bullseye has bullseye (libs): 3.24.24-4+deb11u3. Ubuntu 2004 has 3.24.20-0ubuntu1.1 so it does not quite make the cut. I use Ubuntu 2004 because of the glibc symbol problem, sigh ....

g_bookmark_file_get_added_date_time requires Glib >= 2.66
Do you mean glib2.0 ? bullseye (libs): 2.66.8-1 so it should be OK.
Or glibc ? Trixie uses glibc 2.37 so 2.66 is a a way off yet.

Anyway, sounds like there is now a minimal version of GTK-3 and glibc/glib2.0, that does deserve a mention in the Lazarus 3.0 release notes. Can you point to some docs please ?

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

AmatCoder

  • Jr. Member
  • **
  • Posts: 59
    • My site
Re: GTK3 additional dependancies ?
« Reply #3 on: November 13, 2023, 09:35:31 am »
Do you mean glib2.0 ? bullseye (libs): 2.66.8-1 so it should be OK.
Yes.

Can you point to some docs please ?
Sure:
Commit from Gtk adding 'gtk_plug/socket_accessible_*' functions
You can see the versions of Gtk that supports these functions clicking on Tags containing commit.
In 3.24.24.news file this change is referenced as "Add a11y support to GtkPlug/GtkSocket".

Commit from GLib adding 'g_bookmark_file_*' functions
Same. This is even in docs: "Available since: 2.66"

Anyway, sounds like there is now a minimal version of GTK-3 and glibc/glib2.0
This commit from Lazarus leaves no doubt.

dbannon

  • Hero Member
  • *****
  • Posts: 3016
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK3 additional dependancies ?
« Reply #4 on: November 13, 2023, 11:28:59 am »
Yep, I just confirmed that. Works on Debian Bullseye.  Ubuntu 22.04 looks OK too. So I will add something to the release notes for 3.0, most current distros will be fine, Ubuntu 2004 and RedHat might be the only real problems.

Lots of people, like me, stuck on U2004 (still under std support for more than a year) because of the bloat in later Ubuntu releases. This might just push me to Debian Bookworm....

Thanks AmatCoder

PS, wow, GTK3 sure has made some progress in the last few months, my app is recognisable, still some problems but good progress !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

zeljko

  • Hero Member
  • *****
  • Posts: 1638
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GTK3 additional dependancies ?
« Reply #5 on: November 13, 2023, 12:01:50 pm »
Cannot build on LinuxMint 20.3 too, seem that gtk3 can be built on new distros only.

dbannon

  • Hero Member
  • *****
  • Posts: 3016
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK3 additional dependancies ?
« Reply #6 on: November 13, 2023, 12:45:41 pm »
Yeah, I expect Mint 20.3 was based on U2004.

U2004 was the last supported 32bit machine as well.

But Debian Bullseye is OK so many of the other derivatives will be OK.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018