Ada Programming $WikiTagline

The GNU-Ada Project aims to provide easy to install operating system native installers for the GNAT Ada compiler as well as many of the more popular Open Source Ada libraries. The project was first registered on Sourceforge1 in October of 2000 and initially provided binary releases of GNAT for a few unsupported platforms. The project has been under new management since December 2005 and since that time, more than 100 packages have been released.

The Problem

One might wonder why we need the GNU Ada project. After all there is Libre2 where one can download a free GNAT compiler along with several support libraries. In addition there are numerous open source Ada libraries available within Sourceforge and other public repositories. The problem with the current state of affairs can be categorized into three main areas:

Limited Libre OS choices

Libre offers binaries for GNAT and some of the top tier open source Ada libraries however, Libre only offers three operating systems: Windows 32bit, Linux 32bit and MacOS Power PC. Users of any other operating system need to compile their own versions from the source archives. In the case of some of the smaller libraries, this is just a minor inconvenience. In the case of the larger libraries or the GNAT compiler itself, it can be a daunting task.

Open Source Libraries

There are a respectable number of open source libraries for Ada available however, most are currently distributed only in source code form and often in a manner that does not directly lend itself to managed installation (e.g. Red Hat Package Manager (RPM), Windows Installer, etc). This contrasts with most C libraries where a developer can do a package installation and not worry about the configure/build process.

While seasoned programmers may not see this as a great problem (and may even prefer to build from source code), it can be a problem for those who are not only beginners to Ada programming but also beginners to programming in general. Junior or part time developers might turn to easier to install languages and libraries.

GPL vs. GMGPL - Software Licensing

For many years, unsupported public releases of the GNAT compiler were made by AdaCore (formerly Ada Core Technologies) on approximately an annual basis. While the GNAT compiler has always been Free Software3, and thus theoretically modifiable and releasable by anyone, the releases from AdaCore have always been treated by the community as the only source (or at least the best source) for the compiler.

These public releases came with no formal support from AdaCore. The core compiler was licensed under the terms of GNU General Public License (GPL) and the Ada run-time was licensed under a licenses that has come to be known as the GNAT Modified (GNU) General Public License (GMGPL).

While a lecture on license terms is beyond the scope of this article (and the capabilities of its Authors!), we can provide our understanding of the differences in terms of these licenses.

The GPL is primarily designed to provide freedom for the users of software to ensure that they are given the right to access, modify and distribute the source code of any program to which they have been provided a binary. The GPL contains clauses that require all software that is linked with a GPL component to itself be distributed under the terms of the GPL.

The GMGPL is simply the terms of the GPL with an additional clause that indicates that simply linking with a GPL library or instantiating generics from the library will not in itself cause the resulting executable to be covered by the GPL. The GMGPL thus allows usage of software libraries that would otherwise not be possible due to conflicting license terms between the GPL and proprietary or other open source licenses.

Beginning in 2005, the Libre site began to only provide new GNAT (and related libraries) releases under the pure GPL without the exception clause. This allows academic and "hobbyist" users of the compiler to have access to an unsupported compiler and libraries that have been configured and released by one of the major players in the Ada compiler market at no cost. It does however mean that users of the compiler that want to create proprietary applications or distribute binaries linked to open source libraries that have terms that are incompatible with the GPL may have difficulty doing so with the Libre GPL releases.

Currently almost all open source Ada developers make there work available under the more liberal GMGPL and many do use GNAT specific packages.

Open source and proprietary developers are now left with three options:

  1. Use a GNAT compiler build from the Free Software Foundation (FSF) GCC sources — which heightens the hurdle for Ada beginners even further.
  2. Re-Licence the libraries under the GPL — which is fine for executable but would make pre-compiled shared libraries unavailable to closed source projects.
  3. Purchase a supported contract from AdaCore or a competitor — perhaps a good idea for a well financed proprietary developer but not practical for small development houses or open source developers.

Why are there no pre-packaged Ada Libraries and Tools?

Compiler Versions

One of the main problems a maintainer of a binary distribution faces is the incompatibility of the .ali (Ada Library Information) files which exists between GNAT versions. As such, the creation of binary distributions only make sense if the whole tool chain is made available as well.

There is also a problem when compiling the compiler itself. Not every GNAT version can compile every other GNAT version. One of the main problems here is that the compiler treats warnings as errors when compiling itself. New warnings, new options and features for Ada 2005 complicate this issue:

 sem_ch6.adb:4409:44: warning: "Overriding" is a reserved word in Ada 2005
 sem_ch6.adb:4445:44: warning: "Overriding" is a reserved word in Ada 2005 (style) blank lines not allowed at end of file
 a-exexda.adb:154:01: (style) multiple blank lines
 a-exextr.adb:192:01: (style) multiple blank lines

The "hidden" Library.

ASIS, GLADE and GPS need to access the project manager and Ada library information files directly.

The packages needed to achieve this are part of the GNAT compiler but not normally installed on

make --install.

Creating those libraries and tools from source is challenging even for seasoned Ada developers.

How are we going about solving the problem

One Stop Download

Instead of just providing just one Ada tool or library the GNU-Ada Project aims to provide binary distributions of a complete Ada development suite consisting of the compiler and many Open Source Ada libraries.

We also hold older public releases from GNAT for those who need them. Especially the Windows version of GNAT 3.15p is still in high demand.

Standard Installation Packages

On Platforms where it is feasible we will provide standard installation packages which offer install and de-install. The user should be able to quickly switch from one GNAT version to another.

Standard Installation Directories

All installations go into a standard set of directories. Where possible we also allow for more then GNAT version to be installed in parallel.

We also provide standard means to locate dependent libraries.

Use of the FSF Sources

We provide a GMGPL based tool chains made from the FSF or Libre sources where possible. There are some exeptions like for example the ASIS library - the only GMGPL licenced ASIS library available was designed for Ada 95 and is to old for modern Ada 2005 compiler versions.

Repository of Compile and Installation Scripts

Last but not least we provide the scripts and specifications used to create the packages. Those scripts cover the following areas:

  1. Download - which is not allways a trivial task as many sources are taken from cvs or subversion archives.
  2. Source extraction
  3. Patching Sources - Especialy Makefiles often need changing to set parameters like the installation directory.
  4. Compile
  5. Installation
  6. Packeting

This should enable new maintainers to move the tool chain to a new platform without hassle.

These script might also be of interest for GNAT Pro users. While we don't provide GNAT Pro binary releases, the scripts for creating them are in place. They could be very helpful for example when many computers need to get a GtkAda installation.

  2. sites)
  3. sites)