Recent

Author Topic: install lazarus on raspberry pi os  (Read 3645 times)

Bobito

  • New Member
  • *
  • Posts: 21
install lazarus on raspberry pi os
« on: September 27, 2021, 01:12:48 am »
hello guys; what do I have to do in order to download and install lazarus on raspberry pi ?os?

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #1 on: September 27, 2021, 01:34:21 am »
Hey Bobito,

hello guys; what do I have to do in order to download and install lazarus on raspberry pi ?os?

The way I always do it is by downloading fpcupdeluxe latest release and use that to install it on the RasPI.

Hope that helps!

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: install lazarus on raspberry pi os
« Reply #2 on: September 27, 2021, 01:53:44 am »
Raspberry Pi OS is Linux so much of the discussion at https://wiki.freepascal.org/Installing_Lazarus_on_Linux applies.  If you are happy with the (relativly old) versions in the RP OS repository, dead easy.  I suggest you are better compiling Lazarus from source.

There is a spacial Raspberry Pi page, https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi - its not particularly well maintained (but still useful) because, as I said, Raspberry Pi OS is linux.

You can also cross compile, make binaries suitable for Raspberry Pi OS from a more regular box if you wish. Takes a little bit of setting up but thats good because you need to understand whats happening.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: install lazarus on raspberry pi os
« Reply #3 on: September 27, 2021, 08:39:57 am »
1. create a swap file with the same size as the memory (except for 4 or 8 G, for those it should not be necessary)
Code: Bash  [Select][+][-]
  1. sudo nano /etc/dphys-swapfile
3. Find CONF_SWAPSIZE and change the value to 2048 or 1024
Code: Bash  [Select][+][-]
  1. CONF_SWAPSIZE=2048
4. save and restart
5. download fpcdeluze (deian/raspbian for armhf). https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
6. run fpcdeluxe and select fpc+lazarus and appropiate versions
7. let fpcdeluxe build and install

For 4 or 8 G Pies, start with step 5.
« Last Edit: September 27, 2021, 08:48:26 am by Thaddy »
Specialize a type, not a var.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #4 on: September 27, 2021, 06:32:04 pm »
Hey Thaddy,

1. create a swap file with the same size as the memory (except for 4 or 8 G, for those it should not be necessary)

THANKS so much for the swap file reminder on the lower RAM Pi's!!

I've had to do it on mine and I always forget about that step!!

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: install lazarus on raspberry pi os
« Reply #5 on: September 27, 2021, 06:52:49 pm »

Bobito

  • New Member
  • *
  • Posts: 21
Re: install lazarus on raspberry pi os
« Reply #6 on: September 28, 2021, 02:47:38 am »
thanks you all for your assistance!!!
Thaddy let me see if I got your advice right.
from this page:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0b
is this the correct file i have to download?

fpcums pdeluxe-armv6hf-linux

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #7 on: September 28, 2021, 04:04:16 am »
Hey Bobito,

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0b
is this the correct file i have to download?

fpcums pdeluxe-armv6hf-linux


Both the older named Raspbian and the new Raspberry PI OS, from the https://www.raspberrypi.org site are both 32b and you'll need 1.

I'm not sure Raspberry Pi OS has a 64b version and the last time I checked, admittedly rather long ago, the only mention of a 64b Linux distribution for the RaspPi's that can handle it, was Ubuntu Server.

Time has passed and I haven't paid attention to the Raspberry Pi main site to see if there is now a 64b Linux distribution, so please make sure you give that a bit of a look :)

Hope this helps!!

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #8 on: September 28, 2021, 04:17:44 am »
Hey Bobito,

Hummm, had a look at this Raspberry Pi OS and it seams to be ARMHF, so maybe I gave you the wrong info.

For Raspbian, it is definitely https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.2.0b/fpcupdeluxe-arm-linux since this is what I have on my Raspberry Pi 3

And I think for ANY OS on a Raspberry Pi up to 3, that's the one.

From the Raspberry Pi 4 and up, I'm a bit confused now. I'm not completely sure what the architecture is, so I can't really give you a definitive answer.

What I'm actually sure is that if you install the Ubuntu flavour, that will need  the AARCH64 version. At least, that's what I remember Don saying when I asked him about it.

But now my memory is all tangled up and I don't even trust it to say that's right ARGHHHHH.

Nonetheless, for Raspbian or Raspberry Pi OS I'm defo foer sure it has to be the linux-arm version linked above, since that's what I'm using on my RasPi 3.

I now see that it's more of a mess than an helpful post, but I hope that someone else will pitch in with the correct answer for a 64b Linux Distribution like the ones listed here: https://ubuntu.com/download/raspberry-pi

And as a side note, looks like Ubuntu now lists a Desktop version also, not only the Server version. That's an improvement :)

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: install lazarus on raspberry pi os
« Reply #9 on: September 28, 2021, 08:47:28 am »
1. create a swap file with the same size as the memory (except for 4 or 8 G, for those it should not be necessary)

THANKS so much for the swap file reminder on the lower RAM Pi's!!

I've had to do it on mine and I always forget about that step!!

As a general point, remember that SD-Cards have a limited life and no load-levelling: putting swap and regularly-written logfiles on them is a bad idea.

I'm sure you've come across the tale of the Tesla model which screwed its control computer after some unreasonably-short time for precisely that reason. https://hackaday.com/2021/02/11/tesla-recalls-cars-with-emmc-failures-calls-part-a-wear-item/

MarkMLl
« Last Edit: September 28, 2021, 09:49:44 am by MarkMLl »
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #10 on: September 28, 2021, 11:35:25 am »
Hey Mark,

As a general point, remember that SD-Cards have a limited life and no load-levelling: putting swap and regularly-written logfiles on them is a bad idea.

You're quite correct as usual, but the fact is, you can't link a typical Lazarus compiled binary on a Raspberry Pi 3(or lower) without it. That's why fpcupdeluxe will give you a warning if you don't have the swap file up.

So the workaround is: Get it up for the first Lazarus build/linkage and then reverse it if your projects don't quite need it.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: install lazarus on raspberry pi os
« Reply #11 on: September 28, 2021, 12:01:33 pm »
You're quite correct as usual, but the fact is, you can't link a typical Lazarus compiled binary on a Raspberry Pi 3(or lower) without it. That's why fpcupdeluxe will give you a warning if you don't have the swap file up.

That's true, but the correct solution is to use a USB-connected thumb drive (or SSD etc.) which /does/ have wear levelling. I'd remind you that for the last four years or so it's even been possible to boot from external media: having an SD-Card socket is arguably better than only having an on-board Flash device, but having the option to boot from and use external media is even better.

Apropos linkage: back in the days when I was using NSLU-2 "Slugs" I found that 512Mb total storage (i.e. including swap) was adequate: the IDE could be built, albeit slowly (don't ask...). I think that the recommended minimum is now something like 1Gb, so an RPi3 without swap is marginal: I've not tried it recently since I've been using external storage for a long time even on variants which needed an SD-Card to load the kernel+devicetree.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1111
  • Professional amateur ;-P
Re: install lazarus on raspberry pi os
« Reply #12 on: September 28, 2021, 02:01:44 pm »
Hey Mark,

That's true, but the correct solution is to use a USB-connected thumb drive (or SSD etc.) which /does/ have wear levelling. I'd remind you that for the last four years or so it's even been possible to boot from external media: having an SD-Card socket is arguably better than only having an on-board Flash device, but having the option to boot from and use external media is even better.

Drats, drats and double DRATS, I always forget about mixed media.

You're absolutely correct, having an USB for swap is way better due to what you mention: The USB has less wear and tear factor than an SD card!!

I guess I need to go some sleep, cuz looking at the clock, it's been way too long this awake period :(

Thanks for the reminder, not only for me, but also for all the peeps following the thread :)

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018