Sign in Join
Wiki copytemporary

Install on aarch64 Arch or Manjaro: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Install on aarch64 Arch or Manjaro

OldNewLine
1+## Introduction
2+
3+As of August 2020 binary packages for Lazarus are not available for Arch or Manjaro Linux on 64 bit ARM (aarch64).
4+
5+A list of ARM packages for Arch Linux is available [here](https://archlinuxarm.org/packages).
6+
7+Manjaro is the default Linux version pre-installed on the Pinebook Pro for example.
8+
9+It is therefore necessary to download the FPC tar installer, FPC source, Lazarus source and compile Lazarus yourself.
10+
11+## Install Free Pascal
12+
13+1\. Install binutils
14+
15+``` bash
16+sudo pacman -Syu binutils
17+```
18+
19+2\. Download the FPC binaries
20+
21+Download the FPC binaries from [here](https://www.freepascal.org/down/aarch64/linux-hungary.html).
22+
23+3\. Unpack and install the FPC binaries
24+
25+``` bash
26+tar -xf fpc-3.2.0.aarch64-linux.tar
27+cd fpc-3.2.0.aarch64-linux
28+sudo sh install.sh
29+```
30+
31+4\. Download and unpack the FPC source
32+
33+Download fpc-3.2.0.source.tar.gz from [here](https://www.freepascal.org/down/source/sources.html), and unpack the it into some convenient directory (eg ~/fpc/fpc-3.2.0).
34+
35+5\. Test FPC
36+
37+Use an editor to create helloworld.pas:
38+
39+``` pascal
40+Program helloworld;
41+begin
42+ writeln ('Hello world');
43+end.
44+```
45+
46+Compile it:
47+
48+``` bash
49+fpc helloworld.pas
50+Free Pascal Compiler version 3.2.0 [2020/06/05] for aarch64
51+Copyright (c) 1993-2020 by Florian Klaempfl and others
52+Target OS: Linux for AArch64
53+Compiling helloworld.pas
54+Assembling helloworld
55+Linking helloworld
56+4 lines compiled, 0.5 sec
57+```
58+
59+Run it:
60+
61+``` bash
62+./helloworld
63+Hello world
64+```
65+
66+## Install Lazarus
67+
68+1\. Install the necessary Manjaro packages
69+
70+``` bash
71+sudo pacman -Syu make subversion qt5pas
72+```
73+
74+2\. Download the Lazarus source
75+
76+``` bash
77+cd
78+mkdir fpc
79+cd fpc
80+svn co https://svn.freepascal.org/svn/lazarus/trunk lazarus
81+```
82+
83+3\. Compile Lazarus
84+
85+``` bash
86+cd lazarus
87+make LCL_PLATFORM=qt5
88+```
89+
90+and run it:
91+
92+``` bash
93+./startlazarus
94+```
95+
96+## Add Lazarus to your KDE start menu
97+
98+1\. Create this file
99+
100+``` bash
101+touch ~/.local/share/applications/lazarus.desktop
102+```
103+
104+2\. Open the file you just created in an editor
105+
106+``` bash
107+kate ~/.local/share/applications/lazarus.desktop
108+```
109+
110+2\. Paste in this code
111+
112+`[Desktop Entry]`\
113+`Categories=Development;`\
114+`Comment=IDE`\
115+`Exec=~/fpc/lazarus/startlazarus %f`\
116+`GenericName=IDE`\
117+`Icon=lazarus-icon`\
118+`InitialPreference=9`\
119+`MimeType=text/plain;`\
120+`Name=Lazarus`\
121+`Path=`\
122+`StartupNotify=true`\
123+`Terminal=false`\
124+`TerminalOptions=`\
125+`Type=Application`\
126+`X-DBUS-ServiceName=`\
127+`X-DBUS-StartupType=`\
128+`X-KDE-HasTempFileOption=true`\
129+`X-KDE-SubstituteUID=false`\
130+`X-KDE-Username=`
131+
132+3\. Save the file and close the editor
133+
134+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>
135+
136+A new menu entry called "Lazarus" should appear in KDE's menu.
137+
138+## Acknowledgement
139+
140+[Original source of information](https://forum.manjaro.org/t/how-to-install-fpc-and-lazarus-on-pinebook-pro-arm-64-bit/152872).
141+
142+[Mirror of this article](https://wiki.pine64.org/wiki/Pinebook_Pro/Freepascal_and_Lazarus_IDE_on_Manjaro).
143+
144+---
145+*From the Free Pascal wiki, page "Install on aarch64 Arch or Manjaro", as it stood on 2020-12-06 after a change by Dieselnutjob, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history