HOWTO - Installing gnat-4.3 on Mac OS X

October 4th, 2007 at 23:15 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Hacking, Mac OS X, Software Development · 4 Comments 

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.

  1. Go to MacAda.org to download gnat-4.3 and other necessary tools. Launch the installation in the disk image.
  2. 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
    
  3. Launch gcc_select:
    
    $ sudo gcc_select 4.3
    

Xcode 2.3 and gcc-4.2 (Ada)

July 13th, 2006 at 0:33 · Filed Under Ada, Call Me a Geek, Computing, HOWTO, Mac OS X, Software Development · Comment 

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:

  1. Uninstall previous Xcode installation by
    $ sudo perl /Developer/Tools/uninstall-devtools.pl
  2. Restart the computer
  3. Download and install Xcode 2.3
  4. Download and install gcc-3.3 Ada compiler from MacAda
  5. Download and install gcc-4.2 Ada compiler
  6. Unzip and untar the gcc-4.2 package with
    $ tar -zxvf fsf-ppc-gcc-4.2.0-20060429.tgz

    or

    $ tar -zxvf fsf-i686-ada-4.2-20060409.tgz

    depending if you are using PowerPC or Intel Mac.

  7. Move the directory ada-4.2 to /usr/local
  8. 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

July 9th, 2006 at 22:51 · Filed Under Ada, Call Me a Geek, Computing, Hacking, Mac OS X, Software Development · Comment 

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.