Tuesday, September 13, 2016

Ada programming environment based on GCC 6.2 and GNAT GPL 2016 in Slackware64 14.2

New release of Slackware and new version of GNAT GPL 2016 prompt me to update the Ada programming environment under Slackware.

First, I was trying to use the stock 5.3 compiler, but encounter gnat compiler error when compiling gprbuild. So has to use the FSF GCC 6.2 as the based.

The FSF GCC compiler

At the writing, the latest release of GCC is 6.2.0. First I update the build script to matched what's in the current tree. I have changed the build directory to a fixed location to avoid the random location in the original script. As it is needed for gnat_util build, a fixed location is easier for the script to find the right files. Built and install without problem.

GNAT Environment package

This package contains startup scripts to setup Ada project path environment variable ADA_PROJECT_PATH and GPR_PROJECT_PATH. They will be installed into /etc/profile.d by the doinst.sh.

Also soft link of the GNAT Ada run time libraries are also created in doinst.sh.

XMLAda

For XMLAda GPL 2016, the default build process is making use of gprbuild, which depends on XMLAda. I followed what was done on Arch Linux and created a custom Makefile.SlackBuild. But I installed the package with the following scheme, similar to what GNAT GPL 2016 is doing but with sub-directories for each sub-module:
 usr/include/xmlada
             |- input
             |- unicode
             ...
 usr/lib64/xmlada
           |- input
           |  |- static
           |  `- relocatable
           |- unicode
           |  |- static
           |  `- relocatable
           ...
The document build requires Sphinx, as SlackBuilds.orgprovides all necessary build scripts, it is a matter of installing the relevant packages and dependencies.

GPRBuild

The 2016 version of gprbuild required gprbuild itself. So Similar to XMLAda, a custom Makefile was borrowed from the Arch Linux project and modified to suite the needs of Slackware. A patch was developed for the gprinstall program, so that its default library subdir and library soft link subdir points to lib64 under Slackware64. A gpr library is also created, as it is needed by a few other programs

GNAT_UTIL

The GNAT Util Libraryprovides access to GNAT compiler internals for AdaCore utilities. The latest release is 5.1.0, it is used for our GCC 6.2.0. The build went well.

GTKAda

It does not build very well at the first few builds, it keeps installing libs into /usr/lib in stead of /usr/lib64 on 64-bit system. It seems the generate file still insist on the lib's path. So more sed commands are added to change the lib path to lib64 on 64-bit system. After that, it built without problem with proper installation path.

Aunit

Aunit's build script has no big change from the previous version, except for the version bump.

GNATColl

I used version 16.1 from GitHub. GNATColl compiled OK, with minor problem with lib's installation path, similar to the problem in GtkAda. I always got gpr.gpr problem when compiling GPS, latter I found that not sure why, the installing process of gnatcoll will install a copy of the gpr.gpr project file and related object file and source into its own directory structure with some modification to gpr.gpr and causing error on the project file. I have to manually remove all gpr related files and directories and entries in the manifests file. Then GPS will compile with correct project file.

GPS

After fixing the gprbuild, gpr and gnatcoll libraries, GPS compile without problem. When running GPS, it gave python script warning about pep8 and jedi, after install those two from SlackBuilds.org, everything is working fine.

Florist

No trouble when compile and install florist.

Asis

Asis has no problem to compile and install after fixed the gprbuild install path.

Gnatmem and Ahven

Gnatmem (need to compile the binutils for Slackware 14.2 and use the build tree) and Aheven gave no trouble when compiled for the 2016 version.

All build scripts are available at GitHub.
Post a Comment