Recent

Author Topic: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?  (Read 1033 times)

vonskie

  • Full Member
  • ***
  • Posts: 137
Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?

latest on back ports is 1.8.4


af0815

  • Sr. Member
  • ****
  • Posts: 296
try it with fpcupdeluxe and fix the error for not installed packages. You have to expand the swap with factor 10 to get no linker error from fpc.

Code: Pascal  [Select]
  1. #!/bin/bash
  2. # Paketliste auf neusten Stand bringen und Updaten
  3. sudo apt-get update
  4. sudo apt-get upgrade
  5.  
  6. # Die fehlenden Pakete installieren.
  7. sudo apt-get install libx11-dev
  8. sudo apt-get install libgdk-pixbuf2.0-dev
  9. sudo apt-get install libpango1.0-dev
  10. sudo apt-get install libgtk2.0-dev
  11.  
  12. # Für SVN
  13. sudo apt-get install subversion
  14.  
  15. # Für GIT
  16. sudo apt-get install git
  17.  
  18. #Auf dem Raspi muss evtl. für OpenGL folgendes installiert werden.
  19. sudo apt-get install libgl-dev
Source = http://wiki.freepascal.org/fpcupdeluxe/de

fpcupdeluxe from https://github.com/newpascal/fpcupdeluxe/releases/latest

« Last Edit: May 14, 2019, 11:08:09 am by af0815 »
regards
Andreas

Thaddy

  • Hero Member
  • *****
  • Posts: 8179
Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?

latest on back ports is 1.8.4
-This is written from a Raspberry pi 3 - did you solve it? because I am on Laz trunk and FPC trunk and there are no problems at all...
Code: Bash  [Select]
  1. pi@raspberrypi:~/fpc331 $ fpc -v
  2. Free Pascal Compiler version 3.3.1-r42061 [2019/05/14] for arm
  3. Copyright (c) 1993-2018 by Florian Klaempfl and others
  4.  

So what were your exact steps? (I really mean exact...e.g. some Russian po files have conflicts today, but these are not vital)
« Last Edit: May 14, 2019, 04:01:00 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

han

  • New member
  • *
  • Posts: 46
I had also problems and could only compile an older nightly edition Lazarus 1.9 (not the latest). Other versions where also problematic. However after installing the latest Raspbian operating system Buster, you get Lazarus 2.0.0 and FPC 3.0.4 by simply:

sudo apt-get install lazarus



Thaddy

  • Hero Member
  • *****
  • Posts: 8179
I had also problems and could only compile an older nightly edition Lazarus 1.9 (not the latest). Other versions where also problematic. However after installing the latest Raspbian operating system Buster, you get Lazarus 2.0.0 and FPC 3.0.4 by simply:

sudo apt-get install lazarus
No. Use - one time - fpcdeluxe. There are no problems. Again written from a Raspberri Pi 3 b. This weekend from a RPi 4 I hope... 8-)
If there are any problems, report back. I can compile ANY (stable) version that supports armhf on a Raspberry Pi without problems. Lazarus too...It's not rocket science, everybody can do it.
Can even be done on a RPi 1 B
Code: Bash  [Select]
  1. pi@raspberrypi:~ $ fpc -v
  2. Free Pascal Compiler version 3.3.1-r42284 [2019/06/25] for arm
  3. Copyright (c) 1993-2018 by Florian Klaempfl and others
« Last Edit: June 26, 2019, 06:05:09 pm by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

af0815

  • Sr. Member
  • ****
  • Posts: 296
fpc fixes32 with Laz fixe20 also possible with fpcupdeluxe an a raspi 3B+ with enlarged swap !!!!!
regards
Andreas

Thaddy

  • Hero Member
  • *****
  • Posts: 8179
Indeed, I would recommend a swap of at least 1 Gb (but not more than 2), certainly to compile Lazarus. FPC has less strain.
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

han

  • New member
  • *
  • Posts: 46
No. Use - one time - fpcdeluxe. There are no problems. Again written from a Raspberri Pi 3 b. This weekend from a RPi 4 I hope... 8-)
If there are any problems, report back. I can compile ANY (stable) version that supports armhf on a Raspberry Pi without problems. Lazarus too...It's not

Well, I again run into problems. If I want to recompile the installed Lazarus 2.0.0 in a Pi3 it stops with an error:

lazarus.pp(1,1) Fatal cannot find fpdebug.  used by Lazarus

But it is available in /usr/lib/lazarus/2.0.0/components so shouldn't be a problem. Path is set in tools environment

If I compile manually fpdebug.lpk, it stops at can't find virtualtree.....

Frustrating. It would be nice if a simple .deb installer was available on Sourceforge. I'm thinking going back to a older trunk 1.90 dailly build which worked fine for me and just type "make clean bigide".  Strange  enough "make clean bigide" doesn't work for the latest dailly build. Never had these problems in amd64.

Will have a look to fpcupdeluxe and memory swap size.  :(

Han
« Last Edit: June 26, 2019, 11:14:38 pm by han »

han

  • New member
  • *
  • Posts: 46
Okay increased the swap size as described https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/

Checked swap size by "free -m" indicating a swap of 1023

Did a rebuild of Lazarus 2.0.0 and get the same error:

   lazarus.pp(1,1) Fatal cannot find fpdebug  used by Lazarus


af0815

  • Sr. Member
  • ****
  • Posts: 296
Ok, actual working tested is
  fpc fixes32 with Laz fixe20 (by me)
  fpc trunk with Laz trunk (by Thaddy)

Maybe Lazarus 2.0.0 with FPC ??3.0.4?? is not working. 

Did this working with one of the working configurations ?
Quote
Will have a look to fpcupdeluxe and memory swap size.  :(

Quote
Frustrating. It would be nice if a simple .deb installer was available on Sourceforge. I'm thinking going back to a older trunk 1.90 dailly build which worked fine for me and just type "make clean bigide".  Strange  enough "make clean bigide" doesn't work for the latest dailly build. Never had these problems in amd64.
If you try it with the simply fpcupdeluxe installer, you need not to deal with packages. To have some 'nice' deb packages you need more peoplepower for building .deb packages for all flowers of linux with different 'spezialities'. This is on of the reasons for fpcupdeluxe - you can build direct from the sources with a well mainted tool (THX to Alfred !!!) on a lot of platforms. 
« Last Edit: June 27, 2019, 10:19:30 am by af0815 »
regards
Andreas

han

  • New member
  • *
  • Posts: 46
Re: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?
« Reply #10 on: June 27, 2019, 10:21:32 am »
Hello Andreas,

1) Tried all your update commands. Only the following did something effectively:

sudo apt-get install subversion

2) Then I tried to compile from command line

cd /etc/alternatives/lazarus
sudo make clean bigide

That worked.

3) Then I tried to rebuild "normal ide" from the Lazarus menu and this time it works! But why? I'm puzzled.

Han

« Last Edit: June 27, 2019, 10:23:11 am by han »

af0815

  • Sr. Member
  • ****
  • Posts: 296
Re: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?
« Reply #11 on: June 27, 2019, 10:24:09 am »
troubles with path and maybe old versions hanging around ?!
regards
Andreas

han

  • New member
  • *
  • Posts: 46
Re: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?
« Reply #12 on: June 27, 2019, 10:46:34 am »
I installed a clean Buster twice on my Pi3 and the same problem occurred. I have the impression that "make clean bigide" did the trick. Soon my Pi4 will arrive and I will try again.

Thanks for the advice.

Han

Thaddy

  • Hero Member
  • *****
  • Posts: 8179
Re: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?
« Reply #13 on: June 27, 2019, 10:59:56 am »
Be careful with Buster: even I went through hoops after installing it on a RPi 3.... and I am very experienced.
There are a lot of package dependencies that needs to be built yourself from source.  RaspBian Buster is rather incomplete.
Mostly make and ./configure but not suitable for people that have no experience with building C libraries from source.
I'd recommend to keep Stretch for a few months unless you can do the above.

We'll see: I am awaiting three RPi's 4 too....  :D ;) :) (2 two Gb, one 4 Gb )

BTW: The compiler itself is not the problem: simply go to the ./compiler directory and do make cycle.
« Last Edit: June 27, 2019, 11:05:09 am by Thaddy »
Read the manuals and if you are a professional get a proper education in computer science. Makes the forum a lot cleaner.

han

  • New member
  • *
  • Posts: 46
Re: Anyone able to get 3.0.4 fpc to compile lazarus 2.0.2 on rasberry PI?
« Reply #14 on: June 27, 2019, 11:31:27 am »
Be careful with Buster: even I went through hoops after installing it on a RPi 3.... and I am very experienced.
Stretch is no longer available. You get default Buster. I'm glad with it since it has Lazarus 2.0.0 (better then 1.6.2), so that's fine for me

I did some more testing and I think I found the reason why it doesn't recompile. I removed the compiled files of fpdebug as follows:

cd /etc/alternatives/components/fpdebug/lib/arm-linux
sudo rm *.*

So this removes all .ppu and .o files. Then I tried again in Lazarus rebuild. It stops at the same error "lazarus.pp(1,1) Fatal cannot find fpdebug  used by Lazarus"

So why are the *.o and *.ppu  *.compiled not generated by the rebuild? Is it not simply administrative rights? Lazarus is in /usr/lib/lazarus/2.0.0 What would be the correct approach to get the required rights? (Normally I work under Windows, so I'm unfamiliar with this)

Han
« Last Edit: June 27, 2019, 11:41:40 am by han »