A simple way to get lazarus compiled from source:
1. Install the right fpc via packages;
2. Compile lazarus from source via makefile

Salvatore


⁣Ottieni BlueMail per Android ​

Il giorno 7 Dic 2023, 11:50, alle ore 11:50, Mattias Gaertner via lazarus 
<lazarus@lists.lazarus-ide.org> ha scritto:
>
>
>On 07.12.23 11:22, Bo Berglund via lazarus wrote:
>>[...]
>> Also looked at the /usr/bin dir and it is owned by root so no chance
>of
>> installing as a user there...
>
>Yes, see
>https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
>
>
>> I thought that perhaps when running apt without sudo it would change
>install
>> path to something inside the $HOME location, but apparently not...
>
>You can extract a debian package anywhere, but you can install it only
>as root to fixed folders.
>
>
>>>> So how does this work?
>>>
>>> Lazarus tests before compiling a package if the output directory is
>>> writable and if not redirects to a sub directory of its config
>directory.
>>> This is a feature of the IDE and lazbuild.
>>> The makefiles do not support this, so a "make" fails.
>>
>> So to rebuild Lazarus from the command line I should use lazbuild,
>right?
>> What arguments are needed for lazbuild?
>>
>> I looked here: https://wiki.lazarus.freepascal.org/lazbuild
>>
>> So will this be sufficient:
>>
>> lazbuild --build-ide="Normal IDE" --pcp="$HOME/.lazarus_2.2.6"
>> --compiler=$HOME/bin/ppcarm
>
>Seeing all your experiments I don't know if it is sufficient for you.
>It
>sounds right.
>Although if you don't want to use the defaults, then I recommend to
>*not* install Lazarus from apt, but simply download the git, create a
>lazarus.cfg and "make clean all".
>
>
>> ...
>> If I use sudo apt install lazarus, will that also pull fpc as a
>dependency
>
>Yes.
>
>> or
>> should I use:
>>
>>   sudo apt install fpc lazarus
>>
>> instead?
>> And what about the lazarus sources, are they pulled in as well with
>the sudo apt
>> install lazarus command?
>
>Yes.
>
>
>>[...]
>> I have been building Fpc/Lazarus from sources since many years, also
>tested
>> fpcupdeluxe a few times. So getting/using the sources is known.
>>
>> I usually download the tarballs with a release tag from gitlab using
>wget.
>> After I have built fpc and symlinked into $HOME/bin I build Lazarus
>like this:
>>
>> cd $HOME/devtools/lazarus/2.2.6/
>> make clean PP=$HOME/bin/ppcarm && make bigide PP=$HOME/bin/ppcarm
>
>Shorter:
>make clean bigide PP=$HOME/bin/ppcarm
>
>
>>[...] > New fpc?
>> Being able to upgrade fpc on the side without disruption of Lazarus
>is also an
>> issue for me, is there some setting/config within the pcp directory
>that I can
>> change to point Lazarus to a new fpc compiler and it will then be
>possible to
>> rebuild Lazarus with that new compiler?
>
>For compiling your project set the compiler in Project Options. Use
>build modes for multiple platforms.
>For compiling the IDE with different fpc versions, install the fpc
>sources in paths that only differ in version number, so you can use the
>
>IDE macro $(FPCVer). Then you can easily switch the used fpc in Tools /
>
>Options / Env / Files.
>
>
>> And what about day-to-day project compiles if I want to use the new
>compiler?
>> Is it as simple as changing the symlink of $HOME/bin/ppcarm to point
>to the new
>> compiler? It would affect all user installs utilizing the ppcarm
>compiler.
>
>Using build modes sounds easier.
>
>Mattias
>--
>_______________________________________________
>lazarus mailing list
>lazarus@lists.lazarus-ide.org
>https://lists.lazarus-ide.org/listinfo/lazarus
-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to