GCseeyoulater #173

Closed
kevinSuttle opened this Issue Dec 5, 2013 · 9 comments

7 participants

@kevinSuttle
kevins-mbp:~ kevinsuttle$ brew install apple-gcc42
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/apple-gcc42-4.2.1-5666.3.mavericks.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring apple-gcc42-4.2.1-5666.3.mavericks.bottle.1.tar.gz
==> Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.

This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:

  http://opensource.apple.com/tarballs/gcc

All compilers have a `-4.2` suffix. A GFortran compiler is also included.

What the what? Do we still need this?

@kevinSuttle

Bump.

@croaky
thoughtbot, inc. member

@kevinSuttle Re-reading that page, I'm wondering if maybe we should, as @mcmire suggested, remove the apple-gcc42 bit and just have users install XCode.

https://github.com/Homebrew/homebrew/wiki/Custom-GCC-and-cross-compilers

Homebrew depends on having an up-to-date version of Xcode because it comes with specific versions of build tools e.g. clang.

There's something sort of nice about the OS X users on the thoughtbot team having XCode installed, too, so we can run our iOS apps locally that our teammates @21x9 @dazmuda @gfontenot @tonyd256 @theocalmes and @jnutting are making.

@jnutting

Really, anyone compiling anything at all on OS X (not to mention using the iOS Simulator) is going to end up needing Xcode at some point. Trying to make do with custom builds of Apple's compiler is always going to mean jumping through a bunch of hoops until you eventually need to install Xcode anyway and all that hoop-jumping was for naught. In short, yes.

@gfontenot
thoughtbot, inc. member

Is this not something that just installing the Xcode command line tools will fix? Do we need full Xcode?

@kevinSuttle

@jnutting Yep. A prereq of Homebrew is XCode (at least the CLT), and a prereq of laptop is Homebrew, soooo...

@mcmire

Yeah, I have run into the problem of needing XCode to install some things through Homebrew. I have not, however, needed Apple's GCC compiler. A while back (in the Snow Leopard days) people reported issues with Clang (specifically having to do with Ruby, and C extensions) but I have personally not run into any of those issues. I believe I have the apple-gcc42 package installed on my computer but I don't think I am using it for anything. So I think it should be safe to remove this... but someone would have to confirm this on a new machine.

@djcp djcp added the osx label Apr 4, 2014
@gohanlon

I recall this issue the same way as @mcmire — particularly, I recall some earlier versions of Ruby wouldn't build with llvm/clang but would build the older apple-gcc42. I have had apple-gcc42 installed for a very long time, so I don't think I'd notice any problems building various formulas since Homebrew formulas as a whole seem pretty good at using apple-gcc42 it when necessary.

It's very likely that llvm/clang has better compatibility now than when it was first introduced, and many vendors have tweaked the code to be buildable with llvm/clang. But, it does seem that many formulas did fail without apple-gcc42 at some point with some version of llvm/clang, and perhaps some of them are not actively maintained or specifically don't care to support llvm/clang:

cd /usr/local/Library/Formula && grep "fails_with :llvm" *

In all, about 102 formulas describe current or past build failures with llvm: https://gist.github.com/gohanlon/c9a553c37a9af17051bf

I'm not sure what the best answer is. As a starting point, I'll try removing apple-gcc42 and then test to see if anything currently in Laptop actually needs it.

@croaky
thoughtbot, inc. member

We removed apple-gcc42 in caeada5

@croaky croaky closed this Jul 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment