Installing GCC Without All of Xcode

Discussion in 'Mac Programming' started by akindo, Nov 7, 2008.

  1. macrumors newbie

    Joined:
    Nov 7, 2008
    #1
    Hi fellow programmers on OS X. I just got a new Leopard install up and running on my 76GB HD. I need gcc and gdb plus all libraries for C and C++ programming, but am not keen on installing all of Xcode because, a. it takes up about 2.5GB on my small HD, b. I will use Emacs and gdb instead of the Xcode IDE.

    I read here http://forums.macrumors.com/showthread.php?t=374259 about a guy who modified the Xcode installer to just install gcc. Does anyone know how I can do a similar modification to get gcc and gdb plus the libraries? Is it simply a matter of deleting packages from the diskimage? And if so, which package contains gdb and the libraries?

    Thanks a lot for any help. :apple:
     
  2. macrumors newbie

    Joined:
    Nov 6, 2008
    #2
  3. macrumors 6502a

    Joined:
    Aug 22, 2003
    #3
    Do a custom install and uncheck everything but the compilers. This was not an option before Leopard, and I was very excited to see it added.
     
  4. thread starter macrumors newbie

    Joined:
    Nov 7, 2008
    #4
    Thanks for the help guys.

    bdoyle: Thanks for that, had a look at the Developer Tools download page on Apple dev. I found gcc, also thanks to your link, but not gdb. I have previously tried to compile the gdb sources on OS X without success and was told on the gdb IRC channel that those sources are not for OS X/powerpc. Is there any other way to get gdb?

    NeoMayhem: I had a second look at the install for Xcode 3.1.1 and cannot find a custom install option. There is a page where you can uncheck some options, but it is not possible to uncheck the core Xcode tools, which take up 2GB.
     
  5. macrumors 6502a

    Joined:
    Aug 22, 2003
    #5
    Did you download xcode or are you installing it off the DVD that came with your mac?

    I am positive I was able to just install the compilers. I was surprised to see it an option, because it never was in the past.

    What I used to do was just install the whole thing, and then delete the /Developer Folder. GCC and everything else is installed in system folders, so this just removes xcode and the documentation.
     
  6. thread starter macrumors newbie

    Joined:
    Nov 7, 2008
    #6
    I installed it from the downloaded dmg, as this is the newest version.

    Good tip regarding installing everything and then removing the /Developer dir, think I will do that then.
     
  7. macrumors member

    Joined:
    Aug 28, 2008
    Location:
    Pittsburgh, PA
    #7
    install just gcc (not whole xcode)


    Uninstall xcode and remove the /Developer directory in one command (i.e. don't just delete the folder; and note, this is referenced in the aboutxcodetools.pdf inside the xcode312.dmg you downloaded from connect.apple.com):
    /Developer/Library/uninstall-devtools --mode=all

    You can then just install gcc from that same xcodetools.dmg, inside the Packages folder (i.e. don't use the main XcodeTools.mpkg, but Packages/gcc4.2.pkg).
     

Share This Page