Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install gcc on mac osx without installing xcode [duplicate]

Tags:

xcode

macos

gcc

Possible Duplicate:
Is there a way to install gcc in OSX without installing Xcode?

Is there any way to just install the gcc compiler on mac osx without the entire xcode development monstrosity? The latest xcode download is 4.5GB and all I want to do is compile something with gcc. That is a tad bit of overkill.

Surely there is a better way?

[Now this is supported in OSX XCode command line tools]

like image 202
Ben Avatar asked Mar 15 '11 04:03

Ben


3 Answers

See https://github.com/kennethreitz/osx-gcc-installer

A sample howto is here: http://blog.strug.de/2011/09/homebrew-without-xcode-save-15-gb/

like image 159
leif Avatar answered Oct 31 '22 13:10

leif


In February 2012 Apple released the command line tools for Xcode as a separate download: https://developer.apple.com/downloads/index.action

For background you can read this post from the author of the osx-gcc-installer project: http://kennethreitz.com/xcode-gcc-and-homebrew.html

like image 30
Jason Avatar answered Oct 31 '22 13:10

Jason


While it is definitely possible to install gcc without Xcode, it seems that nobody packages it in such a way...
That said, it does seem like your main reason for asking is to avoid the large download? If you still have the OS install discs that came with your Mac then we can get Xcode installed without having to download it from scratch.
On the root level of the DVD should be an Optional Installs folder that contains an Xcode installer.

Edit: maybe there is a way after all!
This page links to binaries of gcc for System 10.6:
http://hpc.sourceforge.net/

like image 26
Coxy Avatar answered Oct 31 '22 14:10

Coxy