"Developing" on the Mac

Date April 25, 2011

You know, developers aren't the only ones who like to use compilers...also those of us who want to compile source code would like them.

Macs never really "came" with the development toolkit (things like autoconf, make, gcc, etc), but adding it used to be really easy. You would stick the OSX install disk in the machine, and browse to the Xcode directory, and double click the .pkg file. If you didn't have the CD with you wherever you were, you just went to the Apple Developer Site and downloaded a 2+GB dmg file. That's all in the past, sadly.

I found out today that it's a lot harder to download the Xcode software (which has not only Apple's proprietary software libraries, but replaces gcc with their version of LLVM (I can only assume that it's derivative from the open-source LLVM project)) than it used to be.

If you go to the Xcode page, you'll see a link that says "Download Xcode", but what they really mean is, "Download Xcode (after you pay us $5 for the software, or pay us $99 a year to be an OSX or iOS developer)". Of course, the only version that they offer on that site is Xcode 4. What they do not tell you is that Xcode 3.2 is still available, but you can't just go download it.

No, you have to register as an Apple Developer to do that. Because we wouldn't want those precious compilers just being installed willy-nilly, right? Right.

Thanks to @lusis on twitter for sending me the following link...it's completely obvious, and I don't know how I missed it: https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20792. Go there, and register as a Free (I think they actually call it "undecided") developer, and you can then have the privilege to download the 4.1GB tarball that contains the software you need to actually compile programs on your computer.

I don't think I need to tell you that this is a huge pain in the ass. What I'm really surprised about is that they're trying so hard to charge for it, though. Xcode should absolutely be available through the App store, but making people pay to download it? That's ridiculous. Make people pay for the IDE. Make them pay for the the debugger. But don't make them pay for the stupid compiler.

Of course, at this point it becomes easier to find a way around the onerous limitations artificially placed on the system. I'd suggest installing a compiler through an alternate method, but the two biggest alternative software repositories for OSX (Fink and MacPorts) both require the developer tools already be installed!

Honestly, I never thought that I'd be tempted to pirate a free compiler.

This goes a long way to re-enforce my belief that OSX is a fine operating system as long as you don't treat it like Unix.

What are your thoughts on this? Is there any justifiable excuse for Apple's behavior? I'm interested in hearing it, if there is.

  • Claire

    They typically include XCode on the install media that comes with the machines. And until XCode 4 came out, it was reasonably clear that you could register as a free developer (however annoying that might be) and download the development tools. But XCode 4, which they make available through the Mac App Store, changes things, and it isn't entirely clear what their future plans are (although the fact that they've moved away from gcc and to a compiler they control is suggestive). Right now, word from Apple is that XCode 3.x is still free to all (and you can install it within your organization without making every user register as a developer), but when they'll discontinue 3.x and whether or not they'll then make XCode 4 available for free or split off the compilers or whatever, is not.

    One of the MacPorts Summer of Code projects is related to making binary packages available, which would be great. Except that MacPorts has all these variants that affect the way packages are built, and you can easily see how you'd need to have an enormous number of dependent packages built against each variant, so it's hard to know how they'd deal with that issue.

    I am reminded of my early days as a sysadmin with HP-UX machines that had only a very basic compiler (sufficient to compile modules into the kernel). Using that and a CD from the Unix Power Tools book allowed me to bootstrap gcc and other development tools so I could actually build the tools I needed/wanted to do my job. Maybe we'll have to go back to having community-provided prebuilt compiler packages for Mac OS X, at least to get started.

  • Adrian

    Microsoft Windows doesn't come with any compiler at all, whereas Mac OS X comes with Xcode on the install disc, much like you can get gcc from your favourite Linux distro install disc. And it's more than just a compiler; it's the IDE, debugger, and a whole lot more that you've already stated that Apple should be able to charge for.

    Once you've installed Xcode, you can install whatever you want from MacPorts.

    If I was a Developer of Apple software, I'd have already paid the $99 dollars to get access to the App Store. As a person with an occasional need to compile software, I've got no problem installing Xcode 3 from my install disc and keeping it up-to-date via Software Update. And if I decide I want to upgrade to Xcode 4 (given the GPL3 issues that are leading Apple away from software like gcc and samba) I'm not going to complain about $5 for a once-off fee; that's less than I spend on lunch.

    The community could pick up the slack and start producing gcc binaries for Mac OS X, if they wish, and if there was a sufficient need for it. I suspect most are happy with Xcode.

  • http://blog.khsing.net khsing

    Actually, after you install Xcode, you can also install other stuff which use Homebrew.

  • ZenaB

    Actually Windows does have a compiler - the dotnet frameworks include it:
    http://msdn.microsoft.com/en-us/library/ms172492.aspx

    Or you could just get one of the completely free Visual Studio Express editions:
    http://www.microsoft.com/express/

  • PB

    Did you not know that you chose to live in a walled garden when you started using a Mac? It's a lush verdant garden, to be sure, but good grief! Apple deserves the proprietary criticisms that are usually saved for Microsoft. I think they normally get a pass, just because it's so UNIXy.

    That said, I do like my Mac...

  • http://peelman.us peelman

    I could care less about the $5 to get the Xcode tools. If I was anything more than a hobbyist programmer I'd have already paid the $99 for a developer membership (or i'd have made my employer pay for it). Then again, I'd also be waiting with cash-in-hand starting in January for WWDC to open up so I could drop $1500 and *maybe* get a ticket to it.

    And ZenaB, please don't compare getting a compiler with .NET, or the free versions of VS, to Xcode 4. You're just embarrassing yourself. Capable though they are, they are not a full IDE. You know how I know? A) I've used them, and B) Microsoft still charges an exuberant amount of money for the full version of Visual Studio. I wonder if its because they feel it offers some value to developers and not just hobbyists?

  • http://www.funnelfiasco.com Ben C

    It's not just developers who face potential problems with this. As Matt said, Fink and MacPorts both require the developer tools. When I was working in an academic department at a research university, a lot of the OS X support time came from installing various scientific packages via Fink. Not having the free compilers available makes for a great way to waste already-thin support FTE.

  • http://biven.org Michael Biven

    I can't speak of the current iMac and MacBook's, but with the newer MacBook Air the Developer tools are not included in the USB software reinstall drive.

    I remember when I first got my TiBook with 10.1 installed; one of the points on Apple's site for the PowerBook was that the developer tools came with it for free. Charging for them now feels like it has more to do with the Mac App Store – charging for tools used to create applications for that store just as they did with the App Store for iOS.

    And please don't confuse an IDE with a compiler, because Matt is only observing that the compiler is not in some cases included by default and it has become less transparent that you can sign up as a "free" developer to gain free access to these tools.

    Michael

  • ZenaB

    peelman- fair enough, I've never used XCode so can't really compare, but the dotnet compiler will happily compile your stuff for you..
    I'm not a "real" developer, so don't know what I'm missing, but the free VSE's do fine for me. I'm just an infrastructure guy who dabbles when needed :)

  • http://dannyman.toldme.com/ Daniel howard

    The guys who founded Apple know all to well the disruptive potential that "garage hackers" can pose to large, established computer companies. All you hippies that want to compile your own software should grovel on your knees before The Man. If you're too prideful then you can go cower in the free software caves, where the icons do not look like candied jewels.

    -danny

  • DoDigaro

    Love the way Apple always polarises people :)

  • http://techslaves.org rthomson

    I don't know if there's any "moral" justification for the change from providing Xcode with every OS X license to the $5 charge in the Mac App Store for version 4, but there are likely to be business justifications for it. And as we all know, business justifications often trump morals no matter who you are or how altruist you may purport to be.

    On Windows, there is the community-provided mingw for those who want a truly "free" compiler toolset. I would hope that if it's as big of a deal for people to get their hands on a free compiler in binary form for OS X as you're making it out to be, that the community as a whole will also bring a simple package of tools like mingw to OS X. The community support these such free tools on Windows, Linux and BSD already. Why not for OS X, is it only because Apple had already been doing it?

    This reminds me a little bit of the Java situation. I think the direction of Java on OS X with OpenJDK will turn out better for Java on OS X in the long term than Apple continuing with the previous mediocre and glacial release of Java. Hopefully a community picking up the "basic compiler tools for free" slack from Apple could turn out better in the long run as well.

    I personally don't feel as if it's ridiculous for Apple to charge $5 for Xcode 4 as a total package, although I would also like to see some kind of free and easy to install barebones compiler that isn't married to Xcode, be it directly from Apple by decoupling GCC and providing simplified access or from the community.

  • http://jtimberman.posterous.com jtimberman

    Like many who install Xcode, I want it for the compiler and toolchain.

    However, I'd pay $50 to have Xcode installed by default instead of iLife, which I don't use *at all*.

  • Gallomimia

    I've used every flavor of OSX and Xcode has always been free, and it always will be. Steve Jobs himself stood on a stage with all the investors in front of him and said that this is because they want to make it as easy as possible for developers to get the best tools and make more software for the platform. And it's worked. Same goes for iPad and iPhone and any other device that now works on iOS.

    It's just a little hard to find on the developer website. That site has become more and more complicated, like any other free download site they seem to be hell-bent on selling their memberships. At the time of this writing, the paying of 99 dollars per year at no point says you get Xcode. You get Developer grade tech support, you get an app store merchant account, you get "Developer Resources" which are open to non-paying subscribers such as myself, and you get to preview new software releases before they come out for the public. I think there's some discounts to WWDC tickets which are thousands so that's handy, if you plan to go.

    And now I have to eat my words because I've tried to download the newest version of XCode is 5 dollars unless you pay the annual fee. What kind of stupidity is this? Whoever convinced Jobs to go back on his word deserves to be fired. Five dollars is nothing in revenue, but think of all the people who are being locked out of the use of this great software?

    Thanks to this blog for bringing it to my attention. We must note with sadness and trepidation, that the old version 3.2.5 is still free and still contains all the newest SDK/APIs whatever are needed to compile for the newest operating systems from apple.

    A sad day indeed.

  • Pingback: Upgrading to Lion via USB | Standalone Sysadmin()