Recent

Author Topic: (Solved) Compiling Lazarus IDE 2 on Raspberry Pi  (Read 7310 times)

jdp

  • Full Member
  • ***
  • Posts: 144
(Solved) Compiling Lazarus IDE 2 on Raspberry Pi
« on: July 29, 2019, 09:32:45 pm »
Hi all.

I have been using Lazarus on the Pi for about 4 years now and all works 100%.
I now got a new Pi 4 with the Buster OS. I did a apt-get install lazarus and it installed version 2

I need to add some visual componants to the IDE. If I add them from the online package manager and do a rebuild I get this error.

Code: Pascal  [Select][+][-]
  1. lazarus.pp(1,1) Fatal: Cannot find fpdebug used by Lazarus. Check if package fpdebug creates fpdebug.ppu, check nothing deletes this file and check that no two packages have access to the unit source..

What could be the issue now ?

Regards.
« Last Edit: August 01, 2019, 09:16:23 am by jdp »

pik33

  • Jr. Member
  • **
  • Posts: 76
Re: Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #1 on: July 30, 2019, 08:52:16 am »
I have the same error. Also, the Intel based PC with Debian 10 /Buster does the same thing

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #2 on: July 30, 2019, 09:22:08 pm »
Aaaa this is sooo frustrating.

I bought the book "LazarusHandbook" and followed all the steps to the letter. I got version 2.0.2 installed.

Now if I add packages I get the error

Code: Pascal  [Select][+][-]
  1. lazarus.pp(167,1) Error: Can't call the resource compiler "/usr/local/bin/fpcres", switching to external mode


Please help me.......

jdp

  • Full Member
  • ***
  • Posts: 144
Re: Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #3 on: July 30, 2019, 09:55:11 pm »
OK so I had to make the swap file 1024 MB. It seems the compiler ran out of memory.

Now When I want to install packages from the on-line package manager and now I get errors that the version of FPC is not supported.

Aaaa I want to cry .......

Mi-Ki

  • Jr. Member
  • **
  • Posts: 74
Re: (Solved) Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #4 on: August 23, 2019, 07:05:53 am »
Nobody solved yet?
Will it help to install the older version?

Thaddy

  • Hero Member
  • *****
  • Posts: 15704
  • Censorship about opinions does not belong here.
Re: Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #5 on: August 23, 2019, 07:54:45 am »
Aaaa this is sooo frustrating.

I bought the book "LazarusHandbook" and followed all the steps to the letter. I got version 2.0.2 installed.

Now if I add packages I get the error

Code: Pascal  [Select][+][-]
  1. lazarus.pp(167,1) Error: Can't call the resource compiler "/usr/local/bin/fpcres", switching to external mode


Please help me.......
create a swap of 1 GB (1024MB)
- Open /etc/dphys-swapfile as root :
Code: Bash  [Select][+][-]
  1. sudo nano /etc/dphys-swapfile
Goto the line that says CONF_SWAPSIZE=100
Change that to CONF_SWAPSIZE=1024
Save the file and reboot. ( ctrl-x and yes , sudo reboot)

The reason is that the compiler runs out of available memory.

We have already explained many times that Lazarus needs such a swap file to successfully build on a Raspberry Pi with 512 or 1024MB memory...
If you have a Raspberry Pi 4 with 2 or 4 GB these steps are not necessary anymore.

Note these steps are also necessary for large projects in other languages like clang or GNU C(++), e.g. building the kernel from source.
This is not FPC/Lazarus specific.

See screenshot
« Last Edit: August 23, 2019, 08:10:19 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

Mi-Ki

  • Jr. Member
  • **
  • Posts: 74
Re: (Solved) Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #6 on: August 23, 2019, 09:50:51 am »
Hi
I have Raspberry 4 4GB RAM - raspbian-buster
CONF_SWAPSIZE=1024

They don't add packers
lazarus.pp(1,1) Fatal: Cannot find fpdebug used by Lazarus.

packages => install/uninstall packages - fpdebug package not installed.
add to install - save and rebuilg  IDE

lazarus.pp(1,1) Fatal: Cannot find fpdebug used by Lazarus. Check if package fpdebug creates fpdebug.ppu, check nothing deletes this file and check that no two packages have access to the unit source..

How to solve?

Linkat

  • New Member
  • *
  • Posts: 19
Re: (Solved) Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #7 on: August 23, 2019, 06:27:39 pm »
I did'nt increase the swapfile, and I had no such problems.
Read the tutorial here:
https://forum.lazarus.freepascal.org/index.php/topic,46438.msg330919.html#msg330919

Good Luck

comdora

  • New Member
  • *
  • Posts: 12
Re: (Solved) Compiling Lazarus IDE 2 on Raspberry Pi
« Reply #8 on: August 21, 2021, 06:28:16 pm »
"lazarus.pp(1,1) Fatal: Cannot find fpdebug used by Lazarus." Would you write how you solved the problem?

 

TinyPortal © 2005-2018