Recent

Author Topic: Install Lazarus directly on Raspberry Pi?  (Read 993 times)

Aidex

  • New member
  • *
  • Posts: 14
Install Lazarus directly on Raspberry Pi?
« on: February 07, 2019, 07:31:01 am »
Beginner question ...
Hello! I'm a Windows user and don't really know much about Linux. But I would like to buy a Raspberry Pi for network tasks.
Actually I don't want to use a cross-compile over Windows, instead I want to program and compile directly on the Raspberry. Is that possible?
In the list of Lazarus downloads I see no compilation for Linux/ARM, only for i386 and amd64.
Is there a guide (and an easy way) to install Lazarus on Linux/ARM? Thanks!

silvioprog

  • New member
  • *
  • Posts: 5
Re: Install Lazarus directly on Raspberry Pi?
« Reply #1 on: February 07, 2019, 07:50:07 am »
Hello Aidex,

maybe you will use the Raspbian OS on your Raspberry PI board. If so, to install the Lazarus IDE and the Free Pascal compiler on it is easy, just open the terminal and perform the following commands:

Code: Pascal  [Select]
  1. sudo apt update
  2. sudo apt install lazarus

The attached picture shows the Lazarus working on my Raspbian copy, I've used the commands above.

Cheers

P.S: It will install an old Lazarus/FPC, however, it works fine and could be useful for you to start on Linux. ;)

Aidex

  • New member
  • *
  • Posts: 14
Re: Install Lazarus directly on Raspberry Pi?
« Reply #2 on: February 07, 2019, 08:25:39 am »
Thanks for that, I'll test it! Thanks a lot!

af0815

  • Full Member
  • ***
  • Posts: 219
Re: Install Lazarus directly on Raspberry Pi?
« Reply #3 on: February 07, 2019, 09:59:54 am »
It is possible with fpcupdeluxe to install the fpc fixes32 with Lazarus 2.0 (i use fixes20).

download the correct fpcupdeluxe on your raspi. You need not to use sudo with fpcupdeluxe, so you can build a Lazarus/FPC in your userdir without to deal with root

you have to expand the swap from 100 to 2000 in dphys-swapfile
Quote
sudo swapoff -a
sudo nano /etc/dphys-swapfile
sudo swapon -a

from http://wiki.lazarus.freepascal.org/fpcupdeluxe/de#Linux_Mint_64Bit.28_Ubuntu_.29_.2F_Rasperry

Quote
#!/bin/bash
# Paketliste auf neusten Stand bringen und Updaten
sudo apt-get update
sudo apt-get upgrade
 
# Die fehlenden Pakete installieren.
sudo apt-get install libx11-dev
sudo apt-get install libgdk-pixbuf2.0-dev
sudo apt-get install libpango1.0-dev
sudo apt-get install libgtk2.0-dev
 
# Für SVN
sudo apt-get install subversion
 
# Für GIT
sudo apt-get install git
 
# Wen OpenGL ( TOpenGLControl ) verwendet wird.
sudo apt-get install freeglut3-dev
#Auf dem Raspi muss evtl. für OpenGL folgendes installiert werden.

sudo apt-get install libgl-dev

after this start fpcupdeluxe and install what you want. On a RasPi 3B+ it is done in less one hour.
regards
Andreas

Aidex

  • New member
  • *
  • Posts: 14
Re: Install Lazarus directly on Raspberry Pi?
« Reply #4 on: February 07, 2019, 10:20:42 am »
Thank you, Andreas.
From a Setup.exe like on Windows, I'm quite spoiled.  :D
First I try the easy way. I'll take care of the details later.
Thank you for your effort.