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