Recent

Author Topic: Installing Lazarus on Raspberry PI OS  (Read 6836 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Installing Lazarus on Raspberry PI OS
« Reply #15 on: August 28, 2020, 11:53:41 am »
I also use Debian in a WSL2 config - only fpc331- . No problems at all.
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing Lazarus on Raspberry PI OS
« Reply #16 on: August 28, 2020, 11:56:15 am »
I also use Debian in a WSL2 config - only fpc331- . No problems at all.
32 bit / i386 version?
Is your binutils version i386?
dpkg-query -l | grep binutils

The Debian in the Microsoft Store for WSL is x86_64 (or are you on Windows 32 bit yourself :D )
Code: [Select]
rik@XPS8500:~$ uname -a
Linux XPS8500 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64 GNU/Linux
rik@XPS8500:~$ dpkg-query -l | grep binutils
ii  binutils                      2.31.1-16                    amd64        GNU assembler, linker and binary utilities
ii  binutils-common:amd64         2.31.1-16                    amd64        Common files for the GNU assembler, linker and binary utilities
ii  binutils-x86-64-linux-gnu     2.31.1-16                    amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  libbinutils:amd64             2.31.1-16                    amd64        GNU binary utilities (private shared library)

Like I said... only the i386 version of binutils 3.31.x gives trouble compiling FPC.
« Last Edit: August 28, 2020, 12:12:01 pm by rvk »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Installing Lazarus on Raspberry PI OS
« Reply #17 on: August 28, 2020, 12:14:30 pm »
I find that highly unlikely, since my Raspbian ld version is 2.31.1 and have no problems at all....

Are 2.31 and 2.31.1-something the same, or does that latter have the bug fixed?

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

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Installing Lazarus on Raspberry PI OS
« Reply #18 on: August 28, 2020, 12:19:06 pm »
2.31.1 is indeed a bugfix release but rvk has 2.3.1.

@rvk multi-arch works. But indeed I do not use 32 bit i386 anymore since a very long time. Will try with a VM
« Last Edit: August 28, 2020, 12:32:50 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing Lazarus on Raspberry PI OS
« Reply #19 on: August 28, 2020, 12:38:11 pm »
Are 2.31 and 2.31.1-something the same, or does that latter have the bug fixed?
Debian Buster has binutils 2.31.1-16 as standard for all architectures.
See https://packages.debian.org/buster/binutils

And the bintuils 2.31.1-16 for i386 has the problem.
https://bugs.freepascal.org/view.php?id=34475#c112412
Which isn't fixed because it's only the 2.31.x version on i386 which gives problems
https://bugs.freepascal.org/view.php?id=34475#c119027
Newer version for bullseye and sid (2.35-2) will probably be fine (but I haven't tested that).

Thaddy

  • Hero Member
  • *****
  • Posts: 14382
  • Sensorship about opinions does not belong here.
Re: Installing Lazarus on Raspberry PI OS
« Reply #20 on: August 28, 2020, 12:47:58 pm »
In that case try adding backports to your APT config. It may pull a more recent version from testing.
(IMO it is always a good idea to add backports anyway)
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing Lazarus on Raspberry PI OS
« Reply #21 on: August 28, 2020, 01:11:30 pm »
Unfortunately no binutils in backport or sloppy.
https://packages.debian.org/search?suite=buster-backports&keywords=binutils

And going to bullseye would probably mean that a lot of dependencies would be installed (giving the dependency hell).
Upgrading to full bullseye would then be easier (but probably not going to work with the raspberry pi os for PC).

Release of bullseye stable would fix everything anyway, probably  ;D

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Installing Lazarus on Raspberry PI OS
« Reply #22 on: August 28, 2020, 02:52:00 pm »
If you're running on a PC I'd suggest investigating Docker: it's quite useful for this sort of thing. I've got an x86_64 system behind my desk, and I've set up various 64- and 32-bit containers with Debian going back as far as Lenny.

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

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing Lazarus on Raspberry PI OS
« Reply #23 on: August 28, 2020, 02:58:12 pm »
I myself, use Virtualbox with Debian 64 bit for that.
I never use Debian 32 bit anymore (even my servers run 64 bit now).

But the original question from TS (RHollerich) was about Raspberry PI OS for PC so I investigated that because I remembered problems with Buster on i386 in Virtualbox in the past.

Can you run Lazarus from Docker? (TS wanted to compile Lazarus)

TRon

  • Hero Member
  • *****
  • Posts: 2538
Re: Installing Lazarus on Raspberry PI OS
« Reply #24 on: August 28, 2020, 04:31:32 pm »
Rats... it's this one: https://www.raspberrypi.org/downloads/raspberry-pi-desktop/
Not sure if that one is 64 bit. Trying now.
Thank you for testing and sharing your findings.

I installed the Raspberry Pi OS for PC and it indeed states x86_64.
The iso name is 2020-02-12-rpd-x86-buster.iso. (which could mean x86_32 and x86_64)

But according to this the kernel matches the CPU (x86_64 in my case in Virtualbox) but the programs should be 32bit.
https://www.raspberrypi.org/forums/viewtopic.php?t=220884#p1355424
Quote
Kernel loaded will match the CPU either x86-32 or x86-64...

..though it is 32bit userland...
That is plain confusing (to me).

Thanks for having figured that out, as I failed to try get that same information (without the need to install).

RHollerich

  • New member
  • *
  • Posts: 8
Re: Installing Lazarus on Raspberry PI OS
« Reply #25 on: August 28, 2020, 05:45:43 pm »
For those that asked, I don't remember the exact error messages, but they all started with "Skipping incompatible" files of one sort or another.

rvk is correct in that I am using the PC version of the Raspberry Pi Desktop found here https://www.raspberrypi.org/downloads/raspberry-pi-desktop/

I did try it and using the i386 version of fpc did work to compile the lazarus source without a problem.

For anyone that is having the same problems as I did and want to know how I installed fpc-3.2-0 and Lazarus 2.0.10 on both types of hardware, here are my quick and simple notes that I saved for next time I need to do this. There may be better ways to do this, but this worked for me and was very simple to do.

download
   for Pi hardware
      fpc-3.2.0.arm-linux.tar
   For Pi Desktop (PC version)
      fpc-3.2.0.i386-linux
      note: do not use the x86_64 version
   for both systems
      fpc-3.2.0.source.tar.gz
      lazarus-2.0.10-2.tar.gz

***** Free Pascal compiler install *******   
un-compress both fpc compiler and source tar files into a directory.
run install.sh from fpc directory and answer questions.

add path to /home/pi/.profile (hidden file)
   PATH="$HOME/[path to fpc folder]/bin:$PATH"

*********** restart pc to update path *****************

**Lazarus install

for PI hardware only - increase swapfile size.
    edit /etc/dphys-swapfile with root and change "CONF_SWAPSIZE=100" to "CONF_SWAPSIZE=1024"

un-compress lazarus tar file into a directory.

install dependencies
    sudo apt-get update
    sudo apt-get install build-essential
    sudo apt-get install gdb libx11-dev libgtk2.0-dev

from lazarus folder
   make clean
   make bigide

if using fcpupdeluxe to install fpc and lazarus,
use fpcupdeluxe-i386-linux, not the x86-64 version



MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Installing Lazarus on Raspberry PI OS
« Reply #26 on: August 28, 2020, 08:50:05 pm »
I myself, use Virtualbox with Debian 64 bit for that.
I never use Debian 32 bit anymore (even my servers run 64 bit now).
[You've obviously not tried compiling any of the more obscure Mozilla stuff recently :-/

Quote
Can you run Lazarus from Docker? (TS wanted to compile Lazarus)

Yes, otherwise I'd not have suggested it. If you don't mind.

Although in my case I usually cheat, by setting up an SSH server in the context of a Docker container at which point the Lazarus IDE (and much else) behaves exactly as though one were working between networked machines.

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

rvk

  • Hero Member
  • *****
  • Posts: 6169
Re: Installing Lazarus on Raspberry PI OS
« Reply #27 on: August 28, 2020, 09:47:46 pm »
Quote
Can you run Lazarus from Docker? (TS wanted to compile Lazarus)
Yes, otherwise I'd not have suggested it.
Actually, I meant to ask this for docker under Windows
(because you mentioned on a PC, not specifically under Linux).

Of course I know docker under Linux van access the GUI of Linux.
But I didn't think this was possible under Windows.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6692
Re: Installing Lazarus on Raspberry PI OS
« Reply #28 on: August 28, 2020, 10:10:32 pm »
What are these Windows of which you speak?

Good point, but all of my other comments in this thread have been specifically related to Debian and derivatives.

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

 

TinyPortal © 2005-2018