Recent

Author Topic: Debian removes FPC/Lazarus  (Read 55232 times)

zeljko

  • Hero Member
  • *****
  • Posts: 1905
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Debian removes FPC/Lazarus
« Reply #195 on: March 07, 2026, 04:05:40 pm »
I'd also like to try the IDE with GTK3 so I can let you know if I encounter any problems. I'm using Lazarus 4.6, should I use that or something else? If the tests have to be done with the trunk ones, I won't try it; I'll have to work on it.

No, for gtk3 you must use trunk lazarus. Manually git checkout and then build, or use fpcupdeluxe.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1225
Re: Debian removes FPC/Lazarus
« Reply #196 on: March 07, 2026, 04:38:01 pm »
[...] if the GTK2 package maintainers found that it would no longer work with the current kernel (including device driver modules) etc. and could get no help from the GTK developers [...]

is it the case that GTK2 has compatibility issues with the current Linux kernel? or upcoming kernels? or with any of the existing X11/etc libraries?

the only issue i've heard of involving GTK2 is that Wayland has issues with it - and that sounds like a problem within Wayland, not GTK2    ;)


btw: do we have any timeline for when GTK3 will be supported in a release of the Lazarus IDE on Sourceforge? probably a question for zeljko, but i don't want to put any pressure on him!

cheers,
rob   :-)
My plan is that Lazarus 5.0 will be gtk3 based on linux (so gtk3  = default). When ? Don't ask me that :)
Excellent information!
Fingers crossed!
Thanks.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4709
  • I like bugs.
Re: Debian removes FPC/Lazarus
« Reply #197 on: March 07, 2026, 07:07:49 pm »
If the tests have to be done with the trunk ones, I won't try it; I'll have to work on it.
C'mon, it is very easy to download and test. Something like this:

$ git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git
$ cd lazarus
$ make
$ ./lazarus --pcp=~/.lazarus_trunk &

The last pcp parameter ensures your trunk experiment uses a separate config dir (~/.lazarus_trunk) and does not interfere with the release version config.
Then build Lazarus for GTK3 from the Tools menu (Configure Build Lazarus).
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Fred vS

  • Hero Member
  • *****
  • Posts: 3873
    • StrumPract is the musicians best friend
Re: Debian removes FPC/Lazarus
« Reply #198 on: March 07, 2026, 08:07:30 pm »
If the tests have to be done with the trunk ones, I won't try it; I'll have to work on it.
C'mon, it is very easy to download and test. Something like this:

$ git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git
$ cd lazarus
$ make
$ ./lazarus --pcp=~/.lazarus_trunk &

The last pcp parameter ensures your trunk experiment uses a separate config dir (~/.lazarus_trunk) and does not interfere with the release version config.
Then build Lazarus for GTK3 from the Tools menu (Configure Build Lazarus).

Yep, nice commands and WOW @zeljko well done, Lazarus-GTK3 is working great.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

PascalDragon

  • Hero Member
  • *****
  • Posts: 6381
  • Compiler Developer
Re: Debian removes FPC/Lazarus
« Reply #199 on: March 08, 2026, 12:07:08 am »
the only issue i've heard of involving GTK2 is that Wayland has issues with it - and that sounds like a problem within Wayland, not GTK2    ;)

GTK2 doesn't have issues with Wayland, GTK2 doesn't support Wayland. It's a different display backend to X11 and thus needs completely new code to support it. So this is not a problem of Wayland, but a problem of GTK2 simply no longer being actively developed.

i disagree with your view. GTK2 predated Wayland by many years, therefore it is up to Wayland to change, not GTK2.

Wayland by itself does not care about GUI frameworks. Just like X11 by itself does not care about them. Both are just display protocols. And by design the Wayland display protocol is different from the X11 protocol. That's the whole point of it, because this way the developers hope to address the flaws of the X11 protocol.

was Wayland not designed with some level of compatibility, so that it would operate with other existing software? you seem to be suggesting that every time a 'chunk' of Linux is replaced it is ok for that to break every other chunk that interfaces with it. that is insane!!

Correct, the Wayland protocol itself was designed without compatibility.

presumably XWayland is a project that is 'tied in' with Wayland, hence XWayland can just be considered as the portion of Wayland that is responsible for communicating with GTK2 et al.

being that XWayland and Wayland are just different parts of the same thing, it seems to say that Wayland is in designed to interface with GTK2 et al, albeit that the design is imperfect - i'm assuming that the reports we hear of things not working right relate to the GTK2<->XWayland<->Wayland connections.

it sounds like PascalDragon saying "GTK2 doesn't support Wayland" is entirely false information; GTK2 is perfectly capable of talking to XWayland, which in turn is perfectly capable of talking to Wayland - apart from XWayland not doing a 100% perfect job.

No, Wayland and XWayland are not the same thing. XWayland is an X11 server implemented on top of Wayland together with some special side channels to allow functionality of X11 that Wayland itself does not support (like allowing applications to position windows which Wayland itself does not allow). Wayland, XWayland and X11 are developed by the same group of people (FreeDesktop.org), however they are nevertheless distinct projects. And XWayland is an optional component that can be uninstalled which in turn means that X11 applications (and thus GTK2 applications) will not work on a Wayland based system.

as for PascalDragon's claim that everything is "a problem of GTK2 simply no longer being actively developed" is, i am afraid to say, somewhat childish - and an insult against the GTK developers. the developers of GTK worked for years on GTK2 to bring it to a point of being a 'production ready' project. GTK2 is today a complete, working product, it has been this for around 5 years. Wayland/XWayland is a beta product that lacks the ability (at the moment) of slotting in as a substitute for X11.

No, it's not an insult to the GTK2 developers, it's simply how development of such frameworks is: The developers have simply moved on from GTK2 to GTK3 just like they had moved on from GTK1 and now they're moving on to GTK4. Same with Qt where the developers of Qt moved on from Qt3 to Qt4 to Qt5 and now Qt6. Same also with for example SDL where development is now happening in SDL3 while SDL1 is no longer developed and SDL2 is in maintenance mode. It's same with FPC: no one is putting any work anymore in the 1.99 compiler or the 2.4.0 compiler.

and i was pleased to read The Register thread, which largely encapsulates many of my own sentiments. i had not previously been aware of that thread, which amongst other things explains what i consider to be one of the practical problems between Lazarus and Qt:

Quote from: MarkMLl posting on TheRegister
Qt [...] needs a special shim library since FPC has the feature [...] that it can't interwork directly with code that uses C++ classes etc.
https://forums.theregister.com/forum/all/2026/02/26/debian_14_will_drop_gtk2/#c_5236355

i was not aware of this C++ issue. Mark - are you able to expand more on this outside of the thread? i would very much like to be able to statically bind libQt5Pas into a lazarus-created ELF binary, if it were possible.

FPC does not support the name mangling and the vtables that C++ classes require for correct functionality (*), thus a wrapper library (like Qt*Pas) is required that takes in the C++ API and provides it in turn as a C API that FPC can work with.

(*) To be more precise FPC supports some C++ mangling as well as primitive C++ classes in the form of the cppdecl calling convention and cppclass, however these are not usable enough for directly declaring a C++ class like the Qt ones.

to date no one has presented, not have i have found, any legal opinions that a 'shim' such as LibQtxPas provides any sort of legal protection against the Qt licensing terms, nor any legal opinions that preclude linking dynamically against Qt directly. i believe that said legal opinions are a fantasy invention, and challenge anyone who claims otherwise to  front up with said legal opinions.

to object to including Qt symbol names in an ELF binary file's dynamic symbol table (ie, linking dynamically against Qt directly, not via a shim), one would need to argue that the Qt folks held some copyright or registered trade mark over the symbol names themselves. such an argument would not hold up in any court of law - it would be tantamount to allowing the copyrighting of names such as Peter, Paul, Mark, and John, or numbers such as 379076547650851467.

The Qt core libraries that Lazarus requires (namely QtCore, QtGui and QtWidgets) are licensed as LGPL (this page shows which modules are licensed as GPL instead). The whole point of the LGPL compared to GPL is to allow dynamic linking, meaning the library code in question resides in a dynamic library (DLL on Windows, SO on Linux, DynLib on macOS) instead of statically inside the program module. The Qt*Pas modules are licensed with the same license as FPC's RTL and FCL or Lazarus' LCL, namely LGPL-with-static-linking-exception, meaning that you can statically link in that library even in a proprietary application. So as long as you use Qt itself using dynamic libraries it does not matter whether you use the Qt*Pas library dynamically or statically linked.

robert rozee

  • Sr. Member
  • ****
  • Posts: 363
Re: Debian removes FPC/Lazarus
« Reply #200 on: March 08, 2026, 12:49:34 am »
[...] So as long as you use Qt itself using dynamic libraries it does not matter whether you use the Qt*Pas library dynamically or statically linked.

thank you PascalDragon, this is useful information!

next question - how do i statically link the "Qt*Pas" library to my application? this is something i have never done before, and i have absolutely no idea how it is done.


cheers,
rob   :-)

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1225
Re: Debian removes FPC/Lazarus
« Reply #201 on: March 08, 2026, 01:04:37 am »
the only issue i've heard of involving GTK2 is that Wayland has issues with it - and that sounds like a problem within Wayland, not GTK2    ;)

GTK2 doesn't have issues with Wayland, GTK2 doesn't support Wayland. It's a different display backend to X11 and thus needs completely new code to support it. So this is not a problem of Wayland, but a problem of GTK2 simply no longer being actively developed.

i disagree with your view. GTK2 predated Wayland by many years, therefore it is up to Wayland to change, not GTK2.

Wayland by itself does not care about GUI frameworks. Just like X11 by itself does not care about them. Both are just display protocols. And by design the Wayland display protocol is different from the X11 protocol. That's the whole point of it, because this way the developers hope to address the flaws of the X11 protocol.

was Wayland not designed with some level of compatibility, so that it would operate with other existing software? you seem to be suggesting that every time a 'chunk' of Linux is replaced it is ok for that to break every other chunk that interfaces with it. that is insane!!

Correct, the Wayland protocol itself was designed without compatibility.

presumably XWayland is a project that is 'tied in' with Wayland, hence XWayland can just be considered as the portion of Wayland that is responsible for communicating with GTK2 et al.

being that XWayland and Wayland are just different parts of the same thing, it seems to say that Wayland is in designed to interface with GTK2 et al, albeit that the design is imperfect - i'm assuming that the reports we hear of things not working right relate to the GTK2<->XWayland<->Wayland connections.

it sounds like PascalDragon saying "GTK2 doesn't support Wayland" is entirely false information; GTK2 is perfectly capable of talking to XWayland, which in turn is perfectly capable of talking to Wayland - apart from XWayland not doing a 100% perfect job.

No, Wayland and XWayland are not the same thing. XWayland is an X11 server implemented on top of Wayland together with some special side channels to allow functionality of X11 that Wayland itself does not support (like allowing applications to position windows which Wayland itself does not allow). Wayland, XWayland and X11 are developed by the same group of people (FreeDesktop.org), however they are nevertheless distinct projects. And XWayland is an optional component that can be uninstalled which in turn means that X11 applications (and thus GTK2 applications) will not work on a Wayland based system.

as for PascalDragon's claim that everything is "a problem of GTK2 simply no longer being actively developed" is, i am afraid to say, somewhat childish - and an insult against the GTK developers. the developers of GTK worked for years on GTK2 to bring it to a point of being a 'production ready' project. GTK2 is today a complete, working product, it has been this for around 5 years. Wayland/XWayland is a beta product that lacks the ability (at the moment) of slotting in as a substitute for X11.

No, it's not an insult to the GTK2 developers, it's simply how development of such frameworks is: The developers have simply moved on from GTK2 to GTK3 just like they had moved on from GTK1 and now they're moving on to GTK4. Same with Qt where the developers of Qt moved on from Qt3 to Qt4 to Qt5 and now Qt6. Same also with for example SDL where development is now happening in SDL3 while SDL1 is no longer developed and SDL2 is in maintenance mode. It's same with FPC: no one is putting any work anymore in the 1.99 compiler or the 2.4.0 compiler.

and i was pleased to read The Register thread, which largely encapsulates many of my own sentiments. i had not previously been aware of that thread, which amongst other things explains what i consider to be one of the practical problems between Lazarus and Qt:

Quote from: MarkMLl posting on TheRegister
Qt [...] needs a special shim library since FPC has the feature [...] that it can't interwork directly with code that uses C++ classes etc.
https://forums.theregister.com/forum/all/2026/02/26/debian_14_will_drop_gtk2/#c_5236355

i was not aware of this C++ issue. Mark - are you able to expand more on this outside of the thread? i would very much like to be able to statically bind libQt5Pas into a lazarus-created ELF binary, if it were possible.

FPC does not support the name mangling and the vtables that C++ classes require for correct functionality (*), thus a wrapper library (like Qt*Pas) is required that takes in the C++ API and provides it in turn as a C API that FPC can work with.

(*) To be more precise FPC supports some C++ mangling as well as primitive C++ classes in the form of the cppdecl calling convention and cppclass, however these are not usable enough for directly declaring a C++ class like the Qt ones.

to date no one has presented, not have i have found, any legal opinions that a 'shim' such as LibQtxPas provides any sort of legal protection against the Qt licensing terms, nor any legal opinions that preclude linking dynamically against Qt directly. i believe that said legal opinions are a fantasy invention, and challenge anyone who claims otherwise to  front up with said legal opinions.

to object to including Qt symbol names in an ELF binary file's dynamic symbol table (ie, linking dynamically against Qt directly, not via a shim), one would need to argue that the Qt folks held some copyright or registered trade mark over the symbol names themselves. such an argument would not hold up in any court of law - it would be tantamount to allowing the copyrighting of names such as Peter, Paul, Mark, and John, or numbers such as 379076547650851467.

The Qt core libraries that Lazarus requires (namely QtCore, QtGui and QtWidgets) are licensed as LGPL (this page shows which modules are licensed as GPL instead). The whole point of the LGPL compared to GPL is to allow dynamic linking, meaning the library code in question resides in a dynamic library (DLL on Windows, SO on Linux, DynLib on macOS) instead of statically inside the program module. The Qt*Pas modules are licensed with the same license as FPC's RTL and FCL or Lazarus' LCL, namely LGPL-with-static-linking-exception, meaning that you can statically link in that library even in a proprietary application. So as long as you use Qt itself using dynamic libraries it does not matter whether you use the Qt*Pas library dynamically or statically linked.

Very important information.

Thanks.

Fred vS

  • Hero Member
  • *****
  • Posts: 3873
    • StrumPract is the musicians best friend
Re: Debian removes FPC/Lazarus
« Reply #202 on: March 08, 2026, 01:17:08 am »
as for PascalDragon's claim that everything is "a problem of GTK2 simply no longer being actively developed" is, i am afraid to say, somewhat childish - and an insult against the GTK developers. the developers of GTK worked for years on GTK2 to bring it to a point of being a 'production ready' project. GTK2 is today a complete, working product, it has been this for around 5 years. Wayland/XWayland is a beta product that lacks the ability (at the moment) of slotting in as a substitute for X11.

No, it's not an insult to the GTK2 developers, it's simply how development of such frameworks is: The developers have simply moved on from GTK2 to GTK3 just like they had moved on from GTK1 and now they're moving on to GTK4. Same with Qt where the developers of Qt moved on from Qt3 to Qt4 to Qt5 and now Qt6. Same also with for example SDL where development is now happening in SDL3 while SDL1 is no longer developed and SDL2 is in maintenance mode. It's same with FPC: no one is putting any work anymore in the 1.99 compiler or the 2.4.0 compiler.

Okay, this isn't meant as an insult to the GTK2 developers, but in my opinion, removing a set of widgets still used by many applications (especially many Lazarus apps, but also many others), some of which are real gems that are no longer updated because they're perfect, seems unfair.

But hey, it's their choice.

And thank you Sven for your always clear explanations.
« Last Edit: March 08, 2026, 01:19:52 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

MarkMLl

  • Hero Member
  • *****
  • Posts: 8563
Re: Debian removes FPC/Lazarus
« Reply #203 on: March 08, 2026, 08:45:47 am »
Wayland by itself does not care about GUI frameworks. Just like X11 by itself does not care about them. Both are just display protocols. And by design the Wayland display protocol is different from the X11 protocol. That's the whole point of it, because this way the developers hope to address the flaws of the X11 protocol.

There's an old saying (old, at least, by the standards of the industry) along the lines of X11 being the worst display protocol possible apart from everything else.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Schmitty2005

  • Jr. Member
  • **
  • Posts: 65
Re: Debian removes FPC/Lazarus
« Reply #204 on: March 08, 2026, 04:03:15 pm »
I'd also like to try the IDE with GTK3 so I can let you know if I encounter any problems. I'm using Lazarus 4.6, should I use that or something else? If the tests have to be done with the trunk ones, I won't try it; I'll have to work on it.

No, for gtk3 you must use trunk lazarus. Manually git checkout and then build, or use fpcupdeluxe.

Where should problems with GTK3 be reported ?  The forums ? or Bug Tracker ? Or both as needed ?

Ubuntu 24.04 LTS.  Using Wayland. 

EDIT : Error also occurs with X11.xorg
EDIT : Compiled with FPC 3.2.3 (Fixes branch) from FPCupDeluxe

EDIT: Also, as seen in the pic,  none of the Menu bar items are visible on the main menu bar.

I will delete my configs and try againNew configs make no difference, but I recompiled from using stable to trunk using FPCUPDELUXE and got this :

« Last Edit: March 08, 2026, 05:15:23 pm by Schmitty2005 »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4709
  • I like bugs.
Re: Debian removes FPC/Lazarus
« Reply #205 on: March 08, 2026, 04:47:40 pm »
I will delete my configs and try again, but I recompiled from using stable to trunk using FPCUPDELUXE and got this :
It says IDE 4.6. something went wrong.
You can create bug reports in bug tracker, but make them specific and include example code. If you are not sure if you found a bug or a feature, ask the forum first.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Schmitty2005

  • Jr. Member
  • **
  • Posts: 65
Re: Debian removes FPC/Lazarus
« Reply #206 on: March 08, 2026, 05:14:15 pm »
I will delete my configs and try again, but I recompiled from using stable to trunk using FPCUPDELUXE and got this :
It says IDE 4.6. something went wrong.
You can create bug reports in bug tracker, but make them specific and include example code. If you are not sure if you found a bug or a feature, ask the forum first.

There was no project or example code, this is simply rebuilding Lazarus with GTK3 instead of default QT5 or GTK2.  It is a lot better than it was several months ago, but still not usable. 

This was also built with FPC 3.2.3.  Should I be using  FPC 3.2.2 instead ?

dsiders

  • Hero Member
  • *****
  • Posts: 1592
Re: Debian removes FPC/Lazarus
« Reply #207 on: March 08, 2026, 06:28:34 pm »
I will delete my configs and try again, but I recompiled from using stable to trunk using FPCUPDELUXE and got this :
It says IDE 4.6. something went wrong.
You can create bug reports in bug tracker, but make them specific and include example code. If you are not sure if you found a bug or a feature, ask the forum first.

I'm quoting Juha, but it's intended for the original poster...

4.6 doesn't include the bulk of the GTK3 patches that have occurred lately. They're in trunk (4.99).

Schmitty2005

  • Jr. Member
  • **
  • Posts: 65
Re: Debian removes FPC/Lazarus
« Reply #208 on: March 08, 2026, 07:56:33 pm »
I will delete my configs and try again, but I recompiled from using stable to trunk using FPCUPDELUXE and got this :
It says IDE 4.6. something went wrong.
You can create bug reports in bug tracker, but make them specific and include example code. If you are not sure if you found a bug or a feature, ask the forum first.

I'm quoting Juha, but it's intended for the original poster...

4.6 doesn't include the bulk of the GTK3 patches that have occurred lately. They're in trunk (4.99).

I had a bit of an FPCUpDeluxe snafu that built 4.6, but I had trunk selected.  Thank you for the clarification.   I am going to assume that this should be built with 3.2.2, because 3.2.4 is unreleased at this point, and there is no known release date that I have seen.

Yes, trunk GTK3 seems functional with  minor issues.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6381
  • Compiler Developer
Re: Debian removes FPC/Lazarus
« Reply #209 on: March 09, 2026, 09:57:07 pm »
Okay, this isn't meant as an insult to the GTK2 developers, but in my opinion, removing a set of widgets still used by many applications (especially many Lazarus apps, but also many others), some of which are real gems that are no longer updated because they're perfect, seems unfair.

It's not the GTK developers who decide this, it's the distribution maintainers. Though to be fair the GTK developers would probably prefer for GTK2 to be long gone already and GTK3 being on the way out, considering that their preference is on GTK4 now... 🤔

 

TinyPortal © 2005-2018