Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-03

Raspberry Pi 3 build issues

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Anthony Walter

Has anyone here built Lazarus from SVN sources on the Raspberry Pi 3 yet? I keep running into various issues. This my latest issue from:

Using a compiler from fpc/branches/fixes_3_0 build with:

make all OPT="-dFPC_ARMHF" && make install PREFIX=$BASE/fpc

And the compiler works fine ....

svn co http://svn.freepascal.org/svn/lazarus/branchesbranches/fixes_1_6 lazarus
cd lazarus
make all

... after a whule and a few things succesfully compiling and linking this without errors this happens ...

/home/pi/Development/FreePascal/lazarus/ide/codeexplorer.pas(157,27) Hint: (5024) Parameter "Sender" not used
/home/pi/Development/FreePascal/lazarus/ide/codeexplorer.pas(157,49) Hint: (5024) Parameter "Msg" not used
(9009) Assembling codeexplorer
codeexplorer.pas(2883) Error: (9008) Can't call the assembler, error -1 switching to external assembling
codeexplorer.pas(2883) Fatal: (10026) There were 2 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Makefile:4004: recipe for target 'lazarus' failed
make[2]: *** [lazarus] Error 1
make[2]: Leaving directory '/home/pi/Development/FreePascal/lazarus/ide' Makefile:4428: recipe for target 'ide' failed
make[1]: *** [ide] Error 2
make[1]: Leaving directory '/home/pi/Development/FreePascal/lazarus/ide' Makefile:3070: recipe for target 'ide' failed
make: *** [ide] Error 2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160321/b8f53daa/attachment.html>

Reply by email

Bo Berglund
to Anthony Walter: Has anyone here built Lazarus from SVN sources on the Raspberry Pi 3 yet? I keep running…
Anthony Walter wrote
Has anyone here built Lazarus from SVN sources on the Raspberry Pi 3 yet? I keep running into various issues. This my latest issue from:

I have done so multiple times and to facilitate installation on a bare newly installed RPi3 with Raspbian Jessie I created a shellscript file that does all the work:

http://blog.boberglund.com/install_laz_pi.sh

- Download the file to your RPi3 home directory.
I guess you can use wget for that...

- Then change the permissions of the file:
chmod +x install_laz_pi.sh

- Finally start the script as user pi:
./install_laz_pi.sh

It will run for quite a while installing all of the build required modules and downloading both the seed compiler, the svn sources for fpc 3.0.0 and lazarus 1.6 releases.
Then it installs fpc seed compiler and builds the fpc 3.0.0 release and finally uses that to build the lazarus ide.
It also creates a start menu entry for Lazarus at the end.

HTH

Bo Berglund Developer in Sweden

Reply by email

Special
to Bo Berglund

Hi, Bo,
great script. Worked excellently.
Thank You - Hans

Bo Berglund wrote 29 lines
On Mon, 21 Mar 2016 05:53:05 +0000, Anthony Walter wrote: > Has anyone here built Lazarus from SVN sources on the Raspberry Pi 3 yet? I > keep running into various issues. This my latest issue from: I have done so multiple times and to facilitate installation on a bare newly installed RPi3 with Raspbian Jessie I created a shellscript file that does all the work: http://blog.boberglund.com/install_laz_pi.sh - Download the file to your RPi3 home directory. I guess you can use wget for that... - Then change the permissions of the file: chmod +x install_laz_pi.sh - Finally start the script as user pi: ./install_laz_pi.sh It will run for quite a while installing all of the build required modules and downloading both the seed compiler, the svn sources for fpc 3.0.0 and lazarus 1.6 releases. Then it installs fpc seed compiler and builds the fpc 3.0.0 release and finally uses that to build the lazarus ide. It also creates a start menu entry for Lazarus at the end. HTH

Reply by email

Anthony Walter
to Bo Berglund: On Mon, 21 Mar 2016 05:53:05 +0000, Anthony Walter I have done so multiple times and to…

Seeing as how SD CARD space is a premium on the Pi you should probably clean up after you build and install. This include doing things like this after make install:

cd $HOME/fpc
rm -rf .svn
find packages -name units | xargs rm -rf {0}
find rtl -name units | xargs rm -rf {0}
find packages -iname "*make*" -delete
find rtl -iname "*make*" -delete
rm -rf compiler
rm -rf installer
rm -rf share

Which will free up A LOT of SD CARD space. Also an addition note, there is no real reason (IMO) to install trunk or test revisions to root owned folders. Usually PREFIX=$HOME/fpc or something thereof will suffice. Oh and the complete command to generation a valid fpc.cfg (assuming install path is $HOME/fpc) is:

$HOME/fpc/fpcmkcfg -d basepath=$HOME/fpc/lib/fpc/\$FPCVERSION -o $HOME/fpc/bin/fpc.cfg

It should be noted that the default swap file size of Raspbian is only 100MB which combined with a possible GPU memory settings will occasionally cause Lazarus builds to fail mysteriously.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160323/0dce139c/attachment.html>

Reply by email

Bo Berglund
to Anthony Walter
Anthony Walter wrote 6 lines
Seeing as how SD CARD space is a premium on the Pi you should probably clean up after you build and install. This include doing things like this after make install: cd $HOME/fpc rm -rf .svn

There is no .svn dir in ~, but in the lazarus source dir du -sh ./dev/lazarus/1.6/.svn
157M ./dev/lazarus/1.6/.svn

find packages -name units | xargs rm -rf {0} find rtl -name units | xargs rm -rf {0} find packages -iname "*make*" -delete find rtl -iname "*make*" -delete

These find commands (excluding the piping) do not return anything...

rm -rf compiler rm -rf installer

Not found

rm -rf share

du -sh .local/share
116K .local/share

Which will free up A LOT of SD CARD space.

Those I found above sum to 273M, not so much...

I will have a since I usually run with 32 GB SDcards I don't feel the space cram...

Also an addition note, there is no real reason (IMO) to install trunk or test revisions to root owned folders. Usually PREFIX=$HOME/fpc or something thereof will suffice.

Right, when I did the script I specifically wanted to make it run as user Pi and install to the Pi home dir. Lazarus is therefore a user program and not a system resource.

However, I decided to use the FPC make install script to install FPC and it puts FPC in /usr AFIK. THis makes FPC global.

It should be noted that the default swap file size of Raspbian is only 100MB which combined with a possible GPU memory settings will occasionally cause Lazarus builds to fail mysteriously.

I originally had instructions for usage that specifically increased swap to 1000MB to get around this issue. But a forum user repeatedly claimed it was not necessary so I took tha part out and it does work on the RPi3 at least when I tried. Afetr all it has more RAM. But I agree that having bigger swap might not hurt anyway.

Bo Berglund Developer in Sweden

Reply by email

Mark Morgan Lloyd
to Bo Berglund
Bo Berglund wrote 9 lines
> It should be noted that the default swap file size of Raspbian is only > 100MB which combined with a possible GPU memory settings will occasionally > cause Lazarus builds to fail mysteriously. I originally had instructions for usage that specifically increased swap to 1000MB to get around this issue. But a forum user repeatedly claimed it was not necessary so I took tha part out and it does work on the RPi3 at least when I tried. Afetr all it has more RAM. But I agree that having bigger swap might not hurt anyway.

You'll generally need something like 512Mb of available memory, i.e. RAM
+ swap, with the linker in particular benefiting from extra. Around here, I'm being firmly discouraged (by other colleagues with an electronics background) from putting swap on the card, but instead putting it on an external USB device with wear levelling.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Anthony Walter
to Mark Morgan Lloyd
You'll generally need something like 512Mb of available memory, i.e. RAM

+ swap,

with the linker in particular benefiting from extra. Around here, I'm

being firmly

discouraged (by other colleagues with an electronics background) from

putting

swap on the card, but instead putting it on an external USB device with

wear levelling.

My Samsung EVO+ 32GB SDCARD cost me $10 from Amazon with shipping. I'm not too worried about it being worn down by excessive writes to the swap file. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20160325/723a84c2/attachment.html>

Reply by email

Florian Klämpfl
to Mark Morgan Lloyd: You'll generally need something like 512Mb of available memory, i.e. RAM + swap, with the…
Mark Morgan Lloyd wrote 17 lines
Bo Berglund wrote: >> It should be noted that the default swap file size of Raspbian is only >> 100MB which combined with a possible GPU memory settings will occasionally >> cause Lazarus builds to fail mysteriously. > > I originally had instructions for usage that specifically increased > swap to 1000MB to get around this issue. But a forum user repeatedly > claimed it was not necessary so I took tha part out and it does work > on the RPi3 at least when I tried. Afetr all it has more RAM. > But I agree that having bigger swap might not hurt anyway. You'll generally need something like 512Mb of available memory, i.e. RAM + swap, with the linker in particular benefiting from extra. Around here, I'm being firmly discouraged (by other colleagues with an electronics background) from putting swap on the card, but instead putting it on an external USB device with wear levelling.

SD cards do wear leveling as well.

Reply by email

Mark Morgan Lloyd
to Florian Klämpfl
Florian Kl?mpfl wrote 18 lines
Am 25.03.2016 um 11:19 schrieb Mark Morgan Lloyd: > Bo Berglund wrote: > >>> It should be noted that the default swap file size of Raspbian is only >>> 100MB which combined with a possible GPU memory settings will occasionally >>> cause Lazarus builds to fail mysteriously. >> I originally had instructions for usage that specifically increased >> swap to 1000MB to get around this issue. But a forum user repeatedly >> claimed it was not necessary so I took tha part out and it does work >> on the RPi3 at least when I tried. Afetr all it has more RAM. >> But I agree that having bigger swap might not hurt anyway. > You'll generally need something like 512Mb of available memory, i.e. RAM + swap, with the linker in > particular benefiting from extra. Around here, I'm being firmly discouraged (by other colleagues > with an electronics background) from putting swap on the card, but instead putting it on an external > USB device with wear levelling. > SD cards do wear leveling as well.

My understanding is that some do and some don't.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email