

Bootstrapping CC (for OSX, using Homebrew) - telemachos
https://github.com/mxcl/homebrew/wiki/Bootstrapping-CC

======
masklinn
> 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/...](https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792)

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.

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

~~~
masklinn
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?

~~~
spicyj
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?

~~~
masklinn
> 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...

~~~
chc
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.

------
nupark
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.

~~~
mxcl
\- 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.

~~~
scott_s
_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.

~~~
leepa
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.

~~~
masklinn
> 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.

------
nmk
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.

~~~
amurmann
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!

~~~
borism
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.

------
JonnieCache
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.

------
callumjones
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.

~~~
cytzol
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.

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

------
jarin
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.

