Gnat Programming Studio on Raspbian

Hi,

I want to program in Ada on my Raspberry Pi 5. I had a 2 and there I was able to install GPS. No idea which version of the raspbian it was. The current version of Raspbian doesn’t seem to have GPS available.

I tried Visual Studio Code but that is not very responsive and flickers. No idea why.

Is it possible to compile GPS from source on raspbian? Probably not the easiest way.

What other editor could be usable? I tried Emacs but I don’t get along with it.

Lea won’t work because it is Windows only?

Thank you very much

Currently GNAT Studio is distributed on GitHub release page. Take the last binary release for linux aarch64. It should work or rp, I hope. Take a look at

gnatstudio-2026.2-20260409-aarch64-linux-bin.tar.gz

Compiling it from the source code is a nontrivial task.

Raspbian is a Debian clone. I usually install Debian rather than Raspbian or switch to Debian (on older RPIs, Raspbian installer is nice). But it does not really matter, just add Debian repositories to the /etc/apt/sources.list and then install the gnat-gps package.

I never tried it on ARM, because it would be a torture to develop on a sluggish RPI. Ada is highly portable, you can develop anywhere and then build on the target using gprbuild.

However if I correctly remember, GPS works with MobaXTerm and Linux X Server without much problems, so you can at least use a decent display resolution of a desktop machine.

I have installed GPS from the archive but I get an error which I don’t understand:

$ gnatstudio

/opt/gnatstudio/bin/gnatstudio: line 128 ../gnatstudio_exe: cannot execute: required file not found

gnatstudio_exe is sitting right next to the scriptfile​:face_with_steam_from_nose:

I have used the aarch64-linux.

File command confirms it is 64-bit Arm

Thank you

At work I am not allowed to install something on the computers. All managed with Citrix nothing local.

I have installed everything on a whitelisted usb stick. Worked ok-ish. Some dependencies not compiling.

Alire getting upset because different versions of the same dependencies.

That’s why I bought the RPi

If it were only a sluggish editor…

I am doing more fighting with the set up of the environment than I am doing actual coding.

At work I use Excel VBA and work with an Access DB. Whatever one thinks about Microsoft but the VBA environment makes it very easy to get something done.

Something which Ada is lacking unfortunately.

I tried the Geany editor on the RPi and it is not sluggish. Unfortunately Alire has somehow died. Which compiled under Windows now no longer works. Have to investigate when I have some time.:face_with_steam_from_nose:

When I last played with Ada 10 years ago on Mac OS I didn’t have those problems.

I like Ada very much because otherwise I would already have abandoned.

This is deviates from the original question how to install GPS on an RPI.

If you need a comfortable environment on a portable medium that is a totally different issue. I would rather use a virtual machine with the OS of your preference, e.g. Windows, Ubuntu, Fedora.

I would never use stick or a SD card. They are extremely slow and get promptly destroyed if used under stress use. You need an SSD or a eMMC module. Nor would I buy an RPI, but rather an ODRIOD.

I do not comment on Alire.

GPS has a decent performance. Just do not install the latest version. It is broken.

Compilation problems on RPI are typically related to memory consumption. If you use the j0 switch you can easily run into a problem that all physical memory gets consumed and the system runs into the swap. Swapping on a SD card is a certain death for the OS and, possibly, for the card itself.

I tried the portable USB stick solution because I wanted to have an environment at work which doesn’t require any installation or writing to the PC. With the npm repo attacks and other supply chain attacks going on I don’t feel at ease putting an potentially contaminated stick into the company network.

VM is no option, booting a linux from an external drive neither as the bios is locked.

So a RPi was the solution. Should have taken the 500+ instead of the 500 but mistakes were done​:man_shrugging:t2:

Probably have to restart the project from scratch to get a clean slate.

I have an external ssd which I will use to put the write intensive stuff.

The dated thin clients we have at work aren’t better than the RPi.

Still no idea why GPS won’t work.

The little code editor which comes with Raspbian is compatible with Alire. Has no code auto complete or browser view for all the sources.

But it works.

I also have a Raspberry Pi 5 running Raspbian 64-bit. I just downloaded and installed the latest GNAT Studio release gnatstudio-2026.2-20260409-aarch64-linux-bin.tar.gz:

wget https://github.com/AdaCore/gnatstudio/releases/download/gnatstudio-2026.2-20260409/gnatstudio-2026.2-20260409-aarch64-linux-bin.tar.gz
tar xzf *.gz
cd gnatstudio-2026.2-20260409-aarch64-linux-bin/
sudo ./doinstall

Now /opt/gnatstudio/bin/gnatstudio from the command line works on my Raspbian system. I’m not fond of GPS/GNAT Studio (prefer Visual Studio Code), but it builds my gprbuild projects.

One annoyance: The GNAT Studio installer doesn’t create a .desktop file to populate the Raspbian command menu. You can copy the following to /usr/local/share/applications/gnatstudio.desktop to create a Programming menu item:

[Desktop Entry]
Type=Application
Name=AdaCore GNAT Studio
Comment=AdaCore GNAT Studio IDE Environement for developing Ada Programs
Exec=/opt/gnatstudio/bin/gnatstudio
Icon=/opt/gnatstudio/share/gnatstudio/icons/hicolor/32x32/apps/gnatstudio_logo.png
Terminal=false
Categories=Development;

Once upon a time I built GPS and/or GNAT Studio packages for Debian and Raspbian. If anybody is interested, I could resume same.

Debian packages are highly welcome.

That would be great.

I have managed to build GNAT Studio packages for Debian 13 amd64 (aka x86-64) and arm64 (aka AArch64) architectures. They are available at: https://repo.munts.com/debian13.

It was a terrible battle: I had to add more post-doinstall file patching (namely correcting paths in immodules.cache and loaders.cache) to the build procedure (see Makefile) since I last packaged GNAT Studio. The necessity of such unnatural acts to package GNAT Studio just lowers my already low opinion of it.

Thanks.

… and they use Python scripts too.

Might be easier to put it into an AppImage, FlatPak or Snap. Those also contain the dependencies and run unmodified on multiple distributions.

Thanks you, Philip, for taking the time for that.