Ada on the Raspberry Pi 5

Someone gave me a Raspberry Pi 5 as a present. I don't know much in detail about it other than it's a single board computer that is used for education and hobbyists to learn and build projects. I'm not sure what to do with it, but my job is writing low level code and I could benefit from learning some ARM assembly (as well as RISC-V and WASM, but there's only so many hours in the day). From time to time I write my hobby native code in Ada, so does that work on Raspberry Pi 5?

When I write Ada recently, I use a tool called Alire. It operates like a mashup of Rustup and cargo for Ada, handling package dependencies and installing what you need to build programs.

It's a veneer over the existing build system of the GNAT tooling for Ada to simplify dependency management, toolchains, and project setup. Its sort of like a fascade but for build tooling, since it hides the complexities of GNAT and gprbuild. Overall it's a great tool that works just fine with no configuration in many of my use cases.

Alire from the Package Manager (apt)

Looks like Raspberry Pi OS is a Debian-based Linux and uses apt to manage software packages. There's a version of Alire in the apt repository:

paul@tegu:~/dev/ada/ $ sudo apt search alire Sorting... Done Full Text Search... Done alire/stable,now 1.2.1-1 arm64 [installed] Ada package manager.

The Alire version available is quite old, 2.1 is the current Alire release.

My OS version is the Raspberry Pi OS recommended as of today, and my package listing is updated.

paul@tegu:~/dev/ada/alire $ uname -a Linux tegu 6.12.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux

Sidenote: "tegu" - for the last few years, I've been naming my computers after lizards. A tegu is a species of lizard that lives in Central and South America.

Making Alire 1.2 from apt work

The Alire from apt can work. There have been a lot of improvements since then, but here's how you can use it if needed.

sudo apt install alire

Does it recognize any toolchains to install?

paul@tegu:~/dev/ada/hello_raspberry $ alr toolchain --select Welcome to the toolchain selection assistant In this assistant you can set up the default toolchain to be used with any crate that does not specify its own top-level dependency on a version of gnat or gprbuild. If you choose "None", Alire will use whatever version is found in the environment. ⓘ gnat is currently not configured. (alr will use the version found in the environment.) ⚠ No indexed versions in the catalog for crate gnat ⓘ gprbuild is currently not configured. (alr will use the version found in the environment.) ⚠ No indexed versions in the catalog for crate gprbuild

So the apt version of Alire doesn't find any toolchains. This might be a problem with the Alire index for this particular architecture, but it's a much older Alire version that I'd rather not use, so I'm not going to spend more time analyzing this rabbit hole until I exhaust other options.

However, even though toolchain download doesn't find anything, I can manually download a toolchain using apt and use that instead.

sudo apt install gnat gprbuild

Throwing together a simple "Hello world" program:

alr init --bin hello_raspberry

with some code:

with Ada.Text_IO; procedure Hello_Raspberry is begin Ada.Text_IO.Put_Line("Hello, Raspberry!"); end Hello_Raspberry;

This builds and run from Alire using the tooling installed from apt:

paul@tegu:~/dev/ada/hello_raspberry $ alr run ⓘ Building hello_raspberry/hello_raspberry.gpr... Setup [mkdir] object directory for project Hello_Raspberry [mkdir] exec directory for project Hello_Raspberry Compile [Ada] hello_raspberry.adb Bind [gprbind] hello_raspberry.bexch [Ada] hello_raspberry.ali Link [link] hello_raspberry.adb Build finished successfully in 0.74 seconds. Hello, Raspberry!

That's ok, but I'd like to use the more recent Alire version and have it manage my gprbuild and gnat tools.

getada.dev

There's a site called getada.dev which can help you quickly get up and running with Ada, so I'll try to see if that provides a more recent Alire version.

There's a script you download and run, sort of like what Rust does.

paul@tegu:~/dev/ada $ curl --proto '=https' -sSf https://www.getada.dev/init.sh | sh info: downloading installer Welcome to the unofficial Alire Installer ("GetAda") v1.0.2! Alire is the official Ada Package Manager. For more information please visit https://ada-lang.io or https://alire.ada.dev Copyright (C) 2022-2024 A.J. Ianozi licensed GPL3. No version has been specified. Will attempt to install the latest version of Alire. (To specify a version, pass --alire-version=x.y.z) Temporary files will be stored in a folder in: /tmp (This can be changed with the "TMPDIR" environment variable or passing --tmp=/directory/here) Any of alire's scripts or helper files will store in the following location: /home/paul/.getada (This can be changed either by setting the "GETADA_CFG" environment variable or passing --cfg=/directory/here) Alire's binary will be installed as "alr" in the following location: /home/paul/.getada/bin (This can be changed either by setting the "GETADA_BIN" environment variable or passing --bin=/directory/here) This path will be added to your local PATH variable by modifying the following files: /home/paul/.profile (This can be changed by passing --no-path) You can revert everything that was done by re-running GetAda with the --uninstall option. Continue with installation? [y/n] (press "enter" with no input for interactive mode) >y Downloading https://github.com/alire-project/alire/releases/download/v2.1.0/alr-2.1.0-bin-aarch64-linux.zip to /tmp/tmp.JWshkxz3me7iSB25/alr-2.1.0-bin-aarch64-linux.zip Creating Directory: /home/paul/.getada Creating Directory: /home/paul/.getada/bin Extracting: /tmp/tmp.JWshkxz3me7iSB25/alr-2.1.0-bin-aarch64-linux.zip to /home/paul/.getada/bin Copying /tmp/tmp.s5XvWE918X/getada to /home/paul/.getada/bin/getada Testing binary by running "/home/paul/.getada/bin/alr --version" Unable to run binary... Attempting to troubleshoot. Attempting "/bin/chmod +x /home/paul/.getada/bin/alr" Testing binary by running "/home/paul/.getada/bin/alr --version" /home/paul/.getada/bin/alr: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/paul/.getada/bin/alr) Unable to run binary... Attempting to troubleshoot. Something went wrong... Aborting installation... Attempting to save log in HOME directory:/home/paul/log.dat Attempting to roll back to state before installer ran Uninstalling... Removing: /home/paul/.getada/bin/alr Removing: /home/paul/.getada/bin/getada Removing: /home/paul/.getada/bin Removing: /home/paul/.getada Alire has (hopefully) been uninstalled. To reinstall, please visit https://www.getada.dev/ Please press any key to continue. If filing a bug report, please attach the log. raised DEFAULTS.INVALID_FILE : /home/paul/.getada/bin/getada is not a valid executible by this system. [/tmp/tmp.s5XvWE918X/getada] 0x4442f4 installer__install at ??? 0x403e2c _ada_getada at ??? 0x403a30 main at ??? [/lib/aarch64-linux-gnu/libc.so.6] 0x7fff7acf773c 0x7fff7acf7814 [/tmp/tmp.s5XvWE918X/getada] 0x403b2c _start at ??? 0xfffffffffffffffc

Unfortunately the script doesn't work for Raspberry Pi 5. It doesn't look necessarily like the script's fault though. It does download the binary, it's the Alire binary that's the weak link here.

Testing binary by running "/home/paul/.getada/bin/alr --version" /home/paul/.getada/bin/alr: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /home/paul/.getada/bin/alr)

This looks like a loader issue, where it can't find the correct GLIBC version on the system to load into memory to satisfy the library requested from the program being executed. There's a excellent book called Advanced C and C++ Compiling which goes into extreme detail about this topic. There's also a much older book called "Linkers and Loaders."

getada.sh cleans up the directory it downloads, but if I download it myself, I can examine what it requests:

paul@tegu:~/dev/ada $ ldd -v bin/alr bin/alr: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by bin/alr) linux-vdso.so.1 (0x00007fff11ad8000) libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x00007fff10580000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00007fff103c0000) /lib/ld-linux-aarch64.so.1 (0x00007fff11aa0000) Version information: bin/alr: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.3) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_4.2.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.38) => not found libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.32) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.28) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.33) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libgcc_s.so.1: libc.so.6 (GLIBC_2.35) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libc.so.6: ld-linux-aarch64.so.1 (GLIBC_2.35) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_PRIVATE) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1

If I reinstall the Alire 1.2 version from apt, I can check to see what how GLIBC is being handled there:

paul@tegu:~/dev/ada/hello_raspberry $ ldd -v /usr/bin/alr linux-vdso.so.1 (0x00007ffec5848000) libgnatcoll.so.21 => /lib/aarch64-linux-gnu/libgnatcoll.so.21 (0x00007ffec4250000) libxmlezout.so.7 => /lib/aarch64-linux-gnu/libxmlezout.so.7 (0x00007ffec4210000) libgnarl-12.so => /lib/aarch64-linux-gnu/libgnarl-12.so (0x00007ffec41a0000) libgnat-12.so => /lib/aarch64-linux-gnu/libgnat-12.so (0x00007ffec3d60000) libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x00007ffec3d20000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00007ffec3b60000) libgnatprj.so.10 => /lib/aarch64-linux-gnu/libgnatprj.so.10 (0x00007ffec31f0000) libxmlada_schema.so.7 => /lib/aarch64-linux-gnu/libxmlada_schema.so.7 (0x00007ffec3110000) libxmlada_dom.so.8 => /lib/aarch64-linux-gnu/libxmlada_dom.so.8 (0x00007ffec30d0000) libxmlada_sax.so.7 => /lib/aarch64-linux-gnu/libxmlada_sax.so.7 (0x00007ffec3060000) libxmlada_input.so.7 => /lib/aarch64-linux-gnu/libxmlada_input.so.7 (0x00007ffec3030000) libxmlada_unicode.so.7 => /lib/aarch64-linux-gnu/libxmlada_unicode.so.7 (0x00007ffec2c90000) /lib/ld-linux-aarch64.so.1 (0x00007ffec5810000) libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x00007ffec2bf0000) Version information: /usr/bin/alr: libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libgnatcoll.so.21: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.33) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlezout.so.7: libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libgnarl-12.so: libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.32) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libgnat-12.so: libm.so.6 (GLIBC_2.27) => /lib/aarch64-linux-gnu/libm.so.6 libm.so.6 (GLIBC_2.29) => /lib/aarch64-linux-gnu/libm.so.6 libm.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libm.so.6 libc.so.6 (GLIBC_2.28) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.33) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_4.2.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_3.3) => /lib/aarch64-linux-gnu/libgcc_s.so.1 /lib/aarch64-linux-gnu/libgcc_s.so.1: libc.so.6 (GLIBC_2.35) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libc.so.6: ld-linux-aarch64.so.1 (GLIBC_2.35) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_PRIVATE) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 /lib/aarch64-linux-gnu/libgnatprj.so.10: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlada_schema.so.7: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlada_dom.so.8: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlada_sax.so.7: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlada_input.so.7: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libxmlada_unicode.so.7: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libm.so.6: ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1 libc.so.6 (GLIBC_PRIVATE) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6

Poking around, it seems that the Pi only has GLIBC 2.36 available:

paul@tegu:~/dev/ada $ /lib/aarch64-linux-gnu/libc.so.6 GNU C Library (Debian GLIBC 2.36-9+rpt2+deb12u10) stable release version 2.36.

Building Alire from Source

Will Alire work if I build from source? It doesn't build itself using itself, and since gnat and gprbuild are the underlying tech, will it build if I use those packages from apt?

Removing the old Alire (again) and grabbing the gnat toolchain:

sudo apt remove alire sudo apt install gnat gprbuild

The build steps provided in the readme work and it builds successfully!

git clone --recurse-submodules https://github.com/alire-project/alire.git cd alire dev/build.sh

The clone grabs the most recent version, so I can dogfood on the bleeding edge or swap over to the stable version and use that instead if I want.

paul@tegu:~ $ bin/alr --version alr 3.0.0-dev

How do its libraries get satisfied?

paul@tegu:~ $ ldd -v bin/alr linux-vdso.so.1 (0x00007fffb4478000) libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x00007fffb2d40000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00007fffb2b80000) /lib/ld-linux-aarch64.so.1 (0x00007fffb4440000) Version information: bin/alr: libgcc_s.so.1 (GCC_3.3) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_3.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libgcc_s.so.1 (GCC_4.2.0) => /lib/aarch64-linux-gnu/libgcc_s.so.1 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.32) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.28) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.33) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libgcc_s.so.1: libc.so.6 (GLIBC_2.35) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.34) => /lib/aarch64-linux-gnu/libc.so.6 libc.so.6 (GLIBC_2.17) => /lib/aarch64-linux-gnu/libc.so.6 /lib/aarch64-linux-gnu/libc.so.6: ld-linux-aarch64.so.1 (GLIBC_2.35) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_PRIVATE) => /lib/ld-linux-aarch64.so.1 ld-linux-aarch64.so.1 (GLIBC_2.17) => /lib/ld-linux-aarch64.so.1

It built, but does it let me grab toolchains with it? First, I need to remove my built-in gnat and gprbuild. This isn't strictly necessary, but more to prove the point that I don't need them installed to use Alire to build Ada projects since it can manage toolchains.

sudo apt remove gnat gprbuild sudo apt autoremove

Now to grab my toolchains:

paul@tegu:~/dev/ada/hello_raspberry $ alr toolchain --select Welcome to the toolchain selection assistant In this assistant you can set up the default toolchain to be used with any crate that does not specify its own top-level dependency on a version of gnat or gprbuild. If you choose "None", Alire will use whatever version is found in the environment. ⓘ gnat is currently not configured. (alr will use the version found in the environment.) Please select the gnat version for use with this configuration 1. gnat_native=14.2.1 2. None 3. gnat_arm_elf=14.2.1 4. gnat_avr_elf=14.2.1 5. gnat_riscv64_elf=14.2.1 6. gnat_xtensa_esp32_elf=14.2.1 Enter your choice index (first is default): > 1 ⓘ Selected tool version gnat_native=14.2.1 ⓘ Choices for the following tool are narrowed down to releases compatible with just selected gnat_native=14.2.1 ⓘ gprbuild is currently not configured. (alr will use the version found in the environment.) Please select the gprbuild version for use with this configuration 1. gprbuild=24.0.1 2. None Enter your choice index (first is default): > 1 ⓘ Selected tool version gprbuild=24.0.1 ⓘ Deploying gprbuild=24.0.1... ################################################# 100.0% ⓘ gprbuild=24.0.1 installed successfully. ⓘ Deploying gnat_native=14.2.1... ################################################# 100.0% ⓘ gnat_native=14.2.1 installed successfully.

Ok, so now I have Alire-managed toolchain to build, does my "Hello, World" program build and run?

paul@tegu:~/dev/ada/hello_raspberry $ alr clean paul@tegu:~/dev/ada/hello_raspberry $ alr run ⓘ Building hello_raspberry=0.1.0-dev/hello_raspberry.gpr... Compile [Ada] hello_raspberry.adb Bind [gprbind] hello_raspberry.bexch [Ada] hello_raspberry.ali Link [link] hello_raspberry.adb ✓ Build finished successfully in 0.62 seconds. Hello, Raspberry!

What symbols were missing?

Using objdump I can look for the symbols which are missing from GLIBC 2.38 from the downloaded version of Alire. The gist is that there's a hole indicating an expected function to be found at runtime, that cannot be fulfilled.

paul@tegu:~/dev/ada/from_github $ objdump --dynamic-syms ./alr | grep -i 2.38 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.38) __isoc23_fscanf 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.38) __isoc23_strtol

I would expect fscanf and strtol to be commonly available, but the __isoc23 prefixes indicate a new C version that an older libc might not have. That seems to be the issue, as my local version of libc on the Pi only has isoc99 versions.

paul@tegu:~/dev/ada/from_github $ objdump --dynamic-syms /lib/aarch64-linux-gnu/libc.so.6 | grep iso 000000000004c9f0 g DF .text 0000000000000028 GLIBC_2.17 __isoc99_vfscanf 00000000000a7550 g DF .text 00000000000000bc GLIBC_2.17 __isoc99_wscanf 00000000000a7700 g DF .text 0000000000000028 GLIBC_2.17 __isoc99_vfwscanf 000000000004ca60 g DF .text 00000000000000bc GLIBC_2.17 __isoc99_vsscanf 00000000000a7850 g DF .text 00000000000000c8 GLIBC_2.17 __isoc99_vswscanf 00000000000a7650 g DF .text 00000000000000a8 GLIBC_2.17 __isoc99_fwscanf 00000000000a7610 g DF .text 0000000000000038 GLIBC_2.17 __isoc99_vwscanf 00000000000a7730 g DF .text 0000000000000118 GLIBC_2.17 __isoc99_swscanf 000000000004c770 g DF .text 00000000000000a8 GLIBC_2.17 __isoc99_fscanf 000000000004ca20 g DF .text 0000000000000038 GLIBC_2.17 __isoc99_vscanf 000000000004c8e0 g DF .text 0000000000000110 GLIBC_2.17 __isoc99_sscanf 000000000004c820 g DF .text 00000000000000bc GLIBC_2.17 __isoc99_scanf

We can examine the Alire assembly to see where the function calls occur.

objdump --disassemble ./alr

It looks like both of the functions are used by GNAT: I'm not sure what __gnat_personality_v0 is but that's one usage.

0000000000fa30a0 <__gnat_personality_v0>: fa30a0: d503233f paciasp fa30a4: d10543ff sub sp, sp, #0x150 fa30a8: 900027e2 adrp x2, 149f000 <_GLOBAL_OFFSET_TABLE_+0x2de0> fa30ac: f942f842 ldr x2, [x2, #1520] fa30b0: a90f7bfd stp x29, x30, [sp, #240] fa30b4: 9103c3fd add x29, sp, #0xf0 fa30b8: a91053f3 stp x19, x20, [sp, #256] ... fa34b4: 97c57733 bl 101180 <__isoc23_strtol@plt>

Another other is in __gnat_killprocesstree, and the third one is in db. The important thing is that Alire itself doesn't directly either one, and that it's something that GNAT is pulling in.

0000000000fa1970 <__gnat_killprocesstree>: ... fa1aa8: 97c57c0e bl 100ae0 <__isoc23_fscanf@plt>

This seems like a reasonable stopping point.

Remarks

Ada works on the Raspberry Pi 5! It takes a little bit of effort to use a source build of Alire for now.

Some people who work on Ada are paid, but there are a lot of volunteers in the open source community who help keep things running. There's a lot of places you could help make an impact, so don't be afraid to reach out on the community forum or discord.

References