user2855405
user2855405

Reputation: 515

How can I install ADA IDE and compiler on Mac (OS X)?

I downloaded GNAT ADA GPL 2014 and am now trying to install on my Mac.

The directions below are the ones I am following, but where can I find the file called doinstall?

  1. Navigate to the directory that contains a file called: doinstall

  2. Enter: sudo mkdir /usr/local/gnat

  3. Enter: sudo ./doinstall

  4. Update your path as needed for your shell

Upvotes: 1

Views: 2953

Answers (2)

Simon Wright
Simon Wright

Reputation: 25501

You should have downloaded gnat-gpl-2014-x86_64-darwin-bin.tar.gz.

Go to some temporary directory (I use ~/tmp):

cd ~/tmp

Unpack the download, which creates a directory gnat-gpl-2014-x86_64-darwin-bin containing the binary distribution to be installed:

tar zxvf ~/Downloads/gnat-gpl-2014-x86_64-darwin-bin.tar.gz

Enter that directory, which contains (amongst others) doinstall:

cd gnat-gpl-2014-x86_64-darwin-bin

Execute doinstall to enter the installation dialog:

sudo ./doinstall

Remove the unpacked download:

cd ..
rm -rf gnat-gpl-2014-x86_64-darwin-bin

Now you can update PATH as needed for your shell.

Upvotes: 4

BrianX
BrianX

Reputation: 136

What Simon Wright said is correct, but if you're running on Mac OS X v10.10 (Yosemite), there's an extra problem: for some obscure reason, Adacore GNAT is broken on Yosemite. You have to make it think it's compiling for Mac OS X v10.9 (Mavericks):

export MACOSX_DEPLOYMENT_TARGET=10.9 # Yosemite workaround

That can go in a few different places, but I put it near the top of the /usr/local/gnat/bin/gps script, so it doesn't interfere with the xcodebuild environment.

Also, I found GTKAda to be nearly impossible to install from source; if you download the XNAdaLib-GPL package from The GNU Ada compiler you can install that and get everything you need without having to wade through Adacore's mess. (You may want to use the Adacore version of Glade for GUI design though; for some reason the Sourceforge package's version is localized in French and I'm not sure if it can be switched to English.)

Finally, since this is a bit duct-tape-and-baling-wire, I would recommend not shipping any production mission-critical code with this environment; either roll back to Mavericks or wait for GNAT 2015.

Upvotes: 1

Related Questions