[Lazarus] Raspberry Pi 3 build issues

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] Raspberry Pi 3 build issues

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 ....

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

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Anthony Walter
It would seem the issue is related to running without enough of memory. I decreased my GPU/RAM split, rebooted to text mode, and "make all"'ed on Lazarus successfully.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Bo Berglund
In reply to this post by Anthony Walter
On Mon, 21 Mar 2016 05:53:05 +0000, Anthony Walter <[hidden email]>
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


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

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

Am 21.03.2016 um 17:28 schrieb Bo Berglund:

> On Mon, 21 Mar 2016 05:53:05 +0000, Anthony Walter <[hidden email]>
> 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
>


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Anthony Walter
In reply to this post by Bo Berglund
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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Bo Berglund
On Wed, 23 Mar 2016 14:03:25 -0400, Anthony Walter <[hidden email]>
wrote:

>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 look at it. But 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


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

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.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Anthony Walter
> 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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Florian Klämpfl
In reply to this post by Mark Morgan Lloyd
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.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Andreas
This post has NOT been accepted by the mailing list yet.
In reply to this post by Special
Hi Bo,

great script!

Thanks a lot!

Andreas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Mark Morgan Lloyd
In reply to this post by Florian Klämpfl
Florian Klämpfl wrote:

> 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]

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Claudio
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bo Berglund
Hey Bo! Thank you very much !!! It worked on my new RbPi3 with Raspbian using all defaults. You did a great job!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

pbaran
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bo Berglund
  Bo :

  I just ran your script on my brand new Pi 3 and it failed with the following error message :

w: Failed to fetch http://plugwash.raspbian.org/wsp/dists/wheezy-wsf/main/binary-armhf/Packages 404 Not Found [IP: 5.153.225.206 80]

  I looked at plugwash.raspbian.org and it looks like there is a typo in the address for Packages
     http://plugwash.raspbian.org/wsp should be
     http://plugwash.raspbian.org/wsf

   I'm not sure what to do, any help would be appreciated.

    Thanks,
          Peter Baran
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

Pi3Fan
This post has NOT been accepted by the mailing list yet.
In reply to this post by Special
Hi, I'm a very unexperienced Linux user, but got Bo Berglunds script running.

When starting Lazarus I got the following (translated) error:

directory: /home/pi/dev/lazarus/1.6/

erorr: directory rtl not found
You can download FPC and the FPC-sources from http://sourceforge.net/projects/lazarus/?source=directory


My questions:
1. Shall I create a new directory /home/pi/dev/lazarus/1.6/rtl  ?
2. Which files/directories shall I download from the above mentioned source.

Thanks forhelping!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] Raspberry Pi 3 build issues

LuisGutierrez
This post has NOT been accepted by the mailing list yet.
In reply to this post by Bo Berglund
Dear Bo Boberglund,

I have tryied two or three Lazarus installation instructions without success. I Run your script install_laz_pi.sh and everything look nice until the end when it tryied to compile the LAzarus package. Previously, I changed the swap size to 1000. When  


/usr/bin/ld: aviso: ./link.res contiene secciones de salida. ¿Olvidó -T?
/usr/local/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: En la función `_haltproc_eabi':
(.text+0x88): referencia a `_fini' sin definir
/usr/local/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: En la función `_haltproc_eabi':
(.text+0x90): referencia a `_init' sin definir
svn2revisioninc.pas(791) Error: Error while linking
svn2revisioninc.pas(791) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Makefile:2740: recipe for target 'svn2revisioninc' failed
make[2]: *** [svn2revisioninc] Error 1
make[2]: Leaving directory '/home/pi/dev/lazarus/1.6/tools'
Makefile:3155: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/pi/dev/lazarus/1.6/tools'
Makefile:3080: recipe for target 'lazbuild' failed
make: *** [lazbuild] Error 2
install_laz_pi.sh: 143: Cannot make Lazarus bigide! Aborting

But I do not know why it fails and why it did not create the dirs !....
Loading...