Skip to content
Prev 8882 / 15075 Next

GCC on Lion and above

Tim,
On Apr 2, 2012, at 11:30 AM, Timothy Bates wrote:

            
Two reasons: a) they do not use Apple's drivers, so those are incompatible with most "regular" flags on Mac OS X (including most basic ones like -arch). b) last time I checked they were broken, i.e. the distribution did not even include libraries that the compiler linked against and it had OS version issues (i.e. it worked only on a very specific version which was not even what they were advertized for). I would hope that the latter point may have been rectified in the meantime, but I don't know. Gaurav never responded to my comments so I stopped worrying about that build. (There was a point c) where his compilers don't support ppc cross-compilation but that is less relevant now).

It is stil possible to build FSF gcc and Apple drivers - that's what we used a while ago when Apple's branch was broken. 

But note that even the most recent compilers are not much better, OMP performance is unusable for R's purpose so last time I checked there were no noticeable gains after all the work, but more recent reports are welcome.
MacPorts are quite notorious for the quality of the binaries and conflicts they cause, so I would be wary about that. If you compile everything from scratch (R and libraries), then the HPC compilers may work - you just have to stick to FSF flags.

I am still weighting the options - the most reasonable way at the moment is clang because it is supported by Apple and under active development (personally, I have switched to clang because it's much better for development), but there is no OpenMP yet for clang, although it is (allegedly) brewing. But as I said, at least for R itself, the threading performance problem is deeper, so just updating the compiler or OMP doesn't seem to help (I didn't try MPC, though).
Yes, it varies by Xcode version and your OS X version. App store is the last resort, I prefer ADC which has always worked and still works. I think the FAQ is up to date.

Cheers,
Simon