Recent

Author Topic: Tutorial: Install Lazarus to Raspberry Pi  (Read 26115 times)

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 610
  • Professional amateur ;-P
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #120 on: May 02, 2021, 12:57:01 am »
Hey John,

Got back from shopping and it was all done and installed with an icon on the desktop. 

I'm very glad that you're another satisfied customer ;)

First thing I'll do is make up a short document describing exactly what I did.  And since I have a Pi4 kicking around which I don't think has the fpcupdeluxe installed yet I'll verify the procedure in a simple step by step for that too.

Do not forget what I mentioned in this post above.

AAAHHHH nevermind, I'll just repeat it :)
Quote
So for example on a RasPi 3, RasPi4 on Raspbian:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-arm-linux

For RasPi4 on a 64b Linux:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-aarch64-linux

The usual make it executable applies and off you go to the races :)

Cheers,
Gus
Lazarus 2.3.0(trunk) FPC 3.3.1(trunk) Ubuntu 21.04 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.2(stable) Ubuntu 21.04 64b Dark Theme
http://github.com/gcarreno

jcdammeyer

  • Full Member
  • ***
  • Posts: 161
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #121 on: May 02, 2021, 01:46:23 am »
Hey John,


AAAHHHH nevermind, I'll just repeat it :)
Quote
So for example on a RasPi 3, RasPi4 on Raspbian:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-arm-linux

For RasPi4 on a 64b Linux:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-aarch64-linux

The usual make it executable applies and off you go to the races :)

Cheers,
Gus

But what about this from the web site?
Code: [Select]
sudo apt install make binutils build-essential gdb subversion zip unzip libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev
Isn't it required too for debugging or is that all automatically also done by the install and run of fpcupdeluxe?

John

dbannon

  • Hero Member
  • *****
  • Posts: 1497
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #122 on: May 02, 2021, 02:18:53 am »

But what about this from the web site?
Code: [Select]
sudo apt install make binutils build-essential gdb subversion zip unzip libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev
Isn't it required too for debugging or is that all automatically also done by the install and run of fpcupdeluxe?


You need that list of packages installed, if you are gong to make Qt5 app, add libqt5pas-dev to the list. Some will probably be installed before you got started, I dont know if fpcupdeluxe resolves dependencies.  It will do no harm to run that command, if the things listed are already installed, they won't be installed again nor will their config be messed with.

(If fpcupdeluxe has a problem, it is that it makes things too easy. You don't get to find out whats needed to build an app and you then don't know what to do if you need to do something a bit different, or are working on a system thats a bit different. Pretty soon, Alf will be the only person in our community that knows how to do these things  :)  I used fpcupdeluxe to install a Pico setup and it worked perfectly, but I don't know what it did.)

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

jcdammeyer

  • Full Member
  • ***
  • Posts: 161
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #123 on: May 02, 2021, 02:48:29 am »
(If fpcupdeluxe has a problem, it is that it makes things too easy. You don't get to find out whats needed to build an app and you then don't know what to do if you need to do something a bit different, or are working on a system thats a bit different. Pretty soon, Alf will be the only person in our community that knows how to do these things  :)  I used fpcupdeluxe to install a Pico setup and it worked perfectly, but I don't know what it did.)

Davo
I saw that PICO button on the bottom of the form.  A friend offered me the PICO.  I just sent him a screen shot since I've been trying to get him to move over to Lazarus from Delphi.   Likely won't happen for his work-work but since he has a PICO it might just give him a shove.

And I'd suggest that what fpcupdeluxe does is a good thing not a bad thing.  I'd guess 99% of the people haven't got a clue how things are installed anyway.   They just follow by wrote what they are told to do at the command line level.    If we had more people developing things like fpcupdeluxe for Linux systems with a programming environment like Lazarus we might see the tipping point reached where command line applications are considered the "lazy" or "how to appear more intelligent than anyone else" way.

Yes.  For example you could do the command line version of a G-Code generator for milling holes by writing a script that prints onto the command line and then when you want something different just place it there and use the line editor to change say the XY start location before hitting enter.  Tedious and error prone.

Or do it in Lazarus or Delphi like the attached photo.    The more of these easy to use tools that are out there the more people will start to wonder why they are given tools that do it the hard way.

jcdammeyer

  • Full Member
  • ***
  • Posts: 161
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #124 on: May 05, 2021, 01:11:16 am »
Hey John,


AAAHHHH nevermind, I'll just repeat it :)
Quote
So for example on a RasPi 3, RasPi4 on Raspbian:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-arm-linux

For RasPi4 on a 64b Linux:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.8.2r/fpcupdeluxe-aarch64-linux

The usual make it executable applies and off you go to the races :)

Cheers,
Gus

But what about this from the web site?
Code: [Select]
sudo apt install make binutils build-essential gdb subversion zip unzip libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev
Isn't it required too for debugging or is that all automatically also done by the install and run of fpcupdeluxe?

John

My RPi3 crashed and destroyed the partition so I've installed a new version on both it and also  on the Pi4 since the Debian version with linuxcnc kept dying with the fpcupdeluxe install.
Code: [Select]
[ 52%] Compiled package utils-json2pas
The installer encountered the following error:
External command "/home/pi/fpcupdeluxe/fpc/bin/arm-linux/pyacc h2pas/h2pas.y h2pas/h2pas.pas" failed with exit code 256. Console output:
TP Yacc Version 4.1a [April 2000], Copyright (c) 1990-2000 Albert Graef
FATAL: cannot open file /usr/lib/fpc/lexyacc/yyparse.cod
make[1]: *** [Makefile:2632: utils_all] Error 2
make: *** [Makefile:2837: build-stamp.arm-linux] Error 2

fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModuleCustom: FPC): Error running /usr/bin/make for FPC failed with exit code 512
. Details:


ERROR: Fpcupdeluxe fatal error !
Sequencer (FPC): Failure running fpcupdeluxe: error executing sequence FPC
Sequencer (DefaultSimple): Failure running fpcupdeluxe: error executing sequence DefaultSimple

Anyway.  On the new OS
pi@raspberrypi:~/projects $ uname -a
Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

Can I use the
fpcupdeluxe-aarch64-linux

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1476
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #125 on: May 05, 2021, 08:17:25 am »
Quote
Can I use the
fpcupdeluxe-aarch64-linux
No. Your uname output shows that your are using a 32bit OS (armv7l).
Quote
FATAL: cannot open file /usr/lib/fpc/lexyacc/yyparse.cod
This is an error that I have been hunting for a long time. Lots of tricks are used by fpcupdeluxe to prevent this error. But sometimes to no avail. Best extra trick: run fpcupdeluxe again. It should run as expected the second time.

jcdammeyer

  • Full Member
  • ***
  • Posts: 161
  • Embedded System Developer
    • Automation Artisans Inc.
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #126 on: May 05, 2021, 08:50:40 am »
Quote
FATAL: cannot open file /usr/lib/fpc/lexyacc/yyparse.cod
This is an error that I have been hunting for a long time. Lots of tricks are used by fpcupdeluxe to prevent this error. But sometimes to no avail. Best extra trick: run fpcupdeluxe again. It should run as expected the second time.

Thanks.  That helps.  Because the LinuxCNC version is designed to work with Ethernet to the MESA 7i92H I/O card it appears to have some trouble with my hardwired Ethernet.  The WiFi on the Pi4 connects but I'm not sure it's super reliable where the Pi4 is sitting.  Quite possible that some of the issues are network.  I've created the new SD card without the LinuxCNC part so it shouldn't have any trouble but I really did want it installed on the Pi4 LinuxCNC unit for compiling G-Code generation applications.

The up side is that the fpcupdeluxe with hardwired internet installed correctly onto the Pi3 and I then installed the modified lpk and I'm now where I wanted to be over 6 months ago.  The results are here.  Not sure if it's a psClear or psSolid issue or incorrectly passing a SET as a parameter but at least we're on track with a trouble report.

https://forum.lazarus.freepascal.org/index.php?topic=54329.new;topicseen#new

A true implementation of Write Once, Compile anywhere with the original code starting out as Delphi RAD Studio 10.3.

 

TinyPortal © 2005-2018