Recent

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

tk

  • Sr. Member
  • ****
  • Posts: 386
Re: Debian removes FPC/Lazarus
« Reply #45 on: February 11, 2026, 01:36:59 pm »
Folks, as some of you already know, Debian has removed FPC/Lazarus from its Forky (ie unstable) repo. This is because they are dropping support for gtk2 and both FPC and Lazarus (appear) to depend on the much out of date gtk2 !

This affects us as well.
Does this mean that even gtk2 libraries themselves will be removed at some time and Lazarus programs suddenly stop working after some Linux update in the future?
Will it just be removed from the default install or entirely (not available even through "sudo apt-get install gtk2.0")?

MarkMLl

  • Hero Member
  • *****
  • Posts: 8538
Re: Debian removes FPC/Lazarus
« Reply #46 on: February 11, 2026, 02:43:54 pm »
Will it just be removed from the default install or entirely (not available even through "sudo apt-get install gtk2.0")?

At present Debian's package search shows it being present in versions (strictly) less than experimental, but the writing is firmly on the wall.

Code: Text  [Select][+][-]
  1. $ rmadison -u qa libgtk2.0-dev
  2.  libgtk2.0-dev | 2.24.33-2+deb11u1 | bullseye | amd64, arm64, armhf, i386
  3.  libgtk2.0-dev | 2.24.33-2+deb12u1 | bookworm | amd64, arm64, armel, armhf, i386, mips64el, mipsel, ppc64el, s390x
  4.  libgtk2.0-dev | 2.24.33-7         | trixie   | amd64, arm64, armel, armhf, i386, ppc64el, riscv64, s390x
  5.  libgtk2.0-dev | 2.24.33-10        | forky    | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x
  6.  libgtk2.0-dev | 2.24.33-10        | sid      | amd64, arm64, armhf, i386, loong64, ppc64el, riscv64, s390x
  7.  

I'd point you to what happened to GTK v1, where the development package was removed from the distro after Lenny:

Code: Text  [Select][+][-]
  1. $ rmadison -u archive libgtk1.2-dev
  2.  libgtk1.2-dev | 1.2.7-1     | debian/potato    | alpha, arm, i386, m68k, powerpc, sparc
  3.  libgtk1.2-dev | 1.2.10-11   | debian/woody     | alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
  4.  libgtk1.2-dev | 1.2.10-17   | debian/sarge     | alpha, arm, hppa, i386, ia64, m68k, mips, mipsel, powerpc, s390, sparc
  5.  libgtk1.2-dev | 1.2.10-18   | debian/etch      | alpha, amd64, arm, hppa, i386, ia64, mips, mipsel, powerpc, s390, sparc
  6.  libgtk1.2-dev | 1.2.10-18   | debian/etch-m68k | m68k
  7.  libgtk1.2-dev | 1.2.10-18.1 | debian/lenny     | alpha, amd64, arm, armel, hppa, i386, ia64, mips, mipsel, powerpc, s390, sparc
  8.  

Note that the rmadison tool supports  -u archive  and  -u qa  but in neither case shows the experimental branch.

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

sfeinst

  • Sr. Member
  • ****
  • Posts: 258
Re: Debian removes FPC/Lazarus
« Reply #47 on: February 11, 2026, 04:14:28 pm »
This affects us as well.
Does this mean that even gtk2 libraries themselves will be removed at some time and Lazarus programs suddenly stop working after some Linux update in the future?
Will it just be removed from the default install or entirely (not available even through "sudo apt-get install gtk2.0")?

I may be reading apt list wrong, but I think they have already started to remove some gtk2 related items.  I am running trixie.  As an example, I compiled my apps using Lazarus and gtk2.  When I run the app from the command line, I see the following error in the command prompt:
Failed to load module "canberra-gtk-module"

I have read this can be ignored.  I have searched the repos and I see a canberra for gtk3, but not gtk2, which leads me to believe debian has started to phase out the gtk2 libraries.  Though it could just be a Wayland thing.  But I interpret it as a start of gtk2 incompatibilities.

tk

  • Sr. Member
  • ****
  • Posts: 386
Re: Debian removes FPC/Lazarus
« Reply #48 on: February 11, 2026, 10:21:42 pm »
I have read this can be ignored.  I have searched the repos and I see a canberra for gtk3, but not gtk2, which leads me to believe debian has started to phase out the gtk2 libraries.  Though it could just be a Wayland thing.  But I interpret it as a start of gtk2 incompatibilities.

Hmm, this is bad.
However, I tested now with GTK3 and although it is still not usable for me, it shows some progress (confirmed here https://forum.lazarus.freepascal.org/index.php/topic,70538.0.html).
Hopefully we have usable GTK3 port before GTK2 support officially ends.

dbannon

  • Hero Member
  • *****
  • Posts: 3719
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debian removes FPC/Lazarus
« Reply #49 on: February 12, 2026, 01:41:06 am »
... trixie
Failed to load module "canberra-gtk-module"

No, thats not an indication they are removing things from Trixie, thats not something that would ever, intentionally happen. Thats an issue, been around for a long time. You can add canberra to your link list and it will go away, however, probably just ignore it ! Some gtk2 library thinks, incorrectly, it needs canberra. Hell, I am Australian and I doubt we need Canberra !

So far, my Debian Unstable box does have gtk2, fpc, Lazarus  and even my app, tomboy-ng still there. In the debian model, packages are removed and returned to unstable and even Testing quite often so, happening, if it happens, is not necessarily fatal.

But its pretty sure, IMHO, that gtk2 will NOT be in Forky when its released in 2027 ! (remember, eg Ubuntu takes Testing twice a year so it will probably release without gtk2 before then.)

Honestly, thats not that bad, we need to adapt. We have established nothing needs to be done by the fpc dev to FPC. Apart from being 4.5 years old, its OK. Different matter with Lazarus where changes are possible. We could do nothing and expect Debian to change their package to use Qt5/6 and continue to release, in the Lazarus Official package, a widget set that will not install in new systems. Be pretty silly IMHO.

Not a time for "Masterful Inaction" !

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

dbannon

  • Hero Member
  • *****
  • Posts: 3719
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debian removes FPC/Lazarus
« Reply #50 on: February 12, 2026, 01:54:33 am »
OK, clearer picture.

Please look at https://tracker.debian.org/pkg/tomboy-ng

It has my app marked as -

Version 0.42-1 of tomboy-ng is marked for autoremoval from testing on Fri 13 Mar 2026. It depends (transitively) on fpc, lazarus, affected by #967348, #967564. You should try to prevent the removal by fixing these RC bugs.

So, saying its marked for removal has a time line !  FPC, Lazarus all have similar marks.

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

tk

  • Sr. Member
  • ****
  • Posts: 386
Re: Debian removes FPC/Lazarus
« Reply #51 on: February 12, 2026, 09:34:05 am »
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=967348

Quote
GTK 2 is used by some important productivity applications like GIMP, and
has also historically been a popular UI toolkit for proprietary software
that we can't change, so perhaps removing GTK 2 from Debian will never be
feasible. However, it has reached the point where a dependency on it is
a bug - not a release-critical bug, and not a bug that can necessarily
be fixed quickly, but a piece of technical debt that maintainers should
be aware of.

So they PERHAPS never remove GTK2. Good joke :o
In that case, the justification for removing fpc, lazarus, and other similar applications sounds pretty weak...

https://lists.debian.org/debian-devel/2026/01/msg00090.html
Quote
As mentioned in our 2020 MBF [4], besides being unmaintained for years,
GTK 2 does not support either HiDPI or native Wayland.

Also very weak reason, just imagine MS removes much older GDI...
« Last Edit: February 12, 2026, 09:46:58 am by tk »

kupferstecher

  • Hero Member
  • *****
  • Posts: 610
Re: Debian removes FPC/Lazarus
« Reply #52 on: February 12, 2026, 11:46:26 am »
So far, my Debian Unstable box does have gtk2, fpc, Lazarus  and even my app, tomboy-ng still there.
When a Lazarus application is shipped with a distro, is this always done as binary, or do you need to provide building scripts including scripts to build the compiler and IDE for building your Lazarus programm?

dbannon

  • Hero Member
  • *****
  • Posts: 3719
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debian removes FPC/Lazarus
« Reply #53 on: February 13, 2026, 02:09:35 am »
So far, my Debian Unstable box does have gtk2, fpc, Lazarus  and even my app, tomboy-ng still there.
When a Lazarus application is shipped with a distro, is this always done as binary, or do you need to provide building scripts including scripts to build the compiler and IDE for building your Lazarus programm?

The Debian model is the same for all (non-script) applications. The maintainer (in tomboy-ng's case, me) makes (and tests) a source package. No binary, just the source and some config files describing build and run dependencies. My app depends on (eg) FPC and Lazarus so they need to already be in the repo.

That source package is sent to a "mentor", a Debian person who looks, critically, at the packaging and, if happy will put the source package into the experimental repo. Auto running processes then builds that source package for each of the required platforms. Both source packages and binary packages are available from the Debian repos.

In the case of FPC and Lazarus, their maintainers are Debian insiders but separation of roles still takes place.

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: 74
    • My site
Re: Debian removes FPC/Lazarus
« Reply #54 on: February 13, 2026, 06:18:10 pm »
It is also important to take into account:
  • GTK 3 is in maintenance-only mode since 2019. It may reach EOL around 2028 (estimated)
  • Qt5 had already reached EOL on May 2025

So all of you should port your projects to Qt6.

kupferstecher

  • Hero Member
  • *****
  • Posts: 610
Re: Debian removes FPC/Lazarus
« Reply #55 on: February 13, 2026, 10:29:53 pm »
No binary, just the source and some config files describing build and run dependencies.
I see. So a working official FPC/Lazarus is really critical.

dbannon

  • Hero Member
  • *****
  • Posts: 3719
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debian removes FPC/Lazarus
« Reply #56 on: February 17, 2026, 11:38:28 am »
OK, it seems FPC is reasonably safe in Debian now.
https://tracker.debian.org/pkg/fpc

Been a few in, then out, then in agains but I think we can assume its good now.

So, how about Lazarus ?  I am unsure if the Debian packagers will be willing to package a widgetset other than the one chosen as default by the Lazarus developers.

I quote
"Version 4.4+dfsg-4 of lazarus is marked for autoremoval from testing on Fri 13 Mar 2026. It is affected by #967564. The removal of lazarus will also cause the removal of (transitive) reverse dependencies: astap, astap-cli, cevomapgen, cqrlog, ddrescueview, dozzaqueux, goverlay, lazpaint, libqt6pas, morserunner, mricron, optgeo, tomboy-ng, transgui, udm, vmg, winff. You should try to prevent the removal by fixing these RC bugs."

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

robert rozee

  • Sr. Member
  • ****
  • Posts: 325
Re: Debian removes FPC/Lazarus
« Reply #57 on: February 17, 2026, 01:29:02 pm »
OK, it seems FPC is reasonably safe in Debian now.
[...]
So, how about Lazarus ? [...] I quote:
"Version 4.4+dfsg-4 of lazarus is marked for autoremoval from testing on Fri 13 Mar 2026-...]"
Davo

as i raised in one of the other threads:
[...] btw - is it technically possible for a GUI application to be built such that it can detect the available widget sets and just use whatever one is available? ie, dynamically load the necessary libraries at run-time using dlopen/etc.

and Fred vS confirmed as possible:
[...] Yes, of course, it's possible (I've done it for X11 libraries), but it requires a bit of effort to convert the Pascal headers using "external" methods with the variable returned by `DynLibs.GetProcedureAddress()`.

Then, at init of the app, check which  widget sets is installed using `DynLibs.LoadLibrary()`.

i have previously played around with adding a unit into a project1.lpr to run code prior to GTK's startup:
Code: Pascal  [Select][+][-]
  1. program project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,                                    // UNIX + CThreads
  8.   {$ENDIF}
  9.   start,                                       // UNIX only, startup code before GTK is initialized (test)
  10.   {$ENDIF}
  11.  
  12.   Interfaces,                                  // this includes the LCL widgetset
  13.   Forms, Unit1;
  14.  
  15. {$R *.res}
  16.  
  17. begin
  18.   RequireDerivedFormResource:=True;
  19.   Application.Initialize;
  20.   Application.CreateForm(TForm1, Form1);
  21.   Application.Run
  22. end.

for my testing the start unit just printed out a greeting message to the console, which was sufficient to confirm that the greeting message was displayed before GTK started complaining about spurious initialization errors - as it is inclined to do on occasion!

(as Fred vS says) a start unit could detect the available widget set(s), and for whichever one is used (qt6 as 1st choice, fallback to qt5 as 2nd choice, fallback to GTK2 as final choice) build a table of entry points that can be made globally available. then someone would just need to go through all the source code for the Lazarus IDE and edit every external statement to instead create function pointer variables (or whatever the term is!) using the entry point table created by the start unit.


for accessing the ALSA sound system in one of my projects, a year or so back i converted code that previously used EXTERNAL statements as follows:

Code: Pascal  [Select][+][-]
  1. // OLD VERSION, using external:
  2. // function snd_pcm_open(pcm: PPsnd_pcm_t; name: PChar;
  3. //      stream: snd_pcm_stream_t; mode: cint): cint; cdecl; external libasound;
  4. // [...]
  5.  
  6. // have now switched to "Dynamic Loading" on use, the following variables will hold the dynamically loaded ALSA methods
  7. var snd_pcm_open:function(pcm: PPsnd_pcm_t; Name: PChar; stream: snd_pcm_stream_t; mode: cint): cint; cdecl;
  8. [...]
  9.     ALSAhandle:TLibHandle={dynlibs.}NilHandle;         // this will hold our handle for the ALSA library
  10.  
  11.  
  12. procedure ALSAstartup;
  13. var ALSAname:string='libasound.so.2';
  14. begin
  15.   ALSAhandle:={DynLibs.}SafeLoadLibrary(ALSAname);     // obtain the handle we want
  16.   if ALSAhandle<>{DynLibs.}NilHandle then              // handle was obtained OK
  17.   begin                                                // tie functions to the VARs from above
  18.     Pointer(snd_pcm_open):={DynLibs.}GetProcedureAddress(ALSAhandle, PChar('snd_pcm_open'));
  19. [...]
  20.   end
  21. end;
  22.  
  23.  
  24. procedure ALSAshutdown;
  25. begin
  26.   if ALSAhandle<>{DynLibs.}NilHandle then
  27.   begin
  28.     {DynLibs.}UnloadLibrary(ALSAhandle);
  29.     ALSAhandle:={DynLibs.}NilHandle
  30.   end
  31. end;

(credit to Fred vS for showing me how to do the above)

in principal it seems that the above approach could be applied to the whole of the Lazarus IDE - it would be a large task, but on the whole mostly an 'automated' conversion for the programmer doing the work.

once the concept is proven, it could then be streamlined for others to use going forward with their own Lazarus/FPC projects for widget set auto-selection. (see addendum below, just adding in the start unit to project1.lpr would suffice)


cheers,
rob   :-)

addendum 1: in the above i forgot to include one more step - merging what are (presumably) conditional compile blocks for each widget set, into case statements (or similar) to select which set of code for which widget set. to some (yet to be determined) extent this would grow the size of generated ELF files, but these days folks don't seem to worry so much about this!

addendum 2: it is actually even easier. the start unit just needs to set a single global variable that indicates the widget set that should be used. then every external statement replaced with calls to SafeLoadLibrary and GetProcedureAddress, it looks like it may ok to call  SafeLoadLibrary multiple times to get the same handle returned each time. conditional compile blocks (selecting for different widget sets) then replaced with "if widget_set = GTK2/Qt5/Qt6 then ..." blocks.
« Last Edit: February 17, 2026, 05:03:24 pm by robert rozee »

PascalDragon

  • Hero Member
  • *****
  • Posts: 6344
  • Compiler Developer
Re: Debian removes FPC/Lazarus
« Reply #58 on: February 17, 2026, 08:52:36 pm »
as i raised in one of the other threads:
[...] btw - is it technically possible for a GUI application to be built such that it can detect the available widget sets and just use whatever one is available? ie, dynamically load the necessary libraries at run-time using dlopen/etc.

and Fred vS confirmed as possible:
[...] Yes, of course, it's possible (I've done it for X11 libraries), but it requires a bit of effort to convert the Pascal headers using "external" methods with the variable returned by `DynLibs.GetProcedureAddress()`.

Then, at init of the app, check which  widget sets is installed using `DynLibs.LoadLibrary()`.

While technically possible does not mean that it's feasible. For the LCL it simply is not worth the effort this would require.

robert rozee

  • Sr. Member
  • ****
  • Posts: 325
Re: Debian removes FPC/Lazarus
« Reply #59 on: February 17, 2026, 10:22:34 pm »
While technically possible does not mean that it's feasible. For the LCL it simply is not worth the effort this would require.

PascalDragon: are you also one of the Lazarus developers? i thought you were on 'team FPC'.

the advantages seem enormous, not only does it solve the Debian issue, it also yields ELF binaries that are far more universal, in the sense that they will run against multiple widget sets. and it is a chance to begin cleaning out all but the GLIBC dependencies from the ELF Symbol Table.

on the other hand, since the vast majority of Lazarus/FPC users are on the Windows platform (67.7% as of January 2026), it could be argued that no effort for Linux Desktop (4.02%) support is justified.

what do the Lazarus developers think?


cheers,
rob   :-)

 

TinyPortal © 2005-2018