Ada Programming/Installing: Difference between revisions

From Wikibooks, open books for an open world
Jump to navigation Jump to search
[unreviewed revision][checked revision]
Content deleted Content added
→‎GCC: Explain the switch to a newer license.
→‎AIDE (for Microsoft Windows): New URLs for download
Line 366: Line 366:
|-
|-
! Available from
! Available from
| http://rochebruneadsl.free.fr/stephane/aide/
| http://www.ada-france.org/AIDE/
ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/mirrors/aide/
|-
|-
! Support
! Support

Revision as of 14:37, 4 May 2009


Ada. Time-tested, safe and secure.
Ada. Time-tested, safe and secure.

Ada compilers are available from several vendors, on a variety of host and target platforms. The Ada Resource Association maintains a list of available compilers.

Below is an alphabetical list of available compilers with additional comments.

AdaMagic from SofCheck

SofCheck produces an Ada 95 front-end that can be plugged into a code generating back-end to produce a full compiler. This front-end is offered for licensing to compiler vendors.

Based on this front-end, SofCheck offers:

  • AdaMagic, an Ada-to-C translator
  • AppletMagic, an Ada-to-Java bytecode compiler

Commercial; proprietary.

AdaMULTI from Green Hills Software

Green Hills Software sells development environments for multiple languages and multiple targets, primarily to embedded software developers.

Languages supported Ada 83, Ada 95, C, C++, FORTRAN
License for the run-time library proprietary
Native platforms GNU/Linux on i386, Microsoft Windows on i386, and Solaris on SPARC
Cross platforms INTEGRITY, INTEGRITY-178B and velOSity from Green Hills; VxWorks from Wind River; several bare board targets. Safety-critical GMART and GSTART run-time libraries certified to DO-178B level A.
Available from http://www.ghs.com/
Support Commercial
Add-ons included IDE, debugger, TimeMachine, integration with various version control systems, source browsers, other utilities

GHS claims to make great efforts to ensure that their compilers produce the most efficient code and often cites the EEMBC benchmark results as evidence, since many of the results published by chip manufacturers use GHS compilers to show their silicon in the best light, although these benchmarks are not Ada specific.

GHS has no publicly announced plans to support the new Ada standard published in 2007 but they do continue to actively market and develop their existing Ada products.

DEC Ada from HP

DEC Ada is an Ada 83 compiler for OpenVMS. While “DEC Ada” is probably the name most users know, the compiler is now called “HP Ada”. It had previously been known also by names of "VAX Ada" and "Compaq Ada".

GNAT, the GNU Ada Compiler from AdaCore and the Free Software Foundation

GNAT is the free GNU Ada compiler, which is part of the GNU Compiler Collection. It is the only Ada compiler that supports all of the optional annexes of the language standard. The original authors formed the company AdaCore to offer professional support, consulting, training and custom development services. It is thus possible to obtain GNAT from many different sources, detailed below.

GNAT is always licensed under the terms of the GNU General Public License.

However, the run-time library uses either the GPL, or the GNAT Modified GPL, depending on where you obtain it from.

Several optional add-ons are available from various places:

  • ASIS, the Ada Semantic Interface Specification, is a library that allows Ada programs to examine and manipulate other Ada programs.
  • FLORIST is a library that provides a POSIX programming interface to the operating system.
  • GDB, the GNU Debugger, with Ada extensions.
  • GLADE implements Annex E, the Distributed Systems Annex. With it, one can write distributed programs in Ada, where partitions of the program running on different computers communicate over the network with one another and with shared objects.
  • GPS, the GNAT Programming Studio, is a full-featured integrated development environment, written in Ada. It allows you to code in Ada, C and C++.

Many Free Software libraries are also available.

GNAT GPL Edition

This is a source and binary release from AdaCore, intended for use by Free Software developers only. If you want to distribute your binary programs linked with the GPL run-time library, then you must do so under terms compatible with the GNU General Public License.

As of GNAT GPL Edition 2008:

Languages supported Ada 83, Ada 95, Ada 2005, C
License for the run-time library pure GPL
Native platforms GNU/Linux on i386 and x86_64; Microsoft Windows on i386; Microsoft .NET on i386; Solaris on SPARC.
Cross platforms none
Compiler back-end GCC 4.1.1
Available from http://libre.adacore.com/ (requires free registration)
Support None
Add-ons included GDB, GNATbench (Eclipse plug-in), GPS in source and binary form; many more in source-only form.

GNAT Modified GPL releases

With these releases of GNAT, you can distribute your programs in binary form under licensing terms of your own choosing; you are not bound by the GPL.

GNAT 3.15p

This is the last public release of GNAT from AdaCore that uses the GNAT Modified General Public License.

GNAT 3.15p has passed the Ada Conformity Assessment Test Suite (ACATS). It was released in October 2002.

The binary distribution from AdaCore also contains an Ada-aware version of the GNU Debugger (GDB), and a graphical front-end to GDB called the GNU Visual Debugger (GVD).

Languages supported Ada 83, Ada 95, C
License for the run-time library GNAT-modified GPL
Native platforms GNU/Linux on i386 (with glibc 2.1 or later), Microsoft Windows on i386, OS/2 2.0 or later on i386, Solaris 2.5 or later on SPARC
Cross platforms none
Compiler back-end GCC 2.8.1
Available from ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/mirrors/gnu-ada/3.15p/
Support None
Add-ons included ASIS, Florist, GLADE, GDB, Gnatwin (on Windows only), GtkAda 1.2, GVD

GNAT Pro

GNAT Pro is the professional version of GNAT, offered as a subscription package by AdaCore. The package also includes professional consulting, training and maintenance services. AdaCore can provide custom versions of the compiler for native or cross development. For more information, see http://www.adacore.com/.

Languages supported Ada 83, Ada 95, Ada 2005, C, and optionally C++
License for the run-time library GNAT-modified GPL
Native platforms many, see http://www.adacore.com/home/gnatpro/configurations
Cross platforms many, see http://www.adacore.com/home/gnatpro/configurations; even more on request
Compiler back-end GCC 4.1.1
Available from http://www.adacore.com/ by subscription (commercial)
Support Commercial; customer-only bug database
Add-ons included ASIS, Florist, GDB, GLADE, GPS, GtkAda, XML/Ada, and many more in source and, on request, binary form.

GCC

GNAT has been part of GCC since October 2001, and GCC uses the GNAT Modified General Public License for the Ada run-time library. The Free Software Foundation does not distribute binaries, only sources.

Most GNU/Linux distributions and several distributions for other platforms include prebuilt binaries; see below.

For technical reasons, we recommend against using the Ada compilers included in GCC 3.1, 3.2, 3.3 and 4.0. Instead, we recommend using GCC 3.4, 4.1 or later, or one of the releases from AdaCore (3.15p, GPL Edition or Pro).

Since October 2003, AdaCore merge most of their changes from GNAT Pro into GCC during Stage 1; this happens once for each major release. Since GCC 3.4, AdaCore have gradually added support for Ada 2005 as the language standard was finalised.

GCC version 4.4 switched to version 3 of the GNU General Public License and grants a Runtime Library Exception similar in spirit to the GNAT Modified General Public License used in all previous versions. This Runtime Library Exception applies to run-time libraries for all languages, not just Ada.

As of GCC 4.4, released on 2009-04-21:

Languages supported Ada 83, Ada 95, Ada 2005, C, C++, Fortran 95, Java, Objective-C, Objective-C++
License for the run-time library GPL version 3 with GCC Runtime Library Exception
Native platforms none (source only)
Cross platforms none (source only)
Compiler back-end GCC 4.4
Available from http://gcc.gnu.org/ in source only form.
Support Volunteer; public bug database
Add-ons included none

The GNU Ada Project

The GNU Ada Project provides source and binary packages of various GNAT versions for several operating systems, and, importantly, the scripts used to create the packages. This may be helpful if you plan to port the compiler to another platform or create a cross-compiler. For GNU/Linux users, there are instructions for building your own GNAT compiler at: http://ada.krischik.com/index.php/Articles/CompileGNAT

Both GPL and GMGPL versions of GNAT are available.

Languages supported Ada 83, Ada 95, Ada 2005, C. (Some distributions also support Fortran 90, Java, Objective C and Objective C++)
License for the run-time library pure or GNAT-modified GPL
Native platforms Fedora Core 4 and 5, MS-DOS, OS/2, Solaris 10, SuSE 10, MacOS X, (more?)
Cross platforms none
Compiler back-end GCC 2.8.1, 3.4, 4.0, 4.1, 4.2, 4.3 (various binary packages)
Available from http://gnuada.sourceforge.net/
Support Volunteer; public bug database
Add-ons included AdaBrowse, ASIS, Booch Components, Charles, GPS, GtkAda (more?)

A# (A-Sharp, a.k.a. Ada for .NET)

This compiler is historical as it has now been merged into GNAT GPL Edition and GNAT Pro.

A# is a port of Ada to the .NET Platform. A# was originally developed at the Department of Computer Science at the United States Air Force Academy which distribute A# as a service to the Ada community under the terms of the GNU general public license. A# integrates well with Microsoft Visual Studio 2005, AdaGIDE and the RAPID open-source GUI Design tool. As of 2006-06-06:

Languages supported Ada 83, Ada 95, C
License for the run-time library pure GPL
Native platforms Microsoft .NET
Cross platforms none
Compiler back-end GCC 3.4 (GNAT GPL 2006 Edition?)
Available from http://sourceforge.net/projects/asharp/
Support None (but see GNAT Pro)
Add-ons included none.

GNAT for AVR microcontrollers

Rolf Ebert and others provide a version of GNAT configured as a cross-compiler to various AVR microcontrollers, as well as an experimental Ada run-time library suitable for use on the microcontrollers. As of Version 0.4.1 (2006-06-01):

Languages supported Ada 83, Ada 95, Ada 2005, C, C++
License for the run-time library GNAT-Modified GPL
Native platforms GNU/Linux and Microsoft Windows on i386
Cross platforms Various AVR microcontrollers
Compiler back-end GCC 4.1
Available from http://avr-ada.sourceforge.net/
Support Volunteer; public bug database
Add-ons included none

GNATforLEON

The Real-Time Research Group of the Technical University of Madrid (UPM, Universidad Politécnica de Madrid) wrote a Ravenscar-compliant real-time kernel for execution on LEON processors and a modified run-time library. They also provide a GNAT cross-compiler. As of version 2.0.1:

Languages supported Ada 83, Ada 95, Ada 2005, C
License for the run-time library pure GPL
Native platforms none
Cross platforms GNU/Linux on i686 to LEON2 bare boards
Compiler back-end GCC 4.1 (GNAT GPL 2007 Edition)
Available from http://www.dit.upm.es/ork/
Support ?
Add-ons included OpenRavenscar real-time kernel; minimal run-time library

Prebuilt packages as part of larger distributions

Many distributions contain prebuilt binaries of GCC or various public releases of GNAT from AdaCore. Quality varies widely between distributions. The list of distributions below is in alphabetical oder. (Please keep it that way.)

AIDE (for Microsoft Windows)

AIDE — Ada Instant Development Environment is a complete one-click, just-works Ada distribution for Windows, consisting of GNAT, comprehensive documentation, tools and libraries. All are precompiled, and source code is also available. The installation procedure is particularly easy. AIDE is intended for beginners and teachers, but can also be used by advanced users.

Languages supported Ada 83, Ada 95, C
License for the run-time library GNAT-modified GPL
Native platforms Microsoft Windows on i386
Cross platforms none
Compiler back-end GCC 2.8.1
Available from http://www.ada-france.org/AIDE/

ftp://ftp.cs.kuleuven.ac.be/pub/Ada-Belgium/mirrors/aide/

Support ?
Add-ons included ASIS, GDB, GPS, GtkAda (more?)

Blastwave (for Solaris on SPARC and x86)

Blastwave has binary packages of GCC 3.4.5 and 4.0.2 with Ada support. The package names are gcc3ada and gcc4ada respectively.

Languages supported Ada 83, Ada 95, parts of Ada 2005, C, C++, Fortran 95, Java, Objective-C, Objective-C++
License for the run-time library GNAT-modified GPL
Native platforms Solaris and OpenSolaris on SPARC
Cross platforms none
Compiler back-end GCC 3.4.5 and 4.0.2 (both available)
Support ?
Available from http://www.blastwave.org/
Add-ons included none (?)

Cygwin (for Microsoft Windows)

Cygwin, the Linux-like environment for Windows, also contains a version of the GNAT compiler. The Cygwin version of GNAT is older than the MinGW version and does not support DLLs and Multi-Threading (as of 11.2004).

Debian (GNU/Linux and GNU/kFreeBSD)

There is a Debian Policy for Ada (mirror), which tries to make Debian the best Ada development and deployment platform. The development platform includes the compiler and many libraries, pre-packaged and integrated so as to be easy to use in any program. The deployment platform is the renowned stable distribution, which is suitable for mission-critical workloads and enjoys long life cycles, typically 3 to 4 years. Because Debian is a binary distribution, it is possible to deploy non-free, binary-only programs on it while enjoying all the benefits of a stable platform. Compiler choices are conservative for this reason, and the Policy mandates that all Ada programs and libraries be compiled with the same version of GNAT. This makes it possible to use all libraries in the same program. Debian separates run-time libraries from development packages, so that end users do not have to install the development system just to run a program.

The GNU Ada compiler can be installed on a Debian system with this command:

apt-get install gnat

This will also give you a list of related packages, which are likely to be useful for an Ada programmer.

Debian is unique in that it also allows programmers to use some of GNAT's internal components by means of two libraries:

  • libgnatvsn (licensed under GNAT-Modified GPL) and
  • libgnatprj (the project manager, licensed under pure GPL).

Debian packages make use of these libraries.

  3.1 Sarge 4.0 Etch 5.0 Lenny
Release date June 2005 April 2007 February 2009
Languages supported Ada 83, Ada 95, C Ada 83, Ada 95, parts of Ada 2005, C, C++, Fortran 95, Java, Objective-C, Objective-C++
License for the run-time library GNAT-modified GPL (both ZCX and SJLJ versions starting from 5.0 Lenny)
Native platforms: 3.1 Sarge 4.0 Etch 5.0 Lenny
kfreebsd-i386 yes yes
alpha yes yes
amd64 yes yes
hppa yes yes
i386 yes yes yes
ia64 yes yes
mips yes yes
mipsel yes yes
powerpc yes yes yes
ppc64 yes
s390 yes yes
sparc yes yes yes
Cross platforms none
Compiler back-end GCC 2.8.1 GCC 4.1 GCC 4.3
Available from http://www.debian.org/
Support Volunteer; public bug database
Add-ons included 3.1 Sarge 4.0 Etch 5.0 Lenny
AdaBindX 0.7.2
AdaBrowse 4.0.2 4.0.2 4.0.2
AdaCGI 1.6 1.6 1.6
AdaControl 1.6r8 1.9r4
AdaSockets 1.8.4.7 1.8.4.7 1.8.4.7
Ahven 1.2
Alog 0.1
ASIS 3.15p 2005 2007
AUnit 1.01 1.03 1.03
AWS 2.0 2.2 2.5 prerelease
Charles 2005-02-17
Florist 3.15p 2006 2006
GDB 5.3 6.4 6.8
GLADE 3.15p 2006
GNADE 1.5.1 1.6.1 1.6.1
GNAT Checker 1999-05-19
GPS 2.1 4.0.1 4.0.1
GtkAda 2.4 2.8.1 2.8.1
OpenToken 3.0b 3.0b 3.0b
PLPlot 5.9.0
Templates Parser 10.0+20060522 11.1
TextTools 2.0.3 2.0.3 2.0.5
XML/Ada 1.0 2.2 3.0


The ADT plugin for Eclipse (see #ObjectAda_from_Aonix) can be used with GNAT as packaged for Debian Etch. Specify "/usr" as the toolchain path.

DJGPP (for MS-DOS)

DJGPP has GNAT as part of their GCC distribution.

DJGPP is a port of a comprehensive collection of GNU utilities to MS-DOS with 32-bit extensions, and is actively supported (as of 1.2005). It includes the whole GCC compiler collection, that now includes Ada. See the DJGPP website for installation instructions.

DJGPP programs run also in a DOS command box in Windows, as well as in native MS-DOS systems.

FreeBSD

FreeBSD's ports collection contains GNAT GPL 2006 Edition (package gnat-2006), GNAT 3.15p, GCC 4.1, 4.2 and 4.3 with support for Ada. The usual way to install a package on FreeBSD is to compile it from source; not all add-ons are compatible with all versions of GNAT provided.

You can also use the Debian packages described above in a jail, thanks to Debian GNU/kFreeBSD.

As of 2008-11-10:

Languages supported Ada 83, Ada 95, parts of Ada 2005, C
License for the run-time library both pure and modified GPL available
Native platforms FreeBSD on i386 (more?)
Cross platforms none
Compiler back-end GCC 2.8.1, 3.4, 4.1, 4.2, 4.3
Available from http://www.freebsd.org
Support Volunteer; public bug database
Add-ons included AdaBindX, AdaCurses, AdaSDL, AdaSockets, AFlex+AYACC, ASIS, AUnit, Booch Components, CBind, Florist, GLADE, GtkAda, SGL, XML/Ada (more?)

Gentoo GNU/Linux

The GNU Ada compiler can be installed on a Gentoo system using emerge:

 emerge dev-lang/gnat

In contrast to Debian, Gentoo is primarily a source distribution, so many packages are available only in source form, and require the user to recompile them (using emerge).

Also in contrast to Debian, Gentoo supports several versions of GNAT in parallel on the same system. Be careful, because not all add-ons and libraries are available with all versions of GNAT.

Languages supported Ada 83, Ada 95, Ada 2005, C (more?)
License for the run-time library pure or GNAT-modified GPL (both available)
Native platforms Gentoo GNU/Linux on amd64, powerpc and i386
Cross platforms none
Compiler back-end GCC 3.4, 4.1 (various binary packages)
Available from http://www.gentoo.org/
Support Volunteer; public bug database
Add-ons included AdaBindX, AdaBroker, AdaDoc, AdaOpenGL, AdaSockets, ASIS, AUnit, Booch Components, CBind, Charles, Florist, GLADE, GPS, GtkAda, XML/Ada

GNAT for Macintosh (for Mac OS 9 and X)

GNAT for Macintosh provides a version of GNAT with Xcode integration and bindings.

Mandriva Linux

The GNU Ada compiler can be installed on a Mandriva system with this command:

urpmi gnat

MinGW (for Microsoft Windows)

MinGW — Minimalist GNU for Windows contains a version of the GNAT compiler.

The following list should help you with the installation. (I may have forgotten something — but this is wiki, just add to the list)

  1. Install MinGW-3.1.0-1.exe
    1. extract binutils-2.15.91-20040904-1.tar.gz
    2. extract mingw-runtime-3.5.tar.gz
    3. extract gcc-core-3.4.2-20040916-1.tar.gz
    4. extract gcc-ada-3.4.2-20040916-1.tar.gz
    5. extract gcc-g++-3.4.2-20040916-1.tar.gz (Optional)
    6. extract gcc-g77-3.4.2-20040916-1.tar.gz (Optional)
    7. extract gcc-java-3.4.2-20040916-1.tar.gz (Optional)
    8. extract gcc-objc-3.4.2-20040916-1.tar.gz (Optional)
    9. extract w32api-3.1.tar.gz
  2. Install mingw32-make-3.80.0-3.exe (Optional)
  3. Install gdb-5.2.1-1.exe (Optional)
  4. Install MSYS-1.0.10.exe (Optional)
  5. Install msysDTK-1.0.1.exe (Optional)
    1. extract msys-automake-1.8.2.tar.bz2 (Optional)
    2. extract msys-autoconf-2.59.tar.bz2 (Optional)
    3. extract msys-libtool-1.5.tar.bz2 (Optional)

I have made good experience in using D:\MinGW as target directory for all installations and extractions.

Also noteworthy is that the the Windows version for GNAT from Libre is also based on MinGW.

In gcc-3.4.2-release_notes.txt from MinGW site reads: please check that the files in the /lib/gcc/mingw32/3.4.2/adainclude and adalib directories are flagged as read-only. This attribute is necessary to prevent them from being deleted when using gnatclean to clean a project.

So be sure to do this.

SuSE Linux

All versions of SuSE Linux have a GNAT compiler included. SuSE versions 9.2 and higher also contains ASIS, Florist and GLADE libraries. The following two packages are needed:

gnat
gnat-runtime

For 64 bit system you will need the 32 bit compatibility packages as well:

gnat-32bit
gnat-runtime-32bit

Ubuntu

Ubuntu (and derivatives like Kubuntu, Xubuntu...) is a Debian-based Linux distribution, thus the installation process described above can be used. Graphical package managers like Synaptics or Adept can also be employed to select the Ada packages.

ICC from Irvine Compiler Corporation

Irvine Compiler Corporation provides native and cross compilers for various platforms.[1] The compiler and run-time system support development of certified, safety-critical software.

Commercial, proprietary. No-cost evaluation is possible on request. Royalty-free redistribution of the run-time system is allowed.

Janus/Ada 83 and 95 from RR Software

RR Software offers native compilers for MS-DOS, Microsoft Windows and various Unix and Unix-like systems, and a library for Windows GUI programming called CLAW. There are academic, personal and professional editions, as well as support options.

Commercial but relatively cheap; proprietary.

MAXAda from Concurrent

Concurrent offers MAXAda, an Ada 95 compiler for Linux/Xeon and PowerPC platforms, and Ada bindings to POSIX and X/Motif.[2]

Commercial, proprietary.

ObjectAda from Aonix

Aonix offers native and cross compilers for various platforms. They come with an IDE, a debugger and a plug-in for Eclipse.

On Microsoft Windows and GNU/Linux on i386, Aonix offers two pricing models, at the customer's option: either a perpetual license fee with optional support, or just the yearly support fee: For Linux, that's $3000 for a single user or $12,000 for a 5-user service pack. See the full press release.

In addition, they offer "ObjectAda Special Edition": a no-cost evaluation version of ObjectAda that limits the size of programs that can be compiled with it, but is otherwise fully functional, with IDE and debugger. Free registration required.

A recent contribution by Aonix is ADT for Eclipse. The Ada Development Tools add Ada language support to the Eclipse open source development platform. ADT can be used with Aonix compilers, and with GNAT. An open source vendor supported project is outlined for ADT at Eclipse. Codenamed Hibachi and showcased at the Ada Conference UK 2007 and during Ada-Europe 2007, the project has now been officially created.

Commercial, proprietary.

PowerAda from OC Systems

OC Systems offers Ada compilers and bindings to POSIX and X-11:

  • PowerAda, an Ada 95 compiler for Linux and AIX,
  • LegacyAda/390, an Ada 83 compiler for IBM System 370 and 390 mainframes

Commercial, proprietary.

Rational Apex from IBM Rational

Rational Apex for native and embedded development.

Commercial, proprietary.

SCORE from DDC-I

DDC-I offers its SCORE cross-compilers for embedded development. SCORE stands for Safety-Critical, Object-oriented, Real-time Embedded.

Commercial, proprietary.

XD Ada from SWEP-EDS

XD Ada is an Ada 83 cross-compiler for embedded development. Hosts include Alpha and VAX machines running OpenVMS. Targets include Motorola 68000 and MIL-STD-1750A processors.

Commercial, proprietary.

XGC Ada from XGC Software

XGC compilers are GCC with custom run-time libraries suitable for avionics and space applications. The run-time kernels are very small and do not support exception propagation (i.e. you can handle an exception only in the subprogram that raised it).

Commercial but some versions are also offered as free downloads. Free Software.

Languages supported Ada 83, Ada 95, C
License for the run-time library GNAT-Modified GPL
Native platforms none
Cross platforms Hosts: sun-sparc-solaris, pc-linux2.*; targets are bare boards with ERC32, MIL-STD-1750A, Motorola 68000 family or Intel 32-bit processors. PowerPC and Intel 80186 targets on request.
Compiler back-end GCC 2.8.1
Available from http://www.xgc.com/
Support Commercial
Add-ons included Ravenscar-compliant run-time kernels, certified for avionics and space applications; gdb cross-debugger; target simulator.