Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2023-03

Lazarus Release 2.2.6

11 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

The Lazarus team is glad to announce the release of Lazarus 2.2.6.

This is a bugfix release and was built with FPC 3.2.2.

Here is the list of changes for Lazarus and Free Pascal: http://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes http://wiki.lazarus.freepascal.org/User_Changes_3.2.2

Here is the list of fixes for Lazarus 2.2.x:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/commits/fixes_2_2

The release is available for download on SourceForge: http://sourceforge.net/projects/lazarus/files/

Choose your CPU, OS, distro and then the "Lazarus 2.2.6" directory.

Checksums for the SourceForge files:
https://www.lazarus-ide.org/index.php?page=checksums#2_2_6

Minimum requirements:

Windows:
2k, 32 or 64bit.

FreeBSD/Linux:
gtk 2.24 for gtk2, qt4.5 for qt, qt5.6 for qt5, 32 or 64bit.

Mac OS X:
Cocoa (64bit) 10.12, Carbon (32bit) 10.5 to 10.14, qt and qt5 (32 or 64bit).

The gitlab page:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/tree/lazarus_2_2_6

For people who are blocked by SF, the Lazarus releases from SourceForge are mirrored at: ftp://ftp.freepascal.org/pub/lazarus/releases/

Mattias

Reply by email

Bo Berglund
to Mattias Gaertner
Mattias Gaertner wrote
The Lazarus team is glad to announce the release of Lazarus 2.2.6. This is a bugfix release and was built with FPC 3.2.2.

I did not know of this when I yesterday went to install the latest Lazarus release from sources on my Ubuntu 22.04.2 LTS system. I retrieved the sources as a tarball from GitLab.

My system has a number of differet versions of Lazarus installed but FPC is 3.2.0 (not 3.2.2)...

The install seems to have worked, but seeing this release comment I now have to ask if 3.2.2 is a *requirement* for proper operation or if it just happens to be what you used when building?

Do I have to change my fpc installed version and rebuild Lazarus to have it work properly?

Bo Berglund Developer in Sweden

Reply by email

Martin Frb
to Bo Berglund
Bo Berglund wrote 7 lines
The install seems to have worked, but seeing this release comment I now have to ask if 3.2.2 is a *requirement* for proper operation or if it just happens to be what you used when building? Do I have to change my fpc installed version and rebuild Lazarus to have it work properly?

No, its not. Currently 3.2.0 is the minimum supported. (All else before is your own good luck, or the absence thereof).

We usually support:
- the current fcp release (at the moment 3.2.2)
- the previous release (3.2.0)
- fixes branch and main branch / for both support may lack a few days, if there are breaking changes.

Though, we do more/most testing with the current release. Issues that are 3.2.0 only usually only get attention when reported. On the other hand, issues that are only 3.2.0 are usually "doesn't compile at all" (and IIRC we have a CI task for that now).

Reply by email

Bo Berglund
to Martin Frb: No, its not. Currently 3.2.0 is the minimum supported. (All else before is your own good…
Martin Frb wrote 22 lines
On 16/03/2023 07:53, Bo Berglund via lazarus wrote: > The install seems to have worked, but seeing this release comment I > now have to > ask if 3.2.2 is a *requirement* for proper operation or if it just happens to be > what you used when building? > > Do I have to change my fpc installed version and rebuild Lazarus to have it work > properly? No, its not. Currently 3.2.0 is the minimum supported. (All else before is your own good luck, or the absence thereof). We usually support: - the current fcp release (at the moment 3.2.2) - the previous release (3.2.0) - fixes branch and main branch / for both support may lack a few days, if there are breaking changes. Though, we do more/most testing with the current release. Issues that are 3.2.0 only usually only get attention when reported. On the other hand, issues that are only 3.2.0 are usually "doesn't compile at all" (and IIRC we have a CI task for that now).

OK, then my next question is:

I have a number of Lazarus releases installed where 3.0.4 is the fpc used. So they all used the same and there was no problem. (This is on Ubuntu Linux 22.04 btw and I install everything from sources)

But if I now install fpc 3.2.2 as well I will have 3 different versions of the compiler and the Lazarus-es are set up to use different versions (3.0.4 and 3.2.0 respectively).
It seems like Lazarus on first start needs to determine the location etc of fpc and it saves it inside the pcp dir of the respective version.

But it also seems like on each system there is only one version of fpc that can be "active" (at least on Linux) because its config is stored outside of the pcp dir in a user global fashion.
How can I make the fpc compiler versions co-exist and be recognized by the respecive versions of Lazarus?

And how can I change the newly installed Lazarus version 2.2.6 to use fpc 3.2.2 (when it is installed) rather than the 3.2.0 that it found during first start? That screen is never again displayed....

Bo Berglund Developer in Sweden

Reply by email

Martin Frb
to Bo Berglund
Bo Berglund wrote 7 lines
But it also seems like on each system there is only one version of fpc that can be "active" (at least on Linux) because its config is stored outside of the pcp dir in a user global fashion. How can I make the fpc compiler versions co-exist and be recognized by the respecive versions of Lazarus?

As for Lazarus:
Lazarus takes an argument --pcp=
So each version can be pointed to its own config.

That option can be put into a file called lazarus.cfg which is to reside in the directory of your lazarus exe file
(or the startlazarus file if you use that / you only need that if you have non-writable root installs, and/or for restarting after build) Mind that if you have root installs, then the lazarus exe eventually ends up in the pcp, and the lazarus.cfg must be with the startlazarus that would start the lazarus.

As for FPC:
Either use scripts to start lazarus and set the $PATH for each fpc.

Or start the ppc directly // configure lazarus to use the ppc.

Mind that you also need the fpc.cfg to be found (so that can have ifdefs based on the version)

---------------
From my setup script

this sets a folder for each fpc, and creates some symlinks
- The IDE must be pointed to use the ppc in the lib/fpc/3.2.2/ folder.
- there must be no global fpc.cfg (/etc or /home/name/.fpc or the like)

compiling with -va allows to check what is used.

$INSTPATH can be whatever.

-------------

mkdir -p /home/m/fpc/$INSTPATH/
mkdir -p /home/m/fpc/$INSTPATH/gl
mkdir -p /home/m/fpc/$INSTPATH/gw
mkdir -p /home/m/fpc/$INSTPATH/def
mkdir -p /home/m/fpc/$INSTPATH/o4

############################
cd /home/m/fpc/$INSTSRC/source

make clean
make all??? OPT="-gw -O-1? "
make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/gw

mkdir -p /home/m/fpc/$INSTPATH/gw/lib/fpc/etc
mkdir -p /home/m/fpc/$INSTPATH/gw/etc

cd /home/m/fpc/$INSTPATH
gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > gw/lib/fpc/etc/fpc.cfg
gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > gw/etc/fpc.cfg

ln -s /home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS/ppcx64 /home/m/fpc/$INSTPATH/gw/bin/ppcx64

Reply by email

Kostas Michalopoulos
to Bo Berglund: On Thu, 16 Mar 2023 09:05:06 +0100, Martin Frb via lazarus OK, then my next question is:…
Bo Berglund wrote 5 lines
But it also seems like on each system there is only one version of fpc that can be "active" (at least on Linux) because its config is stored outside of the pcp dir in a user global fashion. How can I make the fpc compiler versions co-exist and be recognized by the respecive versions of Lazarus?

You can tell Lazarus which binary to use for FPC.

For the config file, you can use the same for all. The ~/.fpg.cfg is just a text file containing parameters to give to the compiler, same as the command like, but with some additional preprocessing. You can use something like

#IFDEF VER<FPC version>
parameters just for that FPC
#ENDIF

But note that the default configuration should work fine with most FPCs as long as they are installed in the same prefix since they use $fpcversion and $fpctarget macros instead of hardcoding things. For example personally i have both stable and git versions of FPC installed in ~/Apps/fpc for various targets and each uses its own set of units, etc.

If you have FPCs placed in different prefixes you might need the IFDEF for those though - or perhaps just add directories for both prefixes and as long as the $fpcversion macro is used for the units it'll work.

Kostas

Reply by email

Giuliano Colla
to Bo Berglund: On Thu, 16 Mar 2023 09:05:06 +0100, Martin Frb via lazarus OK, then my next question is:…

Il 16/03/2023 18:46, Bo Berglund via lazarus ha scritto:

I have a number of Lazarus releases installed where 3.0.4 is the fpc used. So they all used the same and there was no problem. (This is on Ubuntu Linux 22.04 btw and I install everything from sources)

I have a similar problem, needing to give assistance to customers with different Lazarus versions.
It's very annoying to maintain a program developed with an older version, and to make a minor correction, to be obliged to update a lot of other things which have been deprecated in the time between. My solution has been to use fpcupdeluxe. It provides a fully self contained set of Lazarus + fpc, which doesn't clash with anything else. Both Lazarus config and all of fpc config are contained in a specific folder, Lazarus launch icons on the screen are named from the folder you decided to use for that version, and you can have as many as you have space on your disk. Currently I have 7 different Lazarus/fpc sets to select from, from a Lazarus 1.6 to a Lazarus 2.2.6, plus a couple of Lazarus Trunk (one using trunk fpc, the other using stable fpc). Give it a try. It will not disturb anything of your current installations. It takes a minimum to understand how it works, but then it's a paradise.

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email

Bo Berglund
to Martin Frb: As for Lazarus: Lazarus takes an argument --pcp= So each version can be pointed to its…
Martin Frb wrote 12 lines
On 16/03/2023 18:46, Bo Berglund via lazarus wrote: > > But it also seems like on each system there is only one version of fpc that can > be "active" (at least on Linux) because its config is stored outside of the pcp > dir in a user global fashion. > How can I make the fpc compiler versions co-exist and be recognized by the > respecive versions of Lazarus? > As for Lazarus: Lazarus takes an argument --pcp= So each version can be pointed to its own config.

I start Lazarus from desktop files in ~/.local/share/applications.

THe Lazarus_2.2.6.desktop file looks like this (long lines wrapped):

[Desktop Entry]
Comment=Lazarus IDE 2.2.6
Terminal=false
Name=Lazarus 2.2.6
#Entry below in order to set up PATH correctly on start Exec=/bin/bash -l -c '/home/bosse/dev/lazarus/2.2.6/startlazarus --pcp=/home/bosse/.lazarus_2.2.6'
Type=Application
Icon=/home/bosse/dev/lazarus/2.2.6/images/ide_icon48x48.png Categories=Application;IDE;Development;GTK;GUIDesigner;Programming; NoDisplay=false
Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer;

That option can be put into a file called lazarus.cfg which is to reside in the directory of your lazarus exe file

Never heard about this before...

Show quoted text 5 lines
(or the startlazarus file if you use that / you only need that if you have non-writable root installs, and/or for restarting after build) Mind that if you have root installs, then the lazarus exe eventually ends up in the pcp, and the lazarus.cfg must be with the startlazarus that would start the lazarus.

As I tried to explain my installs are all located inside $HOME, I do not like having global installs of tools that are built from sources like I do.

As for FPC: Either use scripts to start lazarus and set the $PATH for each fpc.

What do you mean by "set the $PATH"?
I have tried pointing the compiler setting in the dialog that pops up on first start to the actual correct version of ppcx64, but the setting is not accepted...
So I have symlinked it into $HOME/bin/ instead. But this is a single compiler then and will be the one for all Lazarus versions...

Or start the ppc directly // configure lazarus to use the ppc.

As I said above Lazarus is started from a desktop file where the ppc dir is defined...

Mind that you also need the fpc.cfg to be found (so that can have ifdefs based on the version)

This is a big problem since the fpc.cfg seems to be located in a common location too.

I will have to study the info below and see how it can be applied to my case...

Show quoted text 38 lines
--------------- From my setup script this sets a folder for each fpc, and creates some symlinks - The IDE must be pointed to use the ppc in the lib/fpc/3.2.2/ folder. - there must be no global fpc.cfg (/etc or /home/name/.fpc or the like) compiling with -va allows to check what is used. $INSTPATH can be whatever. ------------- mkdir -p /home/m/fpc/$INSTPATH/ mkdir -p /home/m/fpc/$INSTPATH/gl mkdir -p /home/m/fpc/$INSTPATH/gw mkdir -p /home/m/fpc/$INSTPATH/def mkdir -p /home/m/fpc/$INSTPATH/o4 ############################ cd /home/m/fpc/$INSTSRC/source make clean make all??? OPT="-gw -O-1? " make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/gw mkdir -p /home/m/fpc/$INSTPATH/gw/lib/fpc/etc mkdir -p /home/m/fpc/$INSTPATH/gw/etc cd /home/m/fpc/$INSTPATH gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > gw/lib/fpc/etc/fpc.cfg gw/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS > gw/etc/fpc.cfg ln -s /home/m/fpc/$INSTPATH/gw/lib/fpc/$INSTVERS/ppcx64 /home/m/fpc/$INSTPATH/gw/bin/ppcx64
Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to Giuliano Colla: Il 16/03/2023 18:46, Bo Berglund via lazarus ha scritto: I have a similar problem,…
Giuliano Colla wrote 24 lines
Il 16/03/2023 18:46, Bo Berglund via lazarus ha scritto: > I have a number of Lazarus releases installed where 3.0.4 is the fpc used. > So they all used the same and there was no problem. > (This is on Ubuntu Linux 22.04 btw and I install everything from sources) I have a similar problem, needing to give assistance to customers with different Lazarus versions. It's very annoying to maintain a program developed with an older version, and to make a minor correction, to be obliged to update a lot of other things which have been deprecated in the time between. My solution has been to use fpcupdeluxe. It provides a fully self contained set of Lazarus + fpc, which doesn't clash with anything else. Both Lazarus config and all of fpc config are contained in a specific folder, Lazarus launch icons on the screen are named from the folder you decided to use for that version, and you can have as many as you have space on your disk. Currently I have 7 different Lazarus/fpc sets to select from, from a Lazarus 1.6 to a Lazarus 2.2.6, plus a couple of Lazarus Trunk (one using trunk fpc, the other using stable fpc). Give it a try. It will not disturb anything of your current installations. It takes a minimum to understand how it works, but then it's a paradise. Giuliano

Thanks for your input!
On Windows I have been using the installer for Lazarus which can be downloaded from SourceForge and this isolates the Lazarus and Fpc into its own "sandbox" such that these probnlems do not appear.

My real problems are occurring on Linux...
Since there is no good installers to find I have created my own shellscript to install from sources (Lazarus and Fpc separately). And on Linux I do not want anything done as root and installed outside of $HOME so my script makes sure everything is located within $HOME.
But there I have the interference problem between the Fpc versions...

Regarding fpcupdeluxe, I have now tried it on Windows and after a bit of trial-and-error I have got the knack of how it works for a couple of Lazarus installs of different versions etc.
Seems that the result is kept inside an isolated sandbox more or less like the SF install exe does for Lazarus and Fpc.

But the advantage here is that with fpcupdeluxe one can modify the installation after it has been installed, which is very good.

I do not yet understand how to get cross-compile installed properly though... (I would like to be able to build for RaspberryPi4 (and 3) on my Windows PC if possible. RPi uses ARM cpu of course...

Anyway, a question for you:

Is it possible to use fpcupdeluxe on the following Linux platforms and if so how is it done there?
- Ubuntu 20.04.6 LTS (using AMD CPU)
- Ubuntu 22.04.2 LTS (using AMD CPU)
- RaspberryPi4 with Raspbian Buster and Bullseye (ARM CPU) I can attach to these RPi devices using VNC and PuTTY

And thanks for bringing up fpcupdeluxe, I had a look 3-4 years back and did not then really get the advantage.

Finally:
--------
fpcupdeluxe shows as candidates for install Lazarus 2.3.0 and Fpc 3.2.4 both of which releases seem not to exist yet...

What is the deal here?

Bo Berglund Developer in Sweden

Reply by email

Giuliano Colla
to Bo Berglund

Il 26/03/2023 14:42, Bo Berglund via lazarus ha scritto:

Show quoted text 47 lines
Thanks for your input! On Windows I have been using the installer for Lazarus which can be downloaded from SourceForge and this isolates the Lazarus and Fpc into its own "sandbox" such that these probnlems do not appear. My real problems are occurring on Linux... Since there is no good installers to find I have created my own shellscript to install from sources (Lazarus and Fpc separately). And on Linux I do not want anything done as root and installed outside of $HOME so my script makes sure everything is located within $HOME. But there I have the interference problem between the Fpc versions... Regarding fpcupdeluxe, I have now tried it on Windows and after a bit of trial-and-error I have got the knack of how it works for a couple of Lazarus installs of different versions etc. Seems that the result is kept inside an isolated sandbox more or less like the SF install exe does for Lazarus and Fpc. But the advantage here is that with fpcupdeluxe one can modify the installation after it has been installed, which is very good. I do not yet understand how to get cross-compile installed properly though... (I would like to be able to build for RaspberryPi4 (and 3) on my Windows PC if possible. RPi uses ARM cpu of course... Anyway, a question for you: Is it possible to use fpcupdeluxe on the following Linux platforms and if so how is it done there? - Ubuntu 20.04.6 LTS (using AMD CPU) - Ubuntu 22.04.2 LTS (using AMD CPU) - RaspberryPi4 with Raspbian Buster and Bullseye (ARM CPU) I can attach to these RPi devices using VNC and PuTTY And thanks for bringing up fpcupdeluxe, I had a look 3-4 years back and did not then really get the advantage. Finally: -------- fpcupdeluxe shows as candidates for install Lazarus 2.3.0 and Fpc 3.2.4 both of which releases seem not to exist yet... What is the deal here? -- Bo Berglund Developer in Sweden

fpcupdeluxe does exactly what you're looking for also in Linux/Unix environment. It keeps both Lazarus and fpc confined in the folder you select, which can of course be in your $HOME directory. The trick for Lazarus is quite simple, the icon it puts in your desktop just invokes the startlazarus in the folder, with pcp= a configuration file within the same folder. The trick for fpc is a bit a hack. As Lazarus requires that the name begins with fpc, it passes to Lazarus as fpc compiler an fpc.sh script, which sets the fpc configuration and the fpc executable in the folder. You'll see it in Tools->Options->Environment.

On Linux I never tried to install in Ubuntu, but I did install in many CentOs, Fedora, and Avahi environments. No reason why it should not work with Ubuntu. On Raspberry I did install without any problem. Just downloaded the appropriate tpcupdeluxe arm version. I installed also on the newest Mac with Apple Silicon M1 processor. As it doesn't use neither rpm nor apt-get, but just gets the files from svn or git repository, the target environment is irrelevant, provided the processor architecture is supported.

For cross-compiling you will need to pick up the appropriate options in the "cross" tab, after setting the basic options in the "Basic" one. I have done it a couple of years ago, to compile and test under Linux and then execute on Raspberry, but I don't remember the details. As far as I remember it was quite straightforward, with just some Raspberry libraries which had to be copied to Linux, in order to link them properly.

The reason for it to propose Lazarus 2.3.0 and Fpc 3.2.4 is that fpcupdeluxe doesn't care only about releases, it makes reference to git branches and tags. So if you select a released version, or the "Stable" one (which is the last release) you get a copy of a stable situation. If you select a "work in progress" release, you get the latest snapshot of that release. "Trunk" is the most recent one, for both, "Stable"

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email