Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Native GNAT Programming Studio for OSX


This repository contains the source code of the GNAT Programming Studio, modified to be built against gtk-quartz, the native GTK backend for OSX. For a list of changes, see the website. You can also download a binary there. This is a personal project, I am not affiliated with AdaCore.


In order to be able to build GPS on your Mac, you need to have:

GNAT Compiler

You can use either GNAT GPL 2013 from AdaCore's libre site or the version included in FSF's GCC. GNAT GPL 2013 is the default. Either way, make sure the bin directory of your GNAT installation is included in your PATH.

GTK-Quartz (jhbuild) Toolchain

This will probably be tricky to set up. If you're lucky, it will work at first try, but experience tells that usually, something's broken on the way. Anyway, follow the instructions on to build it. Here's a short version:

  • Install XCode from the AppStore, launch it, install the command line tools from the Preferences panel.
  • Download and execute
  • Add ~/.local/bin to your PATH.
  • Execute:
jhbuild bootstrap
jhbuild build meta-gtk-osx-bootstrap python meta-gtk-osx-core meta-gtk-osx-python

GPS embeds Python, so we compile python itself here (linking to the system's python causes far too much problems) and then build meta-gtk-osx-python for pyGObject and pyGtk.


Download the following source packages from AdaCore's libre site:

  • xmlada-for-gps-5.2.1-src.tgz
  • gtkada-for-gps-5.2.1-src.tgz

After unpacking the sources, you need to build and install them as part of your jhbuild toolchain. To do that, start a jhbuild shell with jhbuild shell and execute these commands in both directories:

export GPR_PROJECT_PATH=$PREFIX/lib/gnat
export PATH=$PREFIX/bin:$PATH
export LDFLAGS=`echo $LDFLAGS | sed 's/ -arch [^ ]*//'`
./configure --prefix=$PREFIX
make && make install

Building GPS

If you use GNAT FSF, start with:


You don't need to do that for GNAT GPL 2013. You can then build gps with:

jhbuild shell <

This will build and install gps.

Running GPS directly

If everything worked properly, you should be able to launch gps with

export GPR_PROJECT_PATH=~/gtk/inst/lib/gnat

(You need the GPR_PROJECT_PATH if you plan to link against installed GPRBuild projects like GtkAda.)

Building the app bundle

After building GPS, navigate into the bundle folder and execute

jhbuild shell <

This should create the bundle. To be able to do this, you need to have the latest gtk-mac-bundler from git installed (the current stable version mentioned on the site won't work).

This requires GNAT_KIND to be defined as shown above if you're using GNAT FSF.

What else can be done

To provide more integration into OSX (= using the default OSX menu bar), GtkOSXApplication would need to be added to GtkAda, and GPS would need to be patched to use it. I certainly won't do this, but if anyone has a lot of time at hand...

It might also be possible to create a jhbuild module to further automate the process of building GPS. But as the build needs a compiler jhbuild does not know about and considering the other issues and fixes that need to be applied, I think it's better to keep this stuff here in a separate repository.


This work is, as the GNAT Programming Studio itself, licensed under the terms of the GNU GPL v3.


Native GNAT Programming Studio for OSX



No packages published