I saw a post on the Arch Linux forums from a user wanting to build an Ada compiler and having issues with the PKGBUILD from the AUR. The main issue building the Ada compiler is that you need the Ada compiler to do it. Classic chicken and egg problem. The maintainer of the AUR package works around this by having the PKGBUILD download a tarball from his site that provides the necessary binaries to build the compiler. It is probably perfectly safe, but I would not be doing that… Also, according to the forum post, the binary compiler package seems slightly broken at the moment.
So I went on a mission to create some gcc-ada packages for Arch. I had some interesting problems along the way (you really should not try to compile on an x86_64 system with an i686 makepkg.conf…), but I succeeded in in the end. Get packages for i686 and x86_64 from
here. Note that I provide the build files too, but remember you will need the package to build the package…
For those that are interested in how I bootstrapped this package (or do not trust my binaries), here are the details:
- Create a build chroot (sudo mkarchroot /path/to/chroot base base-devel sudo)
- Extract rpms from Fedora rawhide for gcc, libgnat, libgnat-devel and gcc-gnat into the chroot
- In the chroot: cd /usr/bin && ln -s ../lib/gcc/i686-pc-linux-gnu/4.4.1/cc1 cc1
- Comment out the makedepends and CC=gcc-ada lines in the PKGBUILD
- Build the package (sudo makechrootpkg -c -r /path/to/chroot)
- Revert the comments in the PKGBUILD, create a clean chroot, install the built gcc-ada package and rebuild
Then you end up with a nicely bootstrapped Ada compiler. Fedora packages were used as their tool-chain package versions are very similar to those in Arch and thus likely to actually work as drop-in replacements for our packages. Note that the last step is superlative given gcc bootstraps itself as part of its build process.
Edit: gcc-ada is now available from the Arch Linux repos.