[fpc-pascal] Question regarding building fpc from sources

Michael Van Canneyt michael at freepascal.org
Thu Nov 30 10:50:02 CET 2023



On Wed, 29 Nov 2023, Bo Berglund via fpc-pascal wrote:

> I have for many years been building my Linux versions of fpc and lazarus from
> sources downloaded first from the svn repository and later from github.
> When doing the build on a new Linux system I need a seed compiler for the
> platform and I usually get that from earlier builds on other devices.
> To simplify things I have made tgz archives of the compilers I have built and
> put them on my website so I can then use wget on a new device to download them
> into the fpc dir on that platform.
>
> Now there has been a bit of pause in these activities and I am trying to catch
> up so I wanted to create the tgz files for two compilers on my latest build
> system (a Raspberry Pi4B running 32 bit bookworm OS).
>
> After building 3.2.2 using a compiler I already had in the fpc dir I exctracted
> the ppcarm compiler from the compiler directory in the source tree and put it
> into a tgz archive.
> But amazingly when I tried to locate the output compiler from when I built the
> 3.2.0 version a week ago it has disappeared!
> No trace of it inside the fpc/3.2.0/compiler directory!
>
> The difference from the newly built compiler is that a week ago I also ran the
> make install command to put source files etc into a directory below my $HOME
> dir. This step is not yet done for 3.2.2
>
> My script does this for the install operations (variables set before of course).
> The current dir for the command is at the top of the source tree such as
> $HOME/devel/fpc/3.2.0
>
> make install PREFIX="$HOME" FPC="$HOME/devel/fpc/3.2.0/compiler/$FPCCOMPILER"
>
> rm "$HOME/bin/$FPCCOMPILER"
>
> ln -sf "$HOME/lib/fpc/3.2.0/$FPCCOMPILER" "$HOME/bin/$FPCCOMPILER"
>
> make sourceinstall PREFIX="$HOME" FPC="$HOME/bin/$FPCCOMPILER"
>
> $HOME/lib/fpc/3.2.2/samplecfg $HOME/lib/fpc/3.2.2 $HOME
>
> mv "$HOME/fpc.cfg" "$HOME/.fpc.cfg"
>
> Somewhere in the process above the newly built compiler/ppcarm disappears from
> the compiler dir....
>
> Is this what should happen or is it an error?

Because installing sources requires a 'clean' source tree, 
'make sourceinstall' does a clean first.

So you should not do this as long as the compiler binary has not been 
moved somewhere else. (the make install normally does this).

Michael.


More information about the fpc-pascal mailing list