Recent

Author Topic: Free Pascal and Lazarus packages on Debian  (Read 8199 times)

dbannon

  • Hero Member
  • *****
  • Posts: 1532
    • tomboy-ng, a rewrite of the classic Tomboy
Free Pascal and Lazarus packages on Debian
« on: July 14, 2021, 03:14:26 am »
Linux - (eg) Debian Bullseye

On the topic of fppgk, the IDE has a nice tool that offers to write new fppkg.cfg files (2?). But its unusable if you are using a Distro Packaged FPC because the ($%#!) Distro Package Maintainers insist in restructuring the FP install. The tool in the Lazarus IDE appears to look for particular FP directory structures that do exist if you do a SourceForge   deb install or an install from a Tarball but the distros change all that and put things where they think is a good idea.

Seems we have several options -

1) Go back to Debian and say that you have packaged FPC wrongly. Bullseye is in late freeze, quite certain they will not change it at this late stage.

2) Make the fppkg aware of the "alternative" structure ?

3) We just tell people "please don't use the distro packages of FPC, ever". This makes sense in an number of other aspects too, the directory changes make building cross compilers difficult, and they don't always bundle everything in one install (ie, choose GTK or QT5). The standard FPC Bullseye install right now leaves out the RTL and does not depend on gdb. Sigh ...

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #1 on: July 15, 2021, 09:57:01 am »
Linux - (eg) Debian Bullseye

On the topic of fppgk, the IDE has a nice tool that offers to write new fppkg.cfg files (2?). But its unusable if you are using a Distro Packaged FPC because the ($%#!) Distro Package Maintainers insist in restructuring the FP install. The tool in the Lazarus IDE appears to look for particular FP directory structures that do exist if you do a SourceForge   deb install or an install from a Tarball but the distros change all that and put things where they think is a good idea.

Seems we have several options -

1) Go back to Debian and say that you have packaged FPC wrongly. Bullseye is in late freeze, quite certain they will not change it at this late stage.

2) Make the fppkg aware of the "alternative" structure ?

3) We just tell people "please don't use the distro packages of FPC, ever". This makes sense in an number of other aspects too, the directory changes make building cross compilers difficult, and they don't always bundle everything in one install (ie, choose GTK or QT5). The standard FPC Bullseye install right now leaves out the RTL and does not depend on gdb. Sigh ...

Davo
Dear Davo,

As you already know: being a Debian maintainer is a time consuming hard voluntary task done by volunteers that usually are not programmers.

Free Pascal and Lazarus directory structure and tools are neither intuitive nor easy to understand even for experienced professional programmers that are not core developers of Free Pascal and/or Lazarus.

Please, consider that there are core developers that contribute to only Free Pascal and others to only Lazarus and they rarely contribute to both because it's hard and time consuming to learn all that.

Also consider that Debian has its own logic to be built and to work in the same way as Free Pascal and Lazarus do.

And finally, consider that if it would be easy to build a compiler or an IDE, we would have thousands of core developers contributing to Free Pascal and/or Lazarus.

So, please, be more kind and respectful to Debian volunteers that had to learn how Debian, Free Pascal and Lazarus work internally to freely offer them to a community that demands them and usually doesn't have the ability to put all the pieces together.

That said, you can easily reach all the noble people involved in maintaining Debian packages related to Free Pascal and Lazarus to gracefully help them out:
Pascal Packaging Team, Abou Al Montacir, Paul Gevers, Peter Michael Green
https://packages.qa.debian.org/f/fpc.html
https://packages.qa.debian.org/l/lazarus.html
« Last Edit: July 18, 2021, 02:30:16 am by valdir.marcos »

dbannon

  • Hero Member
  • *****
  • Posts: 1532
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Free Pascal and Lazarus packages on Debian
« Reply #2 on: July 16, 2021, 06:47:36 am »
......But its unusable if you are using a Distro Packaged FPC because the ($%#!) Distro Package Maintainers insist in restructuring the FP install.
......
....
So, please, be more kind and respectful to Debian voluntiers that had to learn how Debian, Free Pascal and Lazarus work internally to freely offer them to a community that demands them and usually doesn't have the ability to put all the pieces toghether.
....

Valdir, I accept you gentle smack on the hand and agree that overall, the Debian project is both very valuable and incredibly big !  So, I withdraw totally my silly ($%#!). But, while what you say is true but it does not alter the situation. The way that FPC and Lazarus are packaged in Debian does make an introduction to FPC/Lazarus very hard for new comers.

Because the Debian version conflicts with the advice we give those new comers in the Forum and Wiki, we need to decide, collectively how to minimize the confusion.  And thats why I wrote the initial post. Its too late to get the FPC/Lazarus debs changed, even if they were willing to change their model. So, we need to either change Lazarus to accommodate the Debian model or agree that we will tell every new comer that they should not use the Debian packages, ever. Both are a big call !

Incidentally, I maintain a Lazarus app in Debian and have had lots of very willing help from the people there.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #3 on: July 18, 2021, 02:35:03 am »
......But its unusable if you are using a Distro Packaged FPC because the ($%#!) Distro Package Maintainers insist in restructuring the FP install.
......
....
So, please, be more kind and respectful to Debian volunteers that had to learn how Debian, Free Pascal and Lazarus work internally to freely offer them to a community that demands them and usually doesn't have the ability to put all the pieces together.
....
Valdir, I accept you gentle smack on the hand and agree that overall, the Debian project is both very valuable and incredibly big !  So, I withdraw totally my silly ($%#!). But, while what you say is true but it does not alter the situation. The way that FPC and Lazarus are packaged in Debian does make an introduction to FPC/Lazarus very hard for new comers.

Because the Debian version conflicts with the advice we give those new comers in the Forum and Wiki, we need to decide, collectively how to minimize the confusion.  And thats why I wrote the initial post. Its too late to get the FPC/Lazarus debs changed, even if they were willing to change their model. So, we need to either change Lazarus to accommodate the Debian model or agree that we will tell every new comer that they should not use the Debian packages, ever. Both are a big call !

Incidentally, I maintain a Lazarus app in Debian and have had lots of very willing help from the people there.

Davo
Davo, thanks for understanding.

I am striving to offer a new packaging proposal for Free Pascal and Lazarus in Debian.

I am looking for a balance between the Free Pascal and Debian philosophies as it is not possible to fully please both.

https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/

https://packages.qa.debian.org/f/fpc.html
https://packages.qa.debian.org/l/lazarus.html

https://packages.debian.org/search?searchon=contents&keywords=fpc&mode=path&suite=stable&arch=any
https://packages.debian.org/search?searchon=contents&keywords=pascal&mode=path&suite=stable&arch=any

There are many challenges to be solved to build this great Lego.

My current idea is to start with a basic stable package for Free Pascal, for example 3.4.0 or 3.2.2 or 3.0.4, which could only be updated via apt-get. This package would allow you to compile other things that would come later.

A dev package would come next for Free Pascal Fixes and another dev package for Trunk with the possibility to change the source code and recompile it using the stable package. It could even be uninstalled and reinstalled to start over from scratch. This would allow core developers to work easily with Debian.

Then there would be more packages related to Free Pascal, like source code or text editor, and not exactly related to Lazarus.

The SVN, GIT, GDB and FPDebug etc packages would be separated and optional.

Lazarus would be split into a group of packages without the limited [in the sense of impossibility of recompiling itself] Free Pascal built-in in the current Lazarus model offering the possibility of adding easily more versions of Free Pascal via apt-get.

It's a lot of work for the next years.


Because the Debian version conflicts with the advice we give those new comers in the Forum and Wiki, we need to decide, collectively how to minimize the confusion.
And thats why I wrote the initial post. Its too late to get the FPC/Lazarus debs changed, even if they were willing to change their model.
So, we need to either change Lazarus to accommodate the Debian model or agree that we will tell every new comer that they should not use the Debian packages, ever.
Both are a big call !
First, we need to separate the vast majority programmers that uses Free Pascal and Lazarus to only produce software and the few people that are core developers building Free Pascal, Lazarus, libraries or components.

Those two audiences have different needs.

Even though I don't see Free Pascal and Lazarus models [directory tree and binaries] as intuitive, I don't believe they will ever change. So, obviously, the Debian packages would difficultly comply with that.

Similar to that, Debian people - me included - have their own ecosystem. They have learned and are used to the way things work on Debian and expect that behavior.

So, my idea is to build something between those two worlds, starting from prioritizing the bigger audience.

One important future feature is that Lazarus needs to build itself smoothly in Debian and this is currently over complicated.

dbannon

  • Hero Member
  • *****
  • Posts: 1532
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Free Pascal and Lazarus packages on Debian
« Reply #4 on: July 18, 2021, 05:40:00 am »
OK Valdir, I think we agree on a lot of things.

I, personally use a compiler from tarball and Lazarus from source but recognise that lots of user do need to start out on a Distro versions.  I believe that being able to build Lazarus from source should should be practicable when using the distro FPC. It used to be easy but not any more.

I would be very happy to work with you in achieving that if you think that would useful.

Another issue is cross compilers, again, changes made to (Debian) Distro version of FPC prevent making a cross compiler, at least in the way we are familiar with.  I am currently rewriting the Wiki page on that subject after helping a person who followed the old instructions but started out with Distro FPC, then got lost in an over edit page !

I suspect cross compiling is a bridge too far away however, if we can just get Lazarus easy build-able, it would be a win.

Anyway, we are way, way, off topic in this thread. Happy to continue on a new thread if you desire.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #5 on: July 19, 2021, 09:28:52 pm »
As suggested by Davo (@dbannon), the idea of this topic is to discuss Free Pascal and Lazarus packages on Debian.

ChrisR

  • Full Member
  • ***
  • Posts: 218
Re: Free Pascal and Lazarus packages on Debian
« Reply #6 on: July 19, 2021, 09:47:57 pm »
I do think this is an important topic. Improving Debian integration would help.

For one small specific issue: I know that dbannon has been championing this, but one area where things could be improved is the support for the Lazarus QT5 widgetset. Briefly, Lazarus can target GTK2, GTK3 or QT5. GTK2 is end of life, the Lazarus GTK3 support is improving but still not great (and GTK3 has some regressions versus GTK2 that make it unsuitable for many tasks, like lack of legacy OpenGL support, and the fact that it is unable to support multi-sampling for OpenGL Core). The QT5 widgets is mature, but requires the user to install libqt5pas. However, the Debian versions of this library are out of date, and this causes users confusion:
  https://www.nitrc.org/forum/message.php?msg_id=32480
at the moment, users need to get this version
  https://github.com/davidbannon/libqt5pas/releases
Perhaps Shannon can clarify, perhaps with the release of the upcoming Lazarus 2.2, we can coordinate Debian to include this updated library.

While I am not an expert in either Lazarus or Debian, it seems like someone should outline the Debian way for application and library paths, and compare this to the default FPC/Lazarus behavior. That might lead to some discussions regarding how to move forward.


valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #7 on: July 19, 2021, 10:18:30 pm »
OK Valdir, I think we agree on a lot of things.

I, personally use a compiler from tarball and Lazarus from source but recognise that lots of user do need to start out on a Distro versions.  I believe that being able to build Lazarus from source should should be practicable when using the distro FPC. It used to be easy but not any more.

I would be very happy to work with you in achieving that if you think that would useful.

Another issue is cross compilers, again, changes made to (Debian) Distro version of FPC prevent making a cross compiler, at least in the way we are familiar with.  I am currently rewriting the Wiki page on that subject after helping a person who followed the old instructions but started out with Distro FPC, then got lost in an over edit page !

I suspect cross compiling is a bridge too far away however, if we can just get Lazarus easy build-able, it would be a win.

Anyway, we are way, way, off topic in this thread. Happy to continue on a new thread if you desire.

Davo
Davo, I can work on this project only on my little spare time and this large task will take years to be fullfiled.

If you and others can contribute, we can accelerate things a bit more.

Cross-compiling people is a third - even more complex - audience I am not familiar with since I do that job using VMs and CI/CD.

If you don't mind, we should start by revisiting the Free Pascal debs files on Sourceforge and Debian fpc packages and its lots of dependencies:
https://packages.qa.debian.org/f/fpc.html

First thing is to offer more compiler options, including the recently retired ones:
fpc-3.4-trunk
fpc-3.4-fixes
fpc-3.4.0
fpc-3.2-trunk
fpc-3.2-fixes
fpc-3.2.4
fpc-3.2.2 [default today]
fpc-3.2.0
fpc-3.0.4
fpc-3.0.2
fpc-3.0.0

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #8 on: July 19, 2021, 11:00:22 pm »
I do think this is an important topic. Improving Debian integration would help.
@ChrisR
I think you have missed the point here and you have been rude.
If you didn't understand it yet, I will explain it again for you: this is a volunteer project. If you want something done, you should do it or pay for it.
If you can't do or pay for, you should - at least - be polite and patient in requesting it to someone else.


Quote
For one small specific issue: I know that dbannon has been championing this, but one area where things could be improved is the support for the Lazarus QT5 widgetset. Briefly, Lazarus can target GTK2, GTK3 or QT5. GTK2 is end of life, the Lazarus GTK3 support is improving but still not great (and GTK3 has some regressions versus GTK2 that make it unsuitable for many tasks, like lack of legacy OpenGL support, and the fact that it is unable to support multi-sampling for OpenGL Core). The QT5 widgets is mature, but requires the user to install libqt5pas. However, the Debian versions of this library are out of date, and this causes users confusion:
  https://www.nitrc.org/forum/message.php?msg_id=32480
at the moment, users need to get this version
  https://github.com/davidbannon/libqt5pas/releases
Perhaps Shannon can clarify, perhaps with the release of the upcoming Lazarus 2.2, we can coordinate Debian to include this updated library.
First of all, I still don't use QT on Linux.
I use GTK, Enlightenment and Moksha:
https://www.gtk.org/
https://www.enlightenment.org/
https://www.bodhilinux.com/moksha-desktop/
https://github.com/JeffHoogland/moksha

Even though I agree with you about GTK3 and GTK4, it will take some time until I have time to learn what is needed to help there.

Although I can understand your needs on QT5, my priorities - as you can see - are different than yours.

Quote
While I am not an expert in either Lazarus or Debian, it seems like someone should outline the Debian way for application and library paths, and compare this to the default FPC/Lazarus behavior.
That might lead to some discussions regarding how to move forward.
Since GTK3, GTK4, and QT5 integration to LCL suffers from lack of developers and you are also saying that is an important matter, my suggestion is that you learn that subject to be helpful and get things done.

dbannon

  • Hero Member
  • *****
  • Posts: 1532
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Free Pascal and Lazarus packages on Debian
« Reply #9 on: July 20, 2021, 04:00:54 am »
@ChrisR
I think you have missed the point here

I feel that Chris is being quite polite and positive with his suggestions. When we discuss things, we need to be able to point out problems as we see them, we won't get anything done if we have things that we are not allowed to say.  (We do need to recognise that some cultures can be more frank and forthright that others but as long as the intention is not to offend, I try and understand that.)

Quote
.....The QT5 widgets is mature, but requires the user to install libqt5pas. However, the Debian versions of this library are out of date, and this causes users confusion:

Chris, The commit to Qt5 widset that triggered that problem has been reversed but that event sure flags an issue that will almost certainly pop up again. I believe we have a problem with version numbering with libqt5pas1, if we had a clear release and number model, it would be easy to convience Distro Packagers to confirm to it. Distro Packagers love version number !  At present, the 'working' version of libqt5pas1 might be only the one in Lazarus trunk. But there is no way Distro Packagers will take code from a trunk. Sensible ! 

I established that github clone of libqt5pas1 to try and separate it from Lazarus trunk and stamp a sequential version number but that did not, apparently, work.  This is probably a separate issue, maybe needs to be in a separate thread.

Quote
First of all, I still don't use QT on Linux.
I use GTK, Enlightenment and Moksha:

valdir, from memory (I don't have a viable Enlightenment VM at the moment) E can use the Qt widget set too. One of the people that help me with tomboy-ng is  big fan of E, always trying to convert me.  I find it too complicated ....

When I was asked to package tomboy-ng for Debian, they told me that new GTK2 apps were not welcome, the only option was Qt5 (that later changed in a complicated story). Right now, there seems to be quite a lot of progress in GTK3 but sadly, still a long way the go. So, really, any new app trying to get into the Debian repo needs to be Qt5. So, we have our work cut out for use !

Quote
Since GTK3, GTK4, and QT5 integration to LCL suffers from lack of developers and you are also saying that is an important matter, my suggestion is that you learn that subject to be helpful and get things done.

yep, that applies to us all !  Incidentally, Chris was very helpful in facilitating some of the work involved in adapting to the "Apple Silicon".

The big issue in Debian packaging is they have a policy of breaking things down to small modules to enable reuse.  And that makes very good sense most of the time. However, with FPC/Lazarus there is little or no 'cross use', very few other tools can use LCL for example and the IDE is really Pascal (probably FPC) only.  But a mob like Debian absolutely has to have rules and must, as much as possible stick to them. Its the only way a project like that can work.

Our standard install of FPC for example puts executable binaries under /usr/lib/fpc..., we then symlink it to /usr/bin.  In the debian install, when you call fpc, you get /usr/bin/fpc which is a symlink to /etc/alternatives/fpc that is a symlink to /usr/bin/x86_64-linux-gnu-fpc

That works fine for a fpc user who just wants to build native apps, we could, with some effort, write instructions to use the Debian model to make a cross compiler. Should we ?

The debian model does not work for 'our' Lazarus built, for example from source. Again, the problem is just that Lazarus does not recognise where things are, it could be made to work, again, should we do that ?

Things to do -

I am very happy to spend some time documenting the differences between how Debain package FPC/Lazarus compared to 'our' SourceForge model.  That may help us decide if there is sufficient common ground to work towards a compromise.  I do, however feel it may be too hard ...

I recently re-wrote the instructions to cross compile from Linux ot Windows, at the top I now say, very clearly, "Do not use a Repo version of FPC to do this" - that may well be our only long term solution.



Davo




Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

RememberTP

  • New member
  • *
  • Posts: 8
Re: Free Pascal and Lazarus packages on Debian
« Reply #10 on: August 11, 2021, 02:04:15 pm »
One thing that would help move people off repo versions would be if there was a trivial way to check for updates in fpc / Lazarus and install them if any are available. Using git and compiling the source doesn't count! Fpcupdeluxe is an attempt at this, but still an extra layer of faff, had to be updated itself via checking to cope with the move to git, and still involves compiling the source.

At the moment, I think you need to manually visit two websites, see if there are any, be taken to Sourceforge if so, currently wonder if fpc 3.2.2 is compatible with Lazarus which is offering fpc 3.2.0-x, download one to three .debs and install them.

That's more of a pain than just having it occur as part of the automatic daily apt-get update / upgrade.

Would a first step be having a Lazarus repository available rather than just .deb files?

dbannon

  • Hero Member
  • *****
  • Posts: 1532
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Free Pascal and Lazarus packages on Debian
« Reply #11 on: August 11, 2021, 03:42:40 pm »
RememberTP, its actually a lot easier than you think !  Firstly, FPC changes very slowly and its unlikely that you will be updating FPC in any 12 month period.

Lazarus on the other hand, does change and if you are using trunk you can be pretty sure 'something' has changed each day !  But you really do not need to track that unless you choose to do so. If you stick to Lazarus releases, its, not more than twice a year ???  And lots of noise on the forum when its about to happen. So, no checking needed !

( I personally believe that building from git src is not really any harder than the deb packages. Its just two short commands and no websites to visit (once setup).  And makes for a lot more flexible install. )

Actually, few developers like their compiling tools to auto update, while incompatibilities are rare with FPC/Lazarus, it something developers like to determine the timing themselves.

Are you likely to want to be using trunk versions of either Lazarus or FPC, that may increase to workload if done frequently ?

Davo





 
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

RememberTP

  • New member
  • *
  • Posts: 8
Re: Free Pascal and Lazarus packages on Debian
« Reply #12 on: August 12, 2021, 11:41:17 am »
If I wanted bleeding edge, I wouldn't be using a Debian-based distro :)

But it is annoying when I have had a problem that turned out to be fixed in a minor update that I hadn't seen.

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1582
  • Former Delphi 1-7, 10.2 user
Re: Free Pascal and Lazarus packages on Debian
« Reply #13 on: August 12, 2021, 12:24:35 pm »
If I wanted bleeding edge, I wouldn't be using a Debian-based distro :)

Apart from releases and the development version, there's also the "fixes" versions of both Lazarus + FPC which could be compared to "stable" releases - they get fixes for issues in the release versions faster than the subsequent release versions and could not be considered "bleeding edge" like the development versions.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.5.2 aarch64 Xcode 12.5.1
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1058
Re: Free Pascal and Lazarus packages on Debian
« Reply #14 on: August 18, 2021, 05:33:48 am »
@ChrisR
I think you have missed the point here
I feel that Chris is being quite polite and positive with his suggestions.
I don't agree, but I'll move on.

Quote
When we discuss things, we need to be able to point out problems as we see them, we won't get anything done if we have things that we are not allowed to say.  (We do need to recognise that some cultures can be more frank and forthright that others but as long as the intention is not to offend, I try and understand that.)
I agree.

Quote
Quote
.....The QT5 widgets is mature, but requires the user to install libqt5pas. However, the Debian versions of this library are out of date, and this causes users confusion:
Chris, The commit to Qt5 widset that triggered that problem has been reversed but that event sure flags an issue that will almost certainly pop up again. I believe we have a problem with version numbering with libqt5pas1, if we had a clear release and number model, it would be easy to convience Distro Packagers to confirm to it. Distro Packagers love version number !  At present, the 'working' version of libqt5pas1 might be only the one in Lazarus trunk. But there is no way Distro Packagers will take code from a trunk. Sensible ! 

I established that github clone of libqt5pas1 to try and separate it from Lazarus trunk and stamp a sequential version number but that did not, apparently, work.  This is probably a separate issue, maybe needs to be in a separate thread.
I agree.

 

TinyPortal © 2005-2018