Sven Barth wrote 14 lines
Bo Berglund via fpc-pascal schrieb am
Sa., 18. Nov. 2023, 11:32:
> Today after realizing that I did the following on an RPi4B where I have
> used apt
> to install the fpc compiler so I could use that as the seed compiuler to
> build
> from sources.
>
Why don't you simply follow what I DID? First of deinstall that apt fpc
again. Then download 3.2.2 for aarch64-linux from SourceForge, install it
and add /path/to/where/you/installed/fpc/bin to your PATH (using "export
PATH=/new/path:$PATH").
Here I lost you, is SF still in use? I thought that everything moved to GitLab some time ago?
And is there something like "install" in Linux apart from apt install which is what I used?
Show quoted text 21 lines
Best pick in an installation path like /wherever/fpc/<version> and select
"yes" when asked whether to adjust the fpc.cfg with $fpcversion, that will
come in handy later.
Next download the sources for 3.2.3 and extract them somewhere different
than "/wherever/fpc". Change into that directory and execute the commands
as I had written in my previous mail (you should be in the same command
line session where you adjusted PATH for this to work otherwise you need to
set it again). The INSTALL_PREFIX should be "/wherever/fpc/3.2.3".
Next set your PATH again, but this time use the directory for 3.2.3 ("echo
$PATH" plus selecting and pasting is your friend here, cause you don't want
to *extend* your path, but replace it; or simply start a new console
windows and append the path there now that I think about it ?).
Now you should have a working FPC and you can compile Lazarus from source
(sorry, don't know how to setup fpcupdeluxe to use an existing compiler,
cause I don't use it).
In Lazarus you then also need to set the path to your compiler.
I might have this wrong, but in that case I have been for many (10+) years...
I always put my sources in a place like $HOME/devtools/fpc/x.y.z and $HOME/devtools/lazarus/x.y.z
And I use make install pointing to a place below $HOME as well...
When installing from sources you have a hen-and-egg problem since you need a seed compiler on the pristine target system.
Usually I have been using a compiler from an earlier build on a similar system but in this case I did not have one for 64 bit Pi-OS. First time on 64 bit.
So I tried using fpcupdeluxe instead with the results shown.
But then I checked if I could get the compiler via apt and that did succeed and I could use it to build Lazarus itself.
And Lazarus works with this compiler on the target system.
Now I figured I had a seed compiler so I should be able to build a new fpc compiler from sources using the commands I had always used in the past, but this is where it went astray as shown.
I did not know that there is a library of seed compilers available on Sourceforge, I thought everything had moved over to GitLab nowadays, so where exactly can I find a binary download for PiOS 64 bit on SF? Where I have looked I only find old stuff like from 2021...
https://sourceforge.net/projects/freepascal/files/Linux/3.2.2/ Here are tarballs that by the size seem to contain a lot of stuff apart from the compiler itself.
Bo Berglund
Developer in Sweden