Sign in Join

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

Mailing lists / lazarus / 2023-02

Install Lazarus 2.2.4 on Ubuntu 20.04 LTS and other Linux

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

Need help after fpc/lazarus moved from subversion...

So I have been using Lazarus/FPC on Linux for a long time now (12+ years) and I have installed from sources using subversion access to the release tags on the source svn server.
I created a script I could use on all these platforms to do the complete installations of fpc, lazarus, dependencies and custom components etc.

This has been done on various Linux distros like Ubuntu 14-16-18-20 and RaspberryPi since about 2014 until 2020 or so.

Now after having paused my programming a bit over the Covid pandemic I am back and need to update my installations by adding the newest version 2.2.4.

But meanwhile the subversion server I have used has been replaced by some other versioning system so my script does no longer work...

So I am asking how can I install from scratch on Linux (Ubuntu on PC and PiOS for RaspberryPi) in such a way that the older versions can remain in place?

I googled a bit and found references to some deb files to download and use as sources, but then was also stated that installing one version would remove any other (earlier or later) existing version, which I surely do not want.

I need the 2.2.4 version to exist in parallel with my older versions 2.0.6, 2.0.8, 2.0.10 and 2.0.12, so I can still build my applications with either of them...

Please advice!

PS
I also have Lazarus installed on Windows-10 but this is done using the official sourceforge installers (i.e. not from source) and has resulted in separate installations for these versions so I can build my code also for Windows. DS

Bo Berglund Developer in Sweden

Reply by email

John Landmesser
to Bo Berglund
Bo Berglund wrote 37 lines
Need help after fpc/lazarus moved from subversion... So I have been using Lazarus/FPC on Linux for a long time now (12+ years) and I have installed from sources using subversion access to the release tags on the source svn server. I created a script I could use on all these platforms to do the complete installations of fpc, lazarus, dependencies and custom components etc. This has been done on various Linux distros like Ubuntu 14-16-18-20 and RaspberryPi since about 2014 until 2020 or so. Now after having paused my programming a bit over the Covid pandemic I am back and need to update my installations by adding the newest version 2.2.4. But meanwhile the subversion server I have used has been replaced by some other versioning system so my script does no longer work... So I am asking how can I install from scratch on Linux (Ubuntu on PC and PiOS for RaspberryPi) in such a way that the older versions can remain in place? I googled a bit and found references to some deb files to download and use as sources, but then was also stated that installing one version would remove any other (earlier or later) existing version, which I surely do not want. I need the 2.2.4 version to exist in parallel with my older versions 2.0.6, 2.0.8, 2.0.10 and 2.0.12, so I can still build my applications with either of them... Please advice! PS I also have Lazarus installed on Windows-10 but this is done using the official sourceforge installers (i.e. not from source) and has resulted in separate installations for these versions so I can build my code also for Windows. DS

?in my? simple script i changed just one line to get it working with new lazarus git sources:

? ' old svn code:

? #? svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus

? new code ( git needs to be installed )

? git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus

Alternative: look how its done by fpcupdeluxe:

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0n

good luck!

JohnML

Reply by email

Bo Berglund
to John Landmesser
John Landmesser wrote 9 lines
? ' old svn code: ? #? svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus ? new code ( git needs to be installed ) ? git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus

Thanks, I have been doing this:
svn co https://svn.freepascal.org/svn/fpc/tags/$FPCTAG/ $FPCVER svn co https://svn.freepascal.org/svn/lazarus/tags/$LAZTAG/ $LAZVER

where the variables have been preset to for example

FPCTAG=release_3_2_0
FPCVER=3.2.0
LAZTAG=lazarus_2_0_12
LAZVER=2.0.12

I have made sure that only tagged (stable) releases are used in my script. This could also be formulated like this to disconnect from the source repository:

svn export https://svn.freepascal.org/svn/fpc/tags/$FPCTAG/ $FPCVER

My problem with git clone is that it will pull way to much from the repository, basically *all* that has happened up until today and it would also get me the live development sources, which I do not want.

git clone makes the local store contain everything past and present, right?

Is there a way use git to:
- Only get a specific release tag (how do I find which tag to use)
- Only get the actual sources without the overhead (AKA export)

I have not used GIT for anything myself, we are on Subversion....

Bo Berglund Developer in Sweden

Reply by email

Bo Berglund
to John Landmesser: ?in my? simple script i changed just one line to get it working with new lazarus git…
John Landmesser wrote

So I have found that this is a path forward:

FPCTAG=release_3_2_2
FPCVER=3.2.2
LAZTAG=lazarus_2_2_4
LAZVER=2.2.4

...

cd $HOME/devel/fpc
wget
https://gitlab.com/freepascal.org/fpc/source/-/archive/$FPCTAG/source-$FPCTAG.tar.gz tar -xvf source-$FPCTAG.tar.gz
mv source-$FPCTAG $FPCVER
rm source-$FPCTAG.tar.gz

cd $HOME/devel/lazarus
wget
https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/$LAZTAG/lazarus-$LAZTAG.tar.gz tar xvf lazarus-$LAZTAG.tar.gz
mv lazarus-$LAZTAG 2.2.4
rm lazarus-$LAZTAG.tar.gz

This brings over just the sourcefiles for fpc and lazarus into the correct directories with no extra stuff.

Then the remainder of my install script should work (not yet done though).

Bo Berglund Developer in Sweden

Reply by email

Giuliano Colla
to Bo Berglund

Il 09/02/23 14:37, Bo Berglund via lazarus ha scritto:

Show quoted text 34 lines
On Thu, 9 Feb 2023 11:50:25 +0100, John Landmesser via lazarus wrote: > ? git clone https://gitlab.com/freepascal.org/lazarus/lazarus.git lazarus > So I have found that this is a path forward: FPCTAG=release_3_2_2 FPCVER=3.2.2 LAZTAG=lazarus_2_2_4 LAZVER=2.2.4 ... cd $HOME/devel/fpc wget https://gitlab.com/freepascal.org/fpc/source/-/archive/$FPCTAG/source-$FPCTAG.tar.gz tar -xvf source-$FPCTAG.tar.gz mv source-$FPCTAG $FPCVER rm source-$FPCTAG.tar.gz cd $HOME/devel/lazarus wget https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/$LAZTAG/lazarus-$LAZTAG.tar.gz tar xvf lazarus-$LAZTAG.tar.gz mv lazarus-$LAZTAG 2.2.4 rm lazarus-$LAZTAG.tar.gz This brings over just the sourcefiles for fpc and lazarus into the correct directories with no extra stuff. Then the remainder of my install script should work (not yet done though).

The best way I've found to solve this sort of problems is to use fpcupdeluxe, or at least the fpcupdeluxe technique. It just builds a fully isolated tree for each different Lazarus/fpc combinations you want. The trick for Lazarus is very simple, just a startup script pointing to the local Lazarus executable and configuration. For fpc, the fpc executable is just a fpc.sh which starts the local fpc with the local fpc config. On Linux I have two Lazarus 1.8 (one gtk2, the other Qt) with their fpc to support old applications, one Lazarus stable+fixes and one Lazarus trunk. On Mac Os the same. Give it a try.

Giuliano

Reply by email