HOWTO - Installing gnat-4.3 on Mac OS X
Perhaps someone has written this before but it seems no where to be found. So I just write a simple HOWTO about installing gnat-4.3 on Mac OS X.
My installation is on MacBook 2.16GHz Intel Core 2 Duo running Mac OS 10.4.10 with Xcode 2.4.1. Pre-requisition is to have Xcode installed before installing gnat-4.3.
- Go to MacAda.org to download gnat-4.3 and other necessary tools. Launch the installation in the disk image.
- Make the following softlinks:
$ ln -s /usr/local/ada-4.3/bin/gcc /usr/bin/gcc-4.3 $ ln -s /usr/local/ada-4.3/bin/g++ /usr/bin/g++-4.3 - Launch gcc_select:
$ sudo gcc_select 4.3
Xcode 2.3 and gcc-4.2 (Ada)
I have finally decided to update to Xcode 2.3 and gcc-4.2. There is not much information about how to install except from the MacAda mailing list. So, I decided to post the How-To here.
Here are the procedures:
- Uninstall previous Xcode installation by
$ sudo perl /Developer/Tools/uninstall-devtools.pl - Restart the computer
- Download and install Xcode 2.3
- Download and install gcc-3.3 Ada compiler from MacAda
- Download and install gcc-4.2 Ada compiler
- Unzip and untar the gcc-4.2 package with
$ tar -zxvf fsf-ppc-gcc-4.2.0-20060429.tgzor
$ tar -zxvf fsf-i686-ada-4.2-20060409.tgzdepending if you are using PowerPC or Intel Mac.
- Move the directory ada-4.2 to /usr/local
- Download and install Ada Plugin for Xcode and follow the instructions.
I tested Xcode by compiling some projects and it is great. But I still cannot manage to build Ada dynamic library with it. It looks like some problems with the flags. Here’s the error and warning messages I got:
warning -L: directory name (/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/default) does not exist
unknown flag: -Wl, -single_module
Solution for building dynamic shared Ada library with Xcode
Finally, I got some answer from the mailing list. It is a problem with Xcode 2.2 and gcc 3.3 and it seems like an update to Xcode 2.3 and gcc/gnat 4.2 is inevitable.
The reason I am skeptical about software update is that I have a number of on going development. A simple tiny glitch in the new update will cause big havoc especially after all the recompilation of source codes.
Anyhow, I am glad to hear the solution and I will update my development tools soon after I have made a few confirmation.


Listen to my podcast