Recent

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

kupferstecher

  • Sr. Member
  • ****
  • Posts: 305
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #30 on: August 27, 2019, 03:29:44 pm »
Hello Davo

By the way, the fpc binaries are available, but not the Lazarus ones: https://freepascal.org/download.html
Thats not a deb install you realise ?
Yes, I actually checked that before writing the last post.

Quote
Right now we are lucky, Buster has current fpc in its repo and just needs one (su) command to install. Why do anything else ?
The thing is, one normally wants to have the same version on the raspberry as on the desktop. Especially for cross compilation this is important, to prevent trouble opening the project on the raspberry while usually using the desktop. The up-to-dateness of 2.0.0 is ok right now, but there were a long time very old versions.

Quote
Hi kupferstecher, we'll have to disagree  there. As I said in above very long winded post, in my opinion by far the best Lazarus install for most users is to build from source in user's home directory. Its not much harder than a binary install and is much more usable. Its only four commands !
The fact that such tutorials like in this thread even exist, shows that some people struggle with the installation (that includes me). As far as I know there isn't even a official instruction on how to do the installation. I use pfcupdeluxe and it works. But sometimes there are strange errors and it's imho not the right tool for beginners, the install options are too various.

What is the problem in providing packages? Probably the additional efforts, but perhaps someone is willing to support here.

af0815

  • Sr. Member
  • ****
  • Posts: 360
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #31 on: August 27, 2019, 10:40:49 pm »
The package way is IMHO not designed for an selfcompiling project like fpc and lazarus. The deb are normaly fire and forget. But Lazarus must be able to make a selfcompiling. And this ist not a optimal way for programs residing in /usr. Under Windows you have nearly the same issue if you have a well configured system with a normal user, but normally you work under a elevated user. This is working like root under Linux. And root have no problems with recompiling 😊
regards
Andreas

ttomas

  • Full Member
  • ***
  • Posts: 181
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #32 on: August 28, 2019, 12:02:47 am »
Neat ttomas, do you use zram to provide swap (zswap like) or use it to make extra ram ?

Davo
Yes i use zram for swap. Pi 3 with 1gb ram cant build lazarus. Regular swap on sdcard is slooow. I watch the video of compiling qt5 36min with swap vs 7 min with zram swap and try the same with lazarus. Time difference is same.

dbannon

  • Hero Member
  • *****
  • Posts: 756
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #33 on: August 28, 2019, 02:22:29 am »
The thing is, one normally wants to have the same version on the raspberry as on the desktop.
I wonder if I have not been very clear here ? My recommendation is that you use fpc3.0.4 one way or another. And the Current Lazarus. So, the same on all platforms. Only way to do that is build from source.

Quote
....As far as I know there isn't even a official instruction on how to do the installation.
https://wiki.freepascal.org/Installing_Lazarus_on_Linux
It does not mention RaspberryPi, however it sounds like all thats different is you have to deal with the Pi's lower than typical memory.  I have never installed fpc/Lazarus on a Pi so until I am sure, I'd not add that to the wiki. Be great is someone esle did.  Thats how "official instructions" work here.

Quote
What is the problem in providing packages? Probably the additional efforts, but perhaps someone is willing to support here.
As you say, "someone to do it" - Lazarus and FPC are driven by volunteers. People do things they are fired up about, don't do the things that don't interest them personally. Its open source, you do something, someone else is free to criticize or build on it.
So, why don't you, as a RasPi user build a binary deb ?  Put it on your own website initially and tell the forum. If its well received, maybe someone will ask you to supply such ready made debs 'officially'. Who knows ?

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

valdir.marcos

  • Hero Member
  • *****
  • Posts: 831
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #34 on: August 28, 2019, 04:36:49 am »
Hi, this thread is an very good example, how a discussion shouldn't work.
With one thank you post, and about 20 posts missing the topic.
I have to disagree.
Collaborative work may take many forms. This topic is just an example of them.

Quote
But this was exactly the reason writing the tutorial.
You can find a lot of old descriptions or installation scripts, which are no more up-to-date and have all these different problems.
After the discussion, the tutorial, wiki or blog article would be welcome.

Quote
@Mi-Ki, if you did use the tutorial, you could find the sudo before ./install.sh
@rvk, why an installation of Lazarus as root is an absolutely no go? If you have more then one user, an installation in the home space is not very useful. For installing a program you almost do it as root.
Standard package installation is neither a show stopper nor the only solution for everybody.

Quote
Back to topic.
Again the question to the experts:
Why no lazarus-stable-deb package of the current version (like the deb- and rpm-packages for Intel/AMD) exists for the raspbian OS?
Lack of Debian developers to do the job. It's as simple as that:
The problem here is bigger than you think: man power lacking on many open source projects.
-------------------
Is Debian Dying?
Off the Beat: Bruce Byfield's Blog
Feb 11, 2011 GMT
Bruce Byfield
http://www.linux-magazine.com/Online/Blogs/Off-the-Beat-Bruce-Byfield-s-Blog/Is-Debian-Dying
-------------------

Open source developers are getting old, retiring and dying, and not being replaced as fast as that...
And a last piece of information: of course, Debian won't be dying any time soon.


Quote
It would be very helpful for the beginners. And it would bring a lot of new users.
Now, I think nothing would bring those many new users (programmers). Time has proved that.
Hypothetically, maybe if Delphi would be open sourced, as happened to Interbase 6.0, or abandoned, as happened to OpenOffice or Netbeans, that would bring some new programmers, not that many.
Pascal is neither taught in technical schools nor in universities any more as it was massively done in 1980's and 1990's. That era is gone.
Many new programmers went and still go to web and mobile development.
Delphi lost many programmers to other programming languages (mainly web and mobile) in the last two decades and they hardly ever come back...

[fpc-pascal] tiOPF is looking for a new project maintainer
Graeme Geldenhuys
Thu May 30 13:25:47 CEST 2019
https://lists.freepascal.org/pipermail/fpc-pascal/2019-May/056133.html
http://free-pascal-general.1045716.n5.nabble.com/tiOPF-is-looking-for-a-new-project-maintainer-td5733650.html
https://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg50984.html

valdir.marcos

  • Hero Member
  • *****
  • Posts: 831
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #35 on: August 28, 2019, 04:58:19 am »
The package way is IMHO not designed for an selfcompiling project like fpc and lazarus. The deb are normaly fire and forget.
Correct.
I can't remember any programming languages or IDEs that need to be recompiled similarly to Lazarus when installing new packages of components.

Quote
But Lazarus must be able to make a selfcompiling.
Others IDEs usually have another implementation for plugins and addons that does not require rebuilding the IDE itself.

Quote
And this ist not a optimal way for programs residing in /usr.
According to LFH (Linux Filesystem Hierarchy), the best place for solutions such as Lazarus would be /opt:
https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/c23.html
https://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.html

Quote
Under Windows you have nearly the same issue if you have a well configured system with a normal user, but normally you work under a elevated user.
Correct.

Quote
This is working like root under Linux. And root have no problems with recompiling.
Correct.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 831
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #36 on: August 28, 2019, 05:09:37 am »
What is the problem in providing packages? Probably the additional efforts, but perhaps someone is willing to support here.
As you say, "someone to do it" - Lazarus and FPC are driven by volunteers. People do things they are fired up about, don't do the things that don't interest them personally. Its open source, you do something, someone else is free to criticize or build on it.
So, why don't you, as a RasPi user build a binary deb ?  Put it on your own website initially and tell the forum. If its well received, maybe someone will ask you to supply such ready made debs 'officially'. Who knows ?
David
+1

@kupferstecher
You should attend Debian Events. They are really amazing.
https://www.debian.org/events/index.en.html

kupferstecher

  • Sr. Member
  • ****
  • Posts: 305
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #37 on: August 28, 2019, 02:47:49 pm »
The package way is IMHO not designed for an selfcompiling project like fpc and lazarus. The deb are normaly fire and forget. But Lazarus must be able to make a selfcompiling. And this ist not a optimal way for programs residing in /usr. Under Windows you have nearly the same issue if you have a well configured system with a normal user, but normally you work under a elevated user.
I normally use Lazarus under Windows, using the binaries from lazarus-ide.org and installed with the install wizard in a "non windows" directory. Rebuilds are no problem and no admin rights needed. In the PC-Linux installation (only for testing), I used the debian packages. As far as I remember there were also no issues with package installations/rebuilds. But I don't know what is happening under the hood.

Quote
....As far as I know there isn't even a official instruction on how to do the installation.
https://wiki.freepascal.org/Installing_Lazarus_on_Linux
It does not mention RaspberryPi, however it sounds like all thats different is you have to deal with the Pi's lower than typical memory.  I have never installed fpc/Lazarus on a Pi so until I am sure, I'd not add that to the wiki. Be great is someone esle did.  Thats how "official instructions" work here.
From the wiki:
- Option 1: Package manager -> outdated version
- Option 2: Compiled packages -> not available for ARM-Linux
- Option 3: Compile from source ->  :)

What is the problem in providing packages? Probably the additional efforts, but perhaps someone is willing to support here.
As you say, "someone to do it" - Lazarus and FPC are driven by volunteers. People do things they are fired up about, don't do the things that don't interest them personally. Its open source, you do something, someone else is free to criticize or build on it.
So, why don't you, as a RasPi user build a binary deb ?  Put it on your own website initially and tell the forum. If its well received, maybe someone will ask you to supply such ready made debs 'officially'. Who knows ?
David
+1

It's a good advice. And I'll have a look at it (never bundled a debian package before...).
But in my opinion it's only useful if it (regularly) finds it way to the official page. Perhaps the admins don't want to upload it for any reasons. Than it would be better to know in advance.

Linkat

  • New Member
  • *
  • Posts: 15
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #38 on: August 28, 2019, 05:12:09 pm »

Quote from: af0815 27.08.19 22:40
Quote
And this ist not a optimal way for programs residing in /usr.
Quote from: valdir.marcos 28.08.19 4:58
Quote
the best place for solutions such as Lazarus would be /opt:

I'm not an expert for installing linux programs.
I had a look in my filesystem of my (desktop pc) linux mint OS and voir là I found the fpc and lazarus folders in /usr/local/ /usr/share/ /usr/lib/ folders. I got this deb-package via lazarus-ide.org --> sourceforge.net. On my desktop PC and on my raspis Lazarus (in /usr) runs pretty good with it.
Please send your comments to the deb-packager.

Again: As you can see  we have a (endless) discussion.


Would be nice, if a team of experts starts to make a Lazarus installation package for the Raspberry Pi



metal mark

  • New Member
  • *
  • Posts: 38
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #39 on: October 01, 2019, 09:38:04 pm »
Thanks for your tutorial. i ran through it today and managed to get lazarus up and running on my RPi with 'on line package manager' included. I downloaded BGRA controls and when it asked for a rebuild instead of the 'cannot find fpdebug'  (which is a step forward )  it came up with :-
SVN not in path.
Lazarus.pp(167.0) Error.cant create assembler file :/usr/lib/lazarus/units/arm-linux/gtk2/lazarus.s

Any suggestions would be most welcome.

Linkat

  • New Member
  • *
  • Posts: 15
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #40 on: October 10, 2019, 08:05:18 am »
Hi metal mark,
I've the same problem with the BGRA components. But I've no idea for this problem. Please give a note, if you have a solution for this problem.

Best regards, linkat

metal mark

  • New Member
  • *
  • Posts: 38
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #41 on: October 14, 2019, 07:27:24 pm »
Well my way round it was to load a minimal operating system called DietPi. As I am not fluent with command line stuff I installed LXDE to give me a GUI. I tried installing Fpc and Lazarus but that failed on can't find 'make'. Last ditch time so I installed code typhon and it works really well and way faster than with buster or stretch. It loads as the 32 bit version so I had to install the BGRA controls which wasn't a problem. Takes quit some time but worth it in the end  :D.

Thaddy

  • Hero Member
  • *****
  • Posts: 9184
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #42 on: October 14, 2019, 08:07:53 pm »
Code: Bash  [Select]
  1. sudo apt-get install lazarus

How would I write a tutorial for that?  :( :o 8) %) :P :-[ :'(

One note: increase the swap file from 100Mb to 1 (or 2) GB , otherwise installing new packages will fail on anything other than a raspberry pi 4 with 2GB+ memory.
« Last Edit: October 14, 2019, 08:12:06 pm by Thaddy »
also related to equus asinus.

metal mark

  • New Member
  • *
  • Posts: 38
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #43 on: October 14, 2019, 09:54:36 pm »
If that's an attempt at sarcasm it somewhat fails. I have tried every conceivable combination of hints and tips on my RPi 3b+ to get Lazarus and fpc to work with BRGA controls installed , all sadly failing. I can understand why the people who teach programming to youngsters are abandoning Pascal if they, like me, have to spend hours learning the guts of the system it runs on to get it to work .  Lazarus is in my view a beautyful  GUI IDE  , but at the moment it is shooting itself in the foot by it not working out of the box. By the way making the swapfile 2Gig made no difference what so ever. I was over joyed to get a Pascal environment working on my RPi  with reasonable performance sadly not with Lazarus.

Thaddy

  • Hero Member
  • *****
  • Posts: 9184
Re: Tutorial: Install Lazarus to Raspberry Pi
« Reply #44 on: October 14, 2019, 10:15:33 pm »
Alas BGRA controls indeed fail. I grant you that. But it is not part of the default distribution and I already (amongst others) complained about that it does not work.
Some cynicism is always allowed on this forum, btw... Otherwise I do a Trexit... O:-)

There are better options, though, since the OpenGL stuff works OK since buster came out.
As it stands BGRA * should be excluded for armhf as incompatible.

Just don't use BGRA *. It is not the Holy Grail but just nice to have....
(If the maintainers of BGRA need a Raspberry Pi I will send them one, for free)
« Last Edit: October 14, 2019, 10:24:45 pm by Thaddy »
also related to equus asinus.