Skip to main content

How to compile the GNAT/GPL

This page describes how to compile GNAT/GPL. First you will need to download the all GNAT/GPL sources available.

build-gnat-gpl #

It is all really done by the attached script.

Attach:build.bash useful functions shared between build scripts
Attach:build-gnat-gpl build script for GNAT/GPL

Some notes about the script:

  1. The path names are more or less hard coded and installation is done in §n§/opt/ada§§ so you should check if they fit your needs.
  2. The script compiles all and everything in one go - if you don’t need everything you should make a copy and cut out everything you are not interested it.
  3. There are quite a few tricks and twists incorporated into the script. Missing files copied, makefiles patched and so on. So read it carefully.

pathnames needed #

§n§/work/gnat-gpl§§ Base directory for the build process. Script files, downloads and all temporary files go here. You need just about 1 GB of free space to compile everything.
§n§/work/configure§§ Script files go here. Should also be the current directory when starting the scripts.
§n§/work/gnat-gpl/2005/…§§ Downloaded files. The structure should be the same as the one used by the libre site when creating you download package.
§n§/opt/gnat§§ Base directory for the installation. You need about 400 MB of free space when you install everything.

script options #

There are two options for the script get and conf. get will extract the sources and conf will configure the extracted sources. So the first time round you use:

§c§build-gnat-gpl§§ get conf

after that you only need

§c§build-gnat-gpl§§

For reproducible result you can completely delete all the files (apart the downloaded archives of course) and then just re-extract them with the get option.

current status #

Currently the script works on some older platforms. But there are some fixes needed if you have a newer Linux with a newer GTK.

(:include GNAT/Pitfalls:)

glib.ads #

The file §n§/opt/gnat/include/gtkada/glib.ads§§ does produce a style-warning which will break the XML/Ada compile. You need to remove the additional blank line.