Benches macOS

15

GCC Where is it?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi,

New to Mac (a couple of months). I figured gcc would be there but it is not. I found out that I need to install Xcode tools. Did that. But where is gcc? Where is it located? It is not in any of my $PATH.

15 replies

Sign in or join Beachball Help to reply.

  1. 0

    jdundas

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks to everyone for your quick responses.

    FYI: I installed Xcode 2.5 because I was having a hard time mounting the Xcode 3.0 image (Invalid checksum). I didn't have time to try to find out why, I couldn't find anything out about it by Google. I just figured I would try 2.5 to see if I could get it going, and I did. I have to get something done by Tuesday and was just in a big rush. Turns out it was all for nothing because I still couldn't get PDL to install (problem with 'make') through cpan. I just decided to work on the linux box and get all of this figured out when I have more time.

    Thanks again for all of your help. I didn't realize that I would get so many responses so quickly. This message board is a great resource for a new Mac user like myself.

  2. 0

    jdundas

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi,

    'which' didn't find anything. I ended up finding it a couple of minutes ago though. For anyone else who has the same problem as me. It appears that Xcode puts everything in /Xcode2.5/usr/bin/

    I just set my $PATH to include /Xcode2.5/usr/bin/ and now it is fine.

    Thanks

  3. 0

    jdundas

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    No, it was installed right. I did a little reading in the manual. The manual says that for 10.4 it also installs in /usr/bin/. It doesn't say that it does this for 10.5, which is what I am using. It says that it installs it in <Xcode directory>/usr/bin.

    I guess the main difference is that with 10.5 you can move the files to another directory (I guess you couldn't do that with Tiger??).

    I just wish they would install it all in /usr/bin/ instead of making me look around for it.

  4. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    It does install into /usr/bin on 10.5. I think it might give you the option of putting it elsewhere, but by default, it goes in there if you install Xcode 3. Maybe if you installed Xcode 2.5 instead into 10.5 for some reason, it puts it elsewhere, for those who want to have both coexisting. Xcode 3 comes with the 10.5 install disk.

  5. 0

    Don Chambers

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    because I'm having the same problem. I just bought a Macbook Air with OS 10.5.2. I installed Xcode 3.0 from the installation DVD, and it definitely did NOT install gcc in /usr/bin. It went into /Developer/usr/bin. I can't copy it over or make a symbolic link. I've changed my path to find it, but many make files expect it in /usr/bin.

    How do I get it in the correct directory????

    For what it's worth, I've been installing Xcode tools onto macs since the first release of OS X and never had any problems until now.

  6. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    What do you get from using the otool command?


    zsh-% otool -L /usr/bin/gcc-4.0
    /usr/bin/gcc-4.0:
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

  7. 0

    John Manderbach

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi, I'm chiming in on this thread because it looks like i'm running into a similar problem. I have installed xcode 3.0 that came with Panther. it's in /developer on my drive. I'm trying to install OpenVPN on my macbook.

    first try with ./configure couldn't find gcc. i added /developer/usr/bin to my $PATH and that seemed to work, but now i get the "failed sanity check" which other forums tell me is because I don't have c++ installed. any idea what gives?

    thanks in advance. John

  8. 0

    John Hendy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I'm very new to terminal/Unix... Would someone be able to teach me how to set the location of gcc in the $PATH? I have hunted around the internet forever trying to get an example and it seems I'm having the same problem as this post was originally reporting... In most of the forums I've searched , most people suggest that gcc/g++/gmake aren't installed. I have installed X Code 3.0 and can find gcc 4.0 from the finder. In addition:

    $ gcc -version

    $-bash: gcc: command not found

    BUT

    $ /Developer/usr/bin/gcc -version

    $ i686-apple-darwin9-gcc-4.0.1: no input files

    I have gotten far enough to think that I can add to my path through the bashrc file. Is this correct? Forgive my ignorance... everyone has to learn someway, right? I've googled for 'sample bashrc files' to see if I could pick out any path settings but mostly have pulled up people's mile long customized files which were difficult to sort through for a newbie.

    Thanks,

    -John

  9. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Assuming your shell is bash, then add the following to $HOME/.bash_profile

    export PATH="$PATH:/Developer/usr/bin"

    If you are csh/tcsh user, then in $HOME/.login

    setenv PATH "$PATH:/Developer/usr/bin"

  10. 0

    Gnarlodious

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    What happens when you say this:

    which g++

  11. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    By default, it gets installed like this, in /usr/bin :

    zsh-% ls -1 /usr/bin/gcc* /usr/bin/g++*

    /usr/bin/g++@

    /usr/bin/g++-4.0*

    /usr/bin/gcc@

    /usr/bin/gcc-4.0*

  12. 0

    Gnarlodious

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Yeah, I just wonder if the OP's XCode was installed wrong. maybe an older version that did not get overwritten.

  13. 0

    Bill Scott

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    It might be worth reporting this to Apple as a bug, as it would break everything.

  14. 0

    Don Chambers

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    They were not there yesterday afternoon. But after I turned off the computer and re-booted, they were there this morning! And I did restart after installing Xtools.

  15. 0

    J.Faucett

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I also got an invalid checksum on an Xcode 3.0 image that was downloaded via Camino. Switching to Safari, the same download produced a valid image!