ada
- date: 2026-04-26
- tags: proglang
- identifier: 20260426T074514
ada, after Lovelace, is a programming language whose design was commissioned by the U.S. department of defense in the late 1970s.
it is designed to
- eliminate many errors at compile time with a very strong type system
- make gigantic programs manageable
environment setup
how gnat finds libraries
see info manual distributed, for example, with alpine's gcc-doc package. it recommends reading the gnat project manager section in the gprbuild user's guide.
gprbuild user's guide pdf
alpine linux & emacs
install packages
gprbuild is required to build alire from source.
re2c is required by ada-mode's build.sh.
re2c homepage
emacs' ada-mode will require the wisi grammar and language server. get these via alire, which you can build from source. see the alire github readme.
alire github
once alire is installed, follow the instructions in the info manual provided with ada-mode, section 2.1 "Ada executables".
2026-05-01 oddness with re2c
trying to run ada-mode's build.sh, alire believes re2c is missing, although i've installed the alpine package and the executable is on my path. trying to run the incomplete solution anyway.
update:
that may or may not matter. it seems the toolchains pulled in by alire depend on glibc. *sigh*
i will try to remove alr from path and see if the alpine gprbuild is sufficient.
had to package-delete then package-install ada-mode. gnatcoll is missing.
compiling gnatcoll:
download source from github, run
GPR_PROJECT_PATH='/home/ty/src/gnatcoll-core/minimal' core/gnatcoll_core.gpr.py build
otherwise gprbuild can't find the minimal project file. that seems to have succeeded.
resources
https://learn.adacore.com
books
- Richard Riehle, "Ada distilled"