Page 1 of 1

Lazarus 2 and fpc 3.0.4

Posted: Mon Mar 25, 2019 12:05 am
by zog
Dear All,
Has anyone managed to get Lazarus 2 up and running on Raspian Stretch.

I haven't been using Lazarus on the pi for a while so I thought I would download a noobs image and start from scratch.

I installed the stock version using
apt-get install lazarus

and then realised it was quite a few version behind the latest version so I decided to uninstall it and try to build it from source.

The installer fell over for Lazarus so I thought I might build fpc version 3.0.4 first but this won't build either as


is missing.

Anyone got any ideas ?

Re: Lazarus 2 and fpc 3.0.4

Posted: Mon Mar 25, 2019 6:01 am
by Gavinmc42
Someone really needs to build the binaries for Raspberry Pi's.
I did get the 64bit binary working in Gentoo64.
But the Laz build scripts expect an older compiler :o

Tried installing many times with many versions.
fpcupdeluxe is not perfect yet either.
I might actually have to read the manual.

The Ultibo install script works and installs Laz 1.6 and fpc 3.1.1, but it is very specific and not the full Laz/fpc.
But it is sign it is possible ;) If you know what you are doing.

Re: Lazarus 2 and fpc 3.0.4

Posted: Mon Mar 25, 2019 5:51 pm
by zog
Thanks for the reply. I will try to find out how to get fpc 3.0.4 to compile on the pi3 B+ as well as Lazarus 2. The guys over on the lazarus forums report that they have 3.0.4 running on the Pi 3 B+, so it's possible.

Re: Lazarus 2 and fpc 3.0.4

Posted: Tue Mar 26, 2019 12:44 am
by Gavinmc42
I found the premade binaries, even the aarch64 version 3.2-3.3, this saves compiling fpc.
They come with the text mode IDE FP so you can start doing stuff.
I have even used Geany to compile free pascal code ;)

The Laz compile scripts need to be modified, but that is a learning curve I have yet to master.
There is another IDE , MSEide and MSEgui that could be of use, sadly Martin has passed but many hope his code goes on.

I use Gentoo64 so as well as the native aarch64 version an armhf cross compiler is needed for 32bit code.
I also hope to cross compile for the RISC-V 32 and 64 one day.
It is all looking possible now with the latest versions.

If I remember right you can force Raspbian to install a newer version than the default.
Recently Debian split the install for fpc and lazarus to make this easier.

As Raspbian Debian is moving to 4.19 and 64bit, two versions will be needed.
It is much better now than 6 months ago, it will be easy in another 6 months.

Re: Lazarus 2 and fpc 3.0.4

Posted: Wed Apr 10, 2019 9:55 pm
by nicolap8
Hi all!
This is what I've done:

1) from I downloaded the script
2) executed and put fpc in /homes/pi/fpcminimal
3) fetch sources:

Code: Select all

svn co fpc304 
4) modify the makefile because it want to be compiled with a previuos version of fpc! Search for "REQUIREDVERSION"
5) use this script to compile (change fpcminimal path if required)

Code: Select all

sudo su
export PPC_CONFIG_PATH=/home/pi/fpcminimal/bin
make all install zipinstallall OPT="-dFPC_ARMHF -CX -CpARMV6 -CfVFPV2 -CaEABIHF -OpARMV6 -O2 -OoFASTMATH -XX -Xs" 
sudo rm -f /usr/local/bin/ppcarm
sudo ln -s /usr/local/lib/fpc/3.0.4/ppcarm /usr/local/bin/ppcarm 
Note1: You'll need a swap file of at least 512MB if you want to rebuild the Lazarus IDE
Note2: If you want to compile ONLY for RPi 3B change the -Cp and -Op options :-)

I wish that's all... at least for fpc: to compile Lazarus you need to fetch sources and compile. I've not done yet but the way is straight!

Re: Lazarus 2 and fpc 3.0.4

Posted: Thu Apr 11, 2019 1:03 am
by Gavinmc42
Ah, if only someone knew how to make a deb with the GPIO stuff included. ;)
It must be getting close, but the Raspbian one needs updating.

I have recently been using Laz/FPC to make and test language interpreters on Windows and Linux.
Next step is to try doing it on Pi's and then baremetal.

There is so much here that could be updated to Pi's.
Working my way through the Crenshaw tuts, learning lots.

Re: Lazarus 2 and fpc 3.0.4

Posted: Sat Apr 13, 2019 9:43 am
by Gavinmc42
I sometimes forget these pages.
Looks like there has been an update, Laz 2.0.0 with fpc 3.3.1

After I install Laz/fpc this is next.

Re: Lazarus 2 and fpc 3.0.4

Posted: Tue Aug 27, 2019 6:36 am
by ottod