Sign in Join

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

Mailing lists / lazarus / 2023-02

Lazarus and FreePascal version relations on Linux and Windows?

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Bo Berglund

I have used Lazarus on Windows and Linux many years and I have built the Linux versions from sources but used the official installer for Windows.

On Linux I have had parallel versions of Lazarus but usually the same FPC and this has worked fine. I think that on Linux the FPC becomes a global version and then new Lazarus gets confused...

On Windows the installer separates the complete package into a separate directory which contains both Lazarus and FPC and none is put on system path. So when I have say 6 different versions of Lazarus on Windows they are all separate and do not conflict with each other.

Now I am having problems installing Lazarus 2.2.4 on Linux systems where older Lazarus version exist because they use an older FPC which the new Lazarus cannot use (3.0.4 vs 3.2.2).

On Linux FPC is put on path and so the instant one installs 3.2.2 on a system already using 3.0.4 disaster follows...

Is this the reason for the continued problems with fppkg?

And another question:

How can I force Lazarus to show the initial configuration page, which is shown on the very first start after installing Lazarus and later is skipped?

I think I remember that there is a way to show it from within Lazarus but I cannot find where now...

Either way I would like to look at the config page for a working system so I can see the differences between that and a Lazarus that behaves bad.

Bo Berglund Developer in Sweden

Reply by email

John Landmesser
to Bo Berglund
Bo Berglund wrote 6 lines
I have used Lazarus on Windows and Linux many years and I have built the Linux versions from sources but used the official installer for Windows. On Linux I have had parallel versions of Lazarus but usually the same FPC and this has worked fine. I think that on Linux the FPC becomes a global version and then new Lazarus gets confused...

*
*

*Which fpc is needed tells you the release notes ... that changes sometimes!*

Show quoted text 19 lines
On Windows the installer separates the complete package into a separate directory which contains both Lazarus and FPC and none is put on system path. So when I have say 6 different versions of Lazarus on Windows they are all separate and do not conflict with each other. Now I am having problems installing Lazarus 2.2.4 on Linux systems where older Lazarus version exist because they use an older FPC which the new Lazarus cannot use (3.0.4 vs 3.2.2). On Linux FPC is put on path and so the instant one installs 3.2.2 on a system already using 3.0.4 disaster follows... Is this the reason for the continued problems with fppkg? And another question: How can I force Lazarus to show the initial configuration page, which is shown on the very first start after installing Lazarus and later is skipped?

*
*

*That is in terminal lazarus --setup*

Show quoted text 7 lines
I think I remember that there is a way to show it from within Lazarus but I cannot find where now... Either way I would like to look at the config page for a working system so I can see the differences between that and a Lazarus that behaves bad.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20230222/5d8a0a5c/attachment-0001.htm>

Reply by email

Martin Frb
to Bo Berglund: I have used Lazarus on Windows and Linux many years and I have built the Linux versions…
Bo Berglund wrote
Now I am having problems installing Lazarus 2.2.4 on Linux systems where older Lazarus version exist because they use an older FPC which the new Lazarus cannot use (3.0.4 vs 3.2.2).

You can install several fpc on Linux.

** But you need to remove the global /etc/fpc.cfg and have it local to the install. **
You can look at the output of
??? fpc -va? empty_project.pas | grep fpc.cfg
to find the locations were fpc looks for it.

There may also be a way (I don't know) to have the IDE pass a param to fpc telling fpc which fpc.cfg to use....

And you either need to start the IDE via a script, setting a suitable %PATH env, so the correct fpc can be found. And fpc can find the correct ppc.
Or if you don't cross compile, you can invoke ppc directly .

I use the below. It allows several builds, even of the same version (debug / opt)

#!/bin/sh

mkdir -p /home/m/fpc/$INSTSRC
mkdir -p /home/m/fpc/$INSTSRC/source
cd /home/m/fpc/$INSTSRC/source

git -C? /home/m/fpc/svn/source --work-tree=/home/m/fpc/$INSTSRC/source restore .

### have a full working fpc in path to start the build

mkdir -p /home/m/fpc/$INSTPATH/
mkdir -p /home/m/fpc/$INSTPATH/def

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

make clean
make all? OPT="-g- -gl -O-2? "
make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/def

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

cd /home/m/fpc/$INSTPATH
def/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/def/lib/fpc/$INSTVERS

def/lib/fpc/etc/fpc.cfg

def/bin/fpcmkcfg -d basepath=/home/m/fpc/$INSTPATH/def/lib/fpc/$INSTVERS

def/etc/fpc.cfg

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

## use in the IDE /home/m/fpc/$INSTPATH/def/lib/fpc/$INSTVERS/ppcx64

And another question: How can I force Lazarus to show the initial configuration page, which is shown on the very first start after installing Lazarus and later is skipped?

lazarus --setup

In the git main version of lazarus you can also force certain checks to be skipped (including fppkg)
lazarus --help

--skip-checks=LazarusDir,FpcExe,FpcSrc,Make,Debbugger,Fppkg,Setup,MissingPackageFile,InstallDir,SingleInstance,All ????????????????????? Skip selected can put those into the ? lazarus.cfg
file (in the same directory as your lazarus exe // or your startlazarus exe, in case you use that and your lazarus is it the primary conf path)

Reply by email

Michael Van Canneyt
to Bo Berglund: I have used Lazarus on Windows and Linux many years and I have built the Linux versions…
Bo Berglund wrote 18 lines
I have used Lazarus on Windows and Linux many years and I have built the Linux versions from sources but used the official installer for Windows. On Linux I have had parallel versions of Lazarus but usually the same FPC and this has worked fine. I think that on Linux the FPC becomes a global version and then new Lazarus gets confused... On Windows the installer separates the complete package into a separate directory which contains both Lazarus and FPC and none is put on system path. So when I have say 6 different versions of Lazarus on Windows they are all separate and do not conflict with each other. Now I am having problems installing Lazarus 2.2.4 on Linux systems where older Lazarus version exist because they use an older FPC which the new Lazarus cannot use (3.0.4 vs 3.2.2). On Linux FPC is put on path and so the instant one installs 3.2.2 on a system already using 3.0.4 disaster follows...

On my home PC, I have 16 FPC versions installed, and 4 or 5 different lazarus systems. (in fact, a single lazarus installation, just with different --pcp options)

Yet I experience none of the problems that you experience.

The only thing that is different from a default setup is that I make symlinks /usr/local/bin/ppcx64-3.2.2 -> /usr/local/lib/fpc/3.2.2/ppcx64 (similar for the other tools)

A lazarus install always refers to a versioned ppc/fpc tool.

What we could possibly do is to install fpc with the version numbers suffixed, and an extra symlink to the current version without suffix. This way, when you install a newer version, the old version is still available.

Michael.

Reply by email