1

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.

1 Answer 1

2

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

  • It looks like it can't find the assembler, /usr/bin/as. Verify that you installed the developer tools, as it's an optional install. See also How to use/install gcc on Mac OS X 10.8 / Xcode 4.4.

  • Use the verbose option of gcc to see more about where it's getting lost.

    gcc -c -v hello.adb 
Sign up to request clarification or add additional context in comments.

2 Comments

@SimonWright: I defer to your 10.8 experience; please don't hesitate to correct or amplify.
@trashgod: As your link suggested installing command line tools from Xcode (Xcode->Preferences->Downloads) fixed the issue. I can now build hello.adb.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.