Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

akindo

macrumors newbie
Original poster
Nov 7, 2008
3
0
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 https://forums.macrumors.com/threads/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:
 
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.
 
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.
 
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.
 
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.
 
install just gcc (not whole xcode)

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.


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).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.