646 points · by craigkerstiens · 14y ago · 103 comments
llvm-gcc doesn't compile many projects correctly, including gcc itself (as of Xcode 4.2 there were reports that it's not possible to compile a gcc cross-compiler using llvm-gcc). Hopefully there have been improvements in this regard.
Still, anyone who needs the real gcc will have to install it through some other means.
Clang is a faster and BSD-licensed compiler that Apple is putting all its weight behind now. LLVM-GCC has also been deprecated as it was removed as-of LLVM 3.0.
Clang is the future and it's the default compiler with the Command Line Tools. We just need to wait for upstreams to fix the various issues.
It's worth noting that this is why monocultures are bad. For all the love of GCC (and it is great) we now have a huge quantity of open-source software that only compiles with one compiler. This is a shame and hopefully Clang will help rectify that.
I wonder if there's a compelling reason for these add-on distros (Fink, Homebrew, Macports) to be strictly "build from source" with no option for binary package downloads. For me, it just seems to add long delays in getting a tool installed, and adds frustrating dependencies on my Xcode version.
For that to happen, someone has to take responsibility for creating, managing, and distributing those binary packages. That's much easier said than done.
So, the simple answer is that no one has, as of yet, volunteered to do the work.
For example Qt has a bottle: https://github.com/mxcl/homebrew/blob/master/Library/Formula...
The reason we aren't doing this for more packages is basically people power and hosting (as I'm not sure Sourceforge would be happy we hosting the number of binaries we'd want to have).
Hope that explains a bit. Feel free to comment if you think we're taking a good/bad approach here.
http://lists.macosforge.org/pipermail/macports-users/2011-Ju...
In my experience, those are quite common now - most of the packages I install are delivered as binaries.
While strictly true, it's kind of irrelevant. The official stance is that GCC is the only compiler that is supported to build recent versions of GCC. This has been true since some point around GCC 4.0.
[1] https://github.com/mxcl/homebrew/wiki/Acceptable-Formula
(And llvm-gcc is based on that version, which is 4.2.1 or something, about 5 years old)
This is problematic for the Cocotron project [1], which is an Xcode-compatible cross-compiler environment for creating Windows/Linux ports of Cocoa apps. Currently one has to revert to Xcode 4.0.2 to build Cocotron's cross-compiler, then upgrade back to 4.2... This is not terribly convenient. (I guess the long-term solution is that Cocotron either has to add a dependency on a non-Apple gcc, or needs to switch to clang for its cross-compiler.)
The only measure by which llvm-gcc is not "real" is that it's not included in the core gcc distribution.
Edit -- the llvm-gcc project doesn't seem to share your opinion of the project as being "just another back-end". They certainly don't claim that it's fully compatible, only that it supports "many" features, "most" options, "a number of" extensions:
"Being derived from the GNU Compiler Collection, llvm-gcc has many of gcc's features and accepts most of gcc's options. It handles a number of gcc's extensions to the C programming language."
All the backends which gcc publish share huge amounts of code, in particular all the optimizations framework in the shape of the SSA representation and GIMPLE, support for generating debugging information via DRAWF.
LLVM-GCC just takes the minimum amount of GCC and replaces the entire back-end.
Do you mean something more specific?
It's been 6 years. The world has moved on, and Apple no longer has any commercial interest in PowerPC. You really expect them to keep bothering with it?
http://lists.apple.com/archives/x11-users/2011/Nov/msg00058....
It's reassuring that I will be able to continue to use my Mac and rxvt-unicode into the forseeable future.
The nice thing about just installing the OS X developer tools off the OS X DVD is that you do not need to enter into these sorts of legal agreements with Apple (beyond a standard software EULA).
Apple Confidential Information is defined to include, in addition to pre-release software, "pre-release hardware," "[pre-release] related documentation and materials," and "any information disclosed by Apple to you in connection with Apple Events or Paid Content (defined below)." Paid Content is "certain proprietary content (including, without limitation, video presentations and audio recordings) that Apple may make available to you from time to time for a separate fee." Apple Events are defined to include "certain Apple developer conferences, technical talks, and other events (including online or electronic broadcasts of such events)."
Also, Apple may "modify this Agreement, including any rules and policies at any time. You will be responsible for reviewing and becoming familiar with any such modification."
Relevant clauses below. I've highlighted the above quoted bit in context. Full PDF at https://developer.apple.com/programs/terms/registered_apple_...
If you're fine abiding these terms, by all means use this installer. I'm not saying this is evil or even neccesarily onerous. I Am Not A Lawyer. What I am saying is that this is a new layer of legal agreements which can be bypassed via the DVD install. So there is some degree of tradeoff.
(Update: Added modification clause quote, URL to full agreement.)
---
4. Confidentiality. You agree that any Apple pre-release software and/or hardware (including related documentation and materials) provided to you as a Registered Apple Developer ("Pre-Release Materials") and any information disclosed by Apple to you in connection with Apple Events or Paid Content (defined below) will be considered and referred to as "Apple Confidential Information". Notwithstanding the foregoing, Apple Confidential Information will not include: (i) information that is generally and legitimately available to the public through no fault or breach of yours, (ii) information that is generally made available to the public by Apple, (iii) information that is independently developed by you without the use of any Apple Confidential Information, (iv) information that was rightfully obtained from a third party who had the right to transfer or disclose it to you without limitation, or (v) any third party software and/or documentation provided to you by Apple and accompanied by licensing terms that do not impose confidentiality obligations on the use or disclosure of such software and/or documentation.
5. Nondisclosure and Nonuse of Apple Confidential Information.
[PREVIOUSLY QUOTED BIT]
--------->Unless otherwise expressly agreed or permitted in writing by Apple, you agree not to disclose, publish, or disseminate any Apple Confidential Information to anyone other than to other Registered Apple Developers who are employees and contractors working for the same entity as you and then only to the extent that Apple does not otherwise prohibit such disclosure. Except for your authorized purposes as a Registered Apple Developer or as otherwise expressly agreed or permitted by Apple in writing, you agree not to use Apple Confidential Information in any way, including, without limitation, for your own or any third party's benefit without the prior written approval of an authorized representative of Apple in each instance. You further agree to take reasonable precautions to prevent any unauthorized use, disclosure, publication, or dissemination of Apple Confidential Information. You acknowledge that unauthorized disclosure or use of Apple Confidential Information could cause irreparable harm and significant injury to Apple that may be difficult to ascertain. Accordingly, you agree that Apple will have the right to seek immediate injunctive relief to enforce your obligations under this Agreement in addition to any other rights and remedies it may have. If you are required by law, regulation or pursuant to the valid binding order of a court of competent jurisdiction to disclose Apple Confidential Information, you may make such disclosure, but only if you have notified Apple before making such disclosure and have used commercially reasonable efforts to limit the disclosure and to seek confidential, protective treatment of such information. A disclosure pursuant to the previous sentence will not relieve you of your obligations to hold such information as Apple Confidential Information.
6. Confidential Pre-Release Materials License and Restrictions. If Apple provides you with Pre-Release Materials, then subject to your compliance with the terms and conditions of this Agreement, Apple hereby grants you a nonexclusive, nontransferable, right and license to use the Pre-Release Materials only for the limited purposes set forth in this Section 6; provided however that if such Pre-Release Materials are accompanied by a separate license agreement, you agree that the license agreement accompanying such materials in addition to Sections 4 and 5 of this Agreement shall govern your use of the Pre-Release Materials. You further agree that in the event of any inconsistency between Section 4 and 5 of this Agreement and the confidentiality restrictions in the license agreement, the license agreement shall govern. You agree not to use the Pre-Release Materials for any purpose other than testing and/or development by you of a product designed to operate in combination with the same operating system for which the Pre-Release Materials are designed. This Agreement does not grant you any right or license to incorporate or make use of any Apple intellectual property (including for example and without limitation, trade secrets, patents, copyrights, trademarks and industrial designs) in any product. Except as expressly set forth herein, no other rights or licenses are granted or to be implied under any Apple intellectual property. You agree not to decompile, reverse engineer, disassemble, or otherwise reduce the Pre-Release Materials to a human-perceivable form, and you will not modify, network, rent, lease, transmit, sell, or loan the Pre-Release Materials in whole or in part.
It does not cover xcode, no matter what where the installation comes from or the GCC bundle. That is release software, and is not defined in the context of the confidential information.
It seems not a week goes by without another reason to be glad I never touch that platform.
Fellow software developers, show some self respect. Quit enabling this abuse.
Ok why? If you install all of Xcode, you're going to have everything included in this tools package as well, aren't you?
Look at man xcrun and man xcode-select. Both of which can be used to switch to different Xcode versions easily. In the future it looks like they are planning on making it easier to switch between different versions of Xcode.
And using xcrun one could set up a build environment for make/config with CXX/CC/and all other environment variables pointing to the right location in your /Applications/Xcode.app/ folder.
One thing I don't understand is why Apple didn't just symlink the various binaries into the Xcode app if the Xcode app is installed, instead of having to download another 170MB file.
Probably consistency. If Xcode symlinked its binaries, then either the CLI Tools team and the Xcode team have to sync all of their releases up, or what version of the tools you have will depend on whether you installed Xcode or the CLI Tools (or, if you installed both, the order in which you installed them), and projects like Homebrew would have to account for both scenarios.
Far easier to have everyone using the CLI tools using the version the CLI team is putting out, and letting the Xcode team just worry about shipping the versions they need for Xcode, and not supporting other usage scenarios.
edit: even if the CLI Tools never ship a release except at the same time as an Xcode release, it's still one fewer scenario to QA.
> Downloading this package will install copies of the core command line tools and system headers into system folders, including the LLVM compiler, linker, and build tools.
Yup, I agree. Also, with the news of Mountain Lion today, I've been worried about how much Apple will continue making OS X a platform that any developer can innovate on. This story has re-affirmed that further for me. Awesome!
So for anyone using CMAKE, and having problems, this might save you (I was able to recompile GLFW and CEGUI this way):
CMAKE_C_COMPILER=clang
CMAKE_CXX_COMPILER=clang++
I'm assuming this is because of Apple's GCC build just being wrappers around LLVM.
If ruby-build refuses to compile with clang, you should open an issue. I've done so for rvm: https://github.com/wayneeseguin/rvm/issues/763
And I'm guessing, from the submitted article, re-installing 'osx-gcc-installer' wouldn't work.
Hopefully, Ruby will work with newer tools soon.
Almost all of the tools I need I can install in minutes in Debian with apt-get. It's reliable, easy and gets me doing work instead of crying while I open 20 tabs trying to find solutions to obscure bugs on Google.
Although, the en vogue thing to do is to use a Linux in a VM. You get to keep OS X and all it's friendliness and indispensable proprietary programs, and you get to have a full Linux dev environment that's also easy to backup and "snapshot".
(Now, if the commercial software for OS X, from iWork to Photoshop, and from XCode to pro audio/video drivers, is not "indispensable" to you, by all means, use Linux).
I decided this in 2005, when a multi-GB download and 4GB install was relatively larger. And no it's not just a one-time thing, I had multiple laptops and I did reinstall them (adding linux to try out etc).
And then, I LOLed.