Hacker News new | past | comments | ask | show | jobs | submit login
Bootstrapping CC (for OSX, using Homebrew) (github.com/mxcl)
73 points by telemachos on March 11, 2011 | hide | past | favorite | 26 comments



> Since Xcode is no longer free

Turns out Xcode was never actually free: previous major releases were synchronized with OS releases. Xcode 2 came with 10.4, Xcode 3 came with 10.5.

The reason why they were "free" and Xcode 4 is not is... that Xcode 4 has been released "mid-cycle" before Lion landed. Previous Xcode were "paid" through the OS they came with, even if you downloaded them from Apple's website as it was the OS entitling you to the relevant Xcode install.

With that said, where are we so far on Xcode?

* Since Lion has not been released yet, all macbooks but Air come with the standard DVD set which contains an Xcode install

* Xcode 3.2.6 and the iOS 4.3 SDK are still available as free downloads for the Air (or to replace older Xcode installs), just go into the dev center and you are given a link to Xcode 3. You even get a download link for Xcode 3 from the Xcode 4 page: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/...

I understand that people kind-of freakout (I did originally), but if you actually look at the events with a cool head, and previous devtools-related-events (as well as previous instances of Apple's wonky SOX-related decisions), it seems extremely likely Xcode 4 will go back to "free for everybody" on Lion, it might even be an at-install option (à la OSX Server).

Oh yeah, and there are already binary distributions of OSX compilers: http://llvm.org/releases/download.html has both Clang and LLVM-GCC binaries for OSX.


Xcode 3 works fine so yeah I agree. We'll point people there.


That makes sense. Following that logic, the version that will be "free" will require Lion.


Indeed, that is what I meant, but I may have lost myself in my word-soup.

(note: "free" for everybody, Xcode 4 is already "free" if you're part of Apple's subscriber developer programs at $99/year).

On the other hand, it's annoying that Apple leaves everybody in the dark: if Lion is released in, say, 6 months. And if Xcode 4 is "free" on Lion. Does that mean non-subscribers bought 6 months of Xcode for $5? Isn't that a bit sucky?


Not really. If you value Xcode 4 so little that $5 to get it six months early (before spending $150 to get it with Lion) is "sucky" for you, it doesn't sound like you wanted it in the first place.


That's less than 3 cents per day; not a huge cost, especially if you're using it for work. How many other things can you rent for less than $1/month?


> That's less than 3 cents per day; not a huge cost, especially if you're using it for work.

If you use it for work, I'd expect you have a (paid) developer account, therefore you got it for free.

Professionals using Xcode for work are by far the least likely to need to pay for Xcode 4. Hobbyists or free-software developers, on the other hand...


No hobbyist needs to pay for Xcode 4. You can use Xcode 3 for free, or you can pay $5 and use Xcode 4 without having to wait for and buy Lion, or you can just wait and get it free with Lion.


This is silly -- these are just blind leading the blind questions. I guess I can provide some answers ...

- homebrew should just provide binaries rather than trying to bootstrap a compiler for everyone.

- Barring that, homebrew should wait and see if Xcode4 is free with Lion.

- A compiler isn't enough. You also need an assembler, linker, etc. Those can be found in Apple's cctoolz and ld64 projects.

- Headers are are also required. Those belong to Apple and are not freely redistributable.

- GCC 4.2 is still the default, not clang. Apple still builds the majority of the OS with GCC.

- Apple does modify the compiler. Look at PLBlocks (http://code.google.com/p/plblocks/) for scripts that can drive an Apple compiler build.

- homebrew is learning why "do not dupe" is not viable when dealing with Apple in the longterm, and is going to just wind up being a less mature macports clone after going through a few more release cycles.


- We are going to provide binaries for the CC toolchain.

- We can't wait for Lion, nor expect everyone to use Lion.

- The wiki page even says we need the whole toolchain

- Headers is a good point

- GCC is not the default /usr/bin/cc for Xcode4

- Yeah, we know that.

- Macports needs Xcode too.


We can't wait for Lion, nor expect everyone to use Lion.

But nothing has changed. The presence of Xcode 4 does not invalidate people's existing copies of Xcode 3 already installed or that exist on their OSX DVD. Further, the version of gcc is the same.

If this whole episode is what finally gives people the motivation to have an easier-to-install binary of gcc, then great. But the actual need is the same today as it was last week.


This is a fair point.

It may work that we can support both 3 and 4. But experience suggests that even minor build bumps of Xcode cause issues compiling software.

Ultimately it is a lot easier for us if we can say install this and use that and you will have very few issues using Homebrew.


The need is the same... 'ish. Personally I think Lion will have xcode 4 free (bit like Facetime has been done). Here's the thing tho, compiler bugfixes etc. need you to sign up to the dev. program or, at the moment, buy xcode. This is bad imho and therefore it's worth the effort to give the user of homebrew an option.


> Here's the thing tho, compiler bugfixes etc. need you to sign up to the dev. program or, at the moment, buy xcode. This is bad imho and therefore it's worth the effort to give the user of homebrew an option.

Xcode 3.2.6 was released at the same time as Xcode 4 and is freely downloadable.


- We are going to provide binaries for the CC toolchain.

I meant binary packages, not a bootstrap tool chain.

- We can't wait for Lion, nor expect everyone to use Lion.

Xcode3 is still available. Xcode4 is not yet mandatory.

- Headers is a good point

It's an insurmountable obstacle, unless you plan on independently generating your own replacement headers (which is possible, but is going to be a world of pain).

- GCC is not the default /usr/bin/cc for Xcode4

Yes, Apple is investing heavily in moving everything to LLVM/clang in Lion (... and, as such, with Xcode4), but even in Xcode4 the default /usr/bin/gcc and iOS compiler is llvm-gcc4.2, not clang.

Additionally, you'll likely find it more difficult to track clang over GCC, as Apple is less explicitly about matching up their custom branches to actual releases as shipped with Xcode.

- Macports needs Xcode too.

My point was that this demonstrates why working with a vendor as capricious[1] as Apple often requires one to carve out their own niche of stable dependencies, and most of what you've often claimed sets homebrew apart[2] will be gradually worn away as you have to deal with Apple major releases.

That said, I hope MacPorts just starts using their support for binary packaging of ports (port archives).

[1] They're not really capricious, so much as focus on the consumer, and not on developers building large port systems. [2] I'm reminded of this line-by-line assessment: http://apps.ycombinator.com/item?id=872072


It's an insurmountable obstacle, unless you plan on independently generating your own replacement headers (which is possible, but is going to be a world of pain).

How is it unsurmountable? I remember mingw/cygwin doing a similar thing for Windows.


It's not too hard to cobble together open-source headers and autogenerated minimally viable headers for the OS frameworks (this is what the initial non-official iPhone toolchains did).

They'll be very incomplete, however, quite a bit of software will not build correctly, and it will take a significant effort to clean them up.


I think you want something like http://rudix.org


Regardless of XCode 4 free or paid, it would be nice to have a compiler separate from XCode. Installing the whole IDE you never use has always seemed like an overkill.


I couldn't agree more! I do all my work on a 11" MacAir with 64Gb HD and having something I never use take up 4Gb is just silly!


I agree with both of you, but at the end of the day, you can just delete all the unneeded stuff from the /Developer folder.


The cost or otherwise of xcode is irrelevant. This is about repackaging apple's distributions of various tools for our convenience. As others have said the $5 is simply a push to do something that probably should have been done before.

In light of this I am personally in favor of simply taking the binary pkgs out of the xcode dmg, in pursuit of maximum compatibility and minimum duping, and general adherence to homebrew's stated project goals.

However this would obviously require some research as to the specific licensing issues involved, and some dialog with apple. If it turns out to be OK, then the whole thing would be pretty trivial.

If it doesn't pan out, then look at messier options like using different builds, making your own headers (yuck) etc.


I don't get why everyone is freaking out when Xcode 3.2.6 is still available from free.

Until we can no longer access 3.2.6, let's not start spreading FUD.


Apple doesn't like to let their old technologies hang around for very long. Suddenly not having Xcode 3 available is what I'm afraid of.


XCode 4 will be free with Lion. Anyway, who cares? GCC version in 4 is the same as in 3.


This is why people should stop frothing at the mouth any time a company does something (another example: Hudson).

If a problem is significant enough, the Community will figure something out.




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: