Difference between revisions of "Build current FPC and Lazarus for Raspbian"
From Free Pascal wiki
Jump to navigationJump to searchm |
m |
||
Line 3: | Line 3: | ||
Requirements: | Requirements: | ||
− | * Raspberry Pi 4 4 GB | + | * Raspberry Pi 4 4 GB (less memory models would require swap) |
− | * Latest Raspbian fully | + | * Latest Raspbian Buster fully updated |
Steps: | Steps: | ||
Line 15: | Line 15: | ||
# Temporarily add FPC install directory to PATH: <code>export PATH=$PATH:$HOME/fpc-3.0.2/bin</code>. If you reboot before completing the build you have to do this step again. | # Temporarily add FPC install directory to PATH: <code>export PATH=$PATH:$HOME/fpc-3.0.2/bin</code>. If you reboot before completing the build you have to do this step again. | ||
# Test if all ok: <code>fpc abcd</code>. This invokes the just installed compiler trying to compile a non-existent file (abcd). A multiline message will be shown including the compiler version. | # Test if all ok: <code>fpc abcd</code>. This invokes the just installed compiler trying to compile a non-existent file (abcd). A multiline message will be shown including the compiler version. | ||
+ | # Non-step note: the following steps are mostly based on [https://wiki.lazarus.freepascal.org/How_to_setup_a_FPC_and_Lazarus_Ubuntu_repository#Creating_the_deb_files_yourself this] | ||
+ | # Install development libraries: <code>sudo apt install libgtk2.0-dev libgpm-dev libncurses-dev</code> | ||
+ | # <code>mkdir ~/pascal</code> | ||
+ | # <code>cd ~/pascal</code> | ||
+ | # <code>svn co <nowiki>https://svn.freepascal.org/svn/fpc/tags/release_3_0_4</nowiki> fpc</code>, you have to be online for this and the next step to work. |
Revision as of 06:05, 27 August 2019
Raspbian Buster (based on Debian 10 Buster) has FPC and Lazarus available in the repositories, but they suffer from the same "design decisions" that don't allow for a nice experience, namely the smooth IDE rebuilding capability based on source packages that is possible with FPC/Lazarus official .deb packages vs the crippled experience with the official Debian/Raspbian packages. One wishes there were official FPC/Lazarus packages for Raspbian as there are for Intel Debian/Ubuntu, which are also frequently updated; not being that the case (at least for now), this page shows the steps for building your own FPC, FPC-source and Lazarus packages for Raspbian.
Requirements:
- Raspberry Pi 4 4 GB (less memory models would require swap)
- Latest Raspbian Buster fully updated
Steps:
- Install subversion:
sudo apt install subversion
- Get bootstrap FPC compiler
- Extract compiler. This will create a
fpc-3.0.2.arm-linux
directory. - In this directory, as pi user, run
./install.sh
- At the four prompts, answer
Enter, n, n, n
: this is, accept suggested directory/home/pi/fpc-3.0.2
, no Textmode IDE, no documentation, no demos. Ignoretar
warnings. Note the additional files written to/home/pi
:.fpc.cfg
,.config/fppkg.cfg
,.fppkg/config/default
. When the build is done, to delete this temporary bootstrap compiler these files and the/home/pi/fpc-3.0.2
install directory need to be deleted. - Temporarily add FPC install directory to PATH:
export PATH=$PATH:$HOME/fpc-3.0.2/bin
. If you reboot before completing the build you have to do this step again. - Test if all ok:
fpc abcd
. This invokes the just installed compiler trying to compile a non-existent file (abcd). A multiline message will be shown including the compiler version. - Non-step note: the following steps are mostly based on this
- Install development libraries:
sudo apt install libgtk2.0-dev libgpm-dev libncurses-dev
mkdir ~/pascal
cd ~/pascal
svn co https://svn.freepascal.org/svn/fpc/tags/release_3_0_4 fpc
, you have to be online for this and the next step to work.