Difference between revisions of "Install on aarch64 Arch or Manjaro"

From Free Pascal wiki
Jump to navigationJump to search
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Platform only|ARM}}
+
{{Install on aarch64 Arch or Manjaro}}
=Introduction=
 
As of August 2020 binary packages for FPC and Lazarus are not available for Arch or Manjaro Linux on 64 bit ARM (aarch64).
 
  
A list of ARM packages for Arch Linux is available here https://archlinuxarm.org/packages
+
== Introduction ==
 +
 
 +
As of August 2020 binary packages for Lazarus are not available for Arch or Manjaro Linux on 64 bit ARM (aarch64).
 +
 
 +
A list of ARM packages for Arch Linux is available [https://archlinuxarm.org/packages here].
  
 
Manjaro is the default Linux version pre-installed on the Pinebook Pro for example.
 
Manjaro is the default Linux version pre-installed on the Pinebook Pro for example.
  
It therefore necessary to download the FPC tar installer, FPC source, Lazarus source and compile Lazarus youself.
+
It is therefore necessary to download the FPC tar installer, FPC source, Lazarus source and compile Lazarus yourself.
 +
 
 +
== Install Free Pascal ==
 +
 
 +
1. Install binutils
 +
 
 +
<syntaxhighlight lang=bash>
 +
sudo pacman -Syu binutils
 +
</syntaxhighlight>
 +
 
 +
2. Download the FPC binaries
 +
 
 +
Download the FPC binaries from [https://www.freepascal.org/down/aarch64/linux-hungary.html here].
 +
 
 +
3. Unpack and install the FPC binaries
 +
 
 +
<syntaxhighlight lang=bash>
 +
tar -xf fpc-3.2.0.aarch64-linux.tar
 +
cd fpc-3.2.0.aarch64-linux
 +
sudo sh install.sh
 +
</syntaxhighlight>
 +
 
 +
4. Download and unpack the FPC source
 +
 
 +
Download fpc-3.2.0.source.tar.gz from [https://www.freepascal.org/down/source/sources.html here], and unpack the it into some convenient directory (eg ~/fpc/fpc-3.2.0).
 +
 
 +
5. Test FPC
 +
 
 +
Use an editor to create helloworld.pas:
 +
 
 +
<syntaxhighlight lang=pascal>
 +
Program helloworld;
 +
begin
 +
  writeln ('Hello world');
 +
end.
 +
</syntaxhighlight>
 +
 
 +
Compile it:
 +
 
 +
<syntaxhighlight lang=bash>
 +
fpc helloworld.pas
 +
Free Pascal Compiler version 3.2.0 [2020/06/05] for aarch64
 +
Copyright (c) 1993-2020 by Florian Klaempfl and others
 +
Target OS: Linux for AArch64
 +
Compiling helloworld.pas
 +
Assembling helloworld
 +
Linking helloworld
 +
4 lines compiled, 0.5 sec
 +
</syntaxhighlight>
 +
 
 +
Run it:
 +
 
 +
<syntaxhighlight lang=bash>
 +
./helloworld
 +
Hello world
 +
</syntaxhighlight>
 +
 
 +
== Install Lazarus ==
 +
 
 +
1. Install the necessary Manjaro packages
 +
 
 +
<syntaxhighlight lang=bash>
 +
sudo pacman -Syu make subversion qt5pas
 +
</syntaxhighlight>
 +
 
 +
2. Download the Lazarus source
 +
 
 +
<syntaxhighlight lang=bash>
 +
cd
 +
mkdir fpc
 +
cd fpc
 +
svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus
 +
</syntaxhighlight>
 +
 
 +
3. Compile Lazarus
 +
 
 +
<syntaxhighlight lang=bash>
 +
cd lazarus
 +
make LCL_PLATFORM=qt5
 +
</syntaxhighlight>
 +
 
 +
and run it:
 +
 
 +
<syntaxhighlight lang=bash>
 +
./startlazarus
 +
</syntaxhighlight>
 +
 
 +
== Add Lazarus to your KDE start menu ==
 +
 
 +
1. Create this file
 +
 
 +
<syntaxhighlight lang=bash>
 +
touch ~/.local/share/applications/lazarus.desktop
 +
</syntaxhighlight>
 +
 
 +
2. Open the file you just created in an editor
 +
 
 +
<syntaxhighlight lang=bash>
 +
kate ~/.local/share/applications/lazarus.desktop
 +
</syntaxhighlight>
 +
 
 +
2. Paste in this code
 +
 
 +
[Desktop Entry]
 +
Categories=Development;
 +
Comment=IDE
 +
Exec=~/fpc/lazarus/startlazarus %f
 +
GenericName=IDE
 +
Icon=lazarus-icon
 +
InitialPreference=9
 +
MimeType=text/plain;
 +
Name=Lazarus
 +
Path=
 +
StartupNotify=true
 +
Terminal=false
 +
TerminalOptions=
 +
Type=Application
 +
X-DBUS-ServiceName=
 +
X-DBUS-StartupType=
 +
X-KDE-HasTempFileOption=true
 +
X-KDE-SubstituteUID=false
 +
X-KDE-Username=
 +
 
 +
3. Save the file and close the editor
 +
 
 +
4. Create a 48x48 xpm format icon and save it to /usr/share/pixmaps/lazarus-icon.xpm
 +
You can download mine from http://pscan.uk/images/lazarus-icon.xpm
 +
 
 +
A new menu entry called "Lazarus" should appear in KDE's menu.
 +
 
 +
== Acknowledgement ==
  
=Instructions=
+
[https://forum.manjaro.org/t/how-to-install-fpc-and-lazarus-on-pinebook-pro-arm-64-bit/152872 Original source of information].
Instructions to install FPC 3.20 and Lazarus for Manjaro are available here https://wiki.pine64.org/index.php?title=Freepascal_and_Lazarus_IDE_on_Manjaro
 
  
[[Category:Linux]]
+
[https://wiki.pine64.org/wiki/Pinebook_Pro/Freepascal_and_Lazarus_IDE_on_Manjaro Mirror of this article].
[[Category:ARM]]
 
[[Category:Install]]
 
[[Category:FPC]]
 

Latest revision as of 18:10, 6 December 2020

English (en)

Stock-dialog-warning.svg

This article applies to ARM only.

See also: Multiplatform Programming Guide

Crystal 128 penguin.png

This article applies to Linux only.

See also: Multiplatform Programming Guide


Introduction

As of August 2020 binary packages for Lazarus are not available for Arch or Manjaro Linux on 64 bit ARM (aarch64).

A list of ARM packages for Arch Linux is available here.

Manjaro is the default Linux version pre-installed on the Pinebook Pro for example.

It is therefore necessary to download the FPC tar installer, FPC source, Lazarus source and compile Lazarus yourself.

Install Free Pascal

1. Install binutils

sudo pacman -Syu binutils

2. Download the FPC binaries

Download the FPC binaries from here.

3. Unpack and install the FPC binaries

tar -xf fpc-3.2.0.aarch64-linux.tar
cd fpc-3.2.0.aarch64-linux
sudo sh install.sh

4. Download and unpack the FPC source

Download fpc-3.2.0.source.tar.gz from here, and unpack the it into some convenient directory (eg ~/fpc/fpc-3.2.0).

5. Test FPC

Use an editor to create helloworld.pas:

Program helloworld;
begin
  writeln ('Hello world');
end.

Compile it:

fpc helloworld.pas 
Free Pascal Compiler version 3.2.0 [2020/06/05] for aarch64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Linux for AArch64
Compiling helloworld.pas
Assembling helloworld
Linking helloworld
4 lines compiled, 0.5 sec

Run it:

./helloworld 
Hello world

Install Lazarus

1. Install the necessary Manjaro packages

sudo pacman -Syu make subversion qt5pas

2. Download the Lazarus source

cd
mkdir fpc
cd fpc
svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus

3. Compile Lazarus

cd lazarus
make LCL_PLATFORM=qt5

and run it:

./startlazarus

Add Lazarus to your KDE start menu

1. Create this file

touch ~/.local/share/applications/lazarus.desktop

2. Open the file you just created in an editor

kate ~/.local/share/applications/lazarus.desktop

2. Paste in this code

[Desktop Entry]
Categories=Development;
Comment=IDE
Exec=~/fpc/lazarus/startlazarus %f
GenericName=IDE
Icon=lazarus-icon
InitialPreference=9
MimeType=text/plain;
Name=Lazarus
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-HasTempFileOption=true
X-KDE-SubstituteUID=false
X-KDE-Username=

3. Save the file and close the editor

4. Create a 48x48 xpm format icon and save it to /usr/share/pixmaps/lazarus-icon.xpm You can download mine from http://pscan.uk/images/lazarus-icon.xpm

A new menu entry called "Lazarus" should appear in KDE's menu.

Acknowledgement

Original source of information.

Mirror of this article.