macosadagnat

Problems building Ada on Mac OS 10.8.2


I have installed GNAT 4.3 from here

And added the following to my .bash_profile:

export PATH=/usr/local/ada-4.3/bin:$PATH

Now I can run gnatmake hello.adb

For the file hello.adb with the following contents:

with Ada.Text_IO;use Ada.Text_IO;
procedure Hello is
begin
    Put_Line ("Hello world!");
end Hello;

But I get this error:

gcc -c hello.adb

gcc: error trying to exec 'as': execvp: No such file or directory

gnatmake: "hello.adb" compilation error

I'm guessing there is a problem with my GNAT installation, but I have been unable to find a solution for this problem.

Thanks in advance for any suggestions.


Solution

  • Your approach works on Mac OS X 10.5 and 10.6, but I haven't tried 10.8. Two things to check: