it is better to install an
official distribution. There is a pre-build official fpc 3.0.4 distribution available for the raspberry pi 1 here
ftp://freepascal.stack.nl/pub/mirrors/fpc/dist/3.0.4/arm-linux/fpc-3.0.4.arm-linux-eabihf-raspberry.tar.
Make sure you have installed subversion:
sudo apt-get update && sudo apt-get install subversion -ySimply
tar -xf and run
sudo sh install.sh or
sudo ./install.sh.
After that check out the lazarus sources:
cd ~/ && svn co https://svn.freepascal.org/svn/lazarus/tags/lazarus_1_8_0 lazarus and do
make all (or
make bigide if you have swapspace, I did not try that, you can always install more packages later) in the lazarus directory.
Start lazarus, install packages you want, e.g. the anchordocking packages, save, exit and do a
make useride.
Ready.
This works on my Raspberry Pi zero. For some packages there may be some dependencies missing, so you should install those by hand when necessary.
If you have installed and simply uninstalled (no purge and autoremove) an older version of fpc from the Raspbian repository, the dependencies should all be installed already.
This package is build for armv6 eabihf. (zero, 1 and older 2, will work on newer 2 and RPi3, though)
For RPi 3 and newer 2 there is a separate package built for ARMv7 eabihf.