install lazarus on raspberry pi os lazarus / 32-Linux ---------------------------------------------------------------------- Bobito · 2021-09-26 23:12 hello guys; what do I have to do in order to download and install lazarus on raspberry pi ?os? ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-26 23:34 Hey Bobito, Quote from: Bobito on September 27, 2021, 01:12:48 amhello 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 ---------------------------------------------------------------------- dbannon · 2021-09-26 23:53 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 ---------------------------------------------------------------------- Thaddy · 2021-09-27 06:39 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo nano /etc/dphys-swapfile3. Find CONF_SWAPSIZE and change the value to 2048 or 1024 Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i CONF_SWAPSIZE=20484. 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. ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-27 16:32 Hey Thaddy, Quote from: Thaddy on September 27, 2021, 08:39:57 am1. 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 ---------------------------------------------------------------------- ttomas · 2021-09-27 16:52 You can also try zram for swap. More info on https://forum.lazarus.freepascal.org/index.php/topic,39140.msg267617.h tml#msg267617 ---------------------------------------------------------------------- Bobito · 2021-09-28 00:47 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 · 2021-09-28 02:04 Hey Bobito, Quote from: Bobito on September 28, 2021, 02:47:38 amhttps://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0b is this the correct file i have to download? fpcums pdeluxe-armv6hf-linux If your RasPi is running the 32b Linux Raspbian distribution you need: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.2 .0b/fpcupdeluxe-arm-linuxIf your RasPi is running any 64b Linux distribution, like the Ubuntu Server that you then install the ubuntu desktop package, you'll need: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/v2.2 .0b/fpcupdeluxe-aarch64-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 ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-28 02:17 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/fpc updeluxe/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 ---------------------------------------------------------------------- MarkMLl · 2021-09-28 06:47 Quote from: Gustavo 'Gus' Carreno on September 27, 2021, 06:32:04 pmQuote from: Thaddy on September 27, 2021, 08:39:57 am1. 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 ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-28 09:35 Hey Mark, Quote from: MarkMLl on September 28, 2021, 08:47:28 amAs 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 ---------------------------------------------------------------------- MarkMLl · 2021-09-28 10:01 Quote from: Gustavo 'Gus' Carreno on September 28, 2021, 11:35:25 amYou'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 ---------------------------------------------------------------------- Gustavo 'Gus' Carreno · 2021-09-28 12:01 Hey Mark, Quote from: MarkMLl on September 28, 2021, 12:01:33 pmThat'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