Skip to content

Compiling against the Accelerate framework on OS X 10.9

7 messages · Peter Dalgaard, Simon Zehnder, Federico Calboli +1 more

3 days later
#
Jon,

first install the Xcode developer tools for Mavericks via Xcode developer tools -> Other developer tools (if you don?t have yet).

Then in your configure command add CPPFLAGS=?-D__ACCELERATE__? as suggested by Simon Urbanek on http://permalink.gmane.org/gmane.comp.lang.r.mac/7293. That should make it run.


Best 

Simon

P.S.: I would consider the gcc4.8.2 binary from http://hpc.sourceforge.net for Mavericks and ML; I worked before with the macports alternative and found it easier to use these binaries. They are always up to date?
On 24 Oct 2013, at 13:33, Jon Clayden <jon.clayden at gmail.com> wrote:

            
#
On Oct 27, 2013, at 22:33 , Simon Zehnder wrote:

            
--- except that MacPorts had R unbuildable for weeks with an internal compiler error in Fortran. This sort of instability is what happens when a distribution treats the build tools as just another set of applications. 

But, yes, it is currently a bit of a conundrum whether to head towards doing things the Open Source Way or the Apple Way.

(And there isn't really an "Open Source Way". There are eminent examples of well-managed Open Source distributions in the Linux world, both on a professional and on a volunteer basis. However, whenever people try retrofitting the idea of maintained distributions onto commercial platforms, it seems that amateurism kicks in.)
#
Just for the record, I install the gcc binaries from http://hpc.sourceforge.net (no MacPorts anymore)  and with these I compile R from sources. Before I used the gcc4.8 from Macports - but never used R from MacPorts. 

And yes, with Apple installation of any open-source software including a compilation via configure/make becomes complicated and it will always be.
On 28 Oct 2013, at 11:27, peter dalgaard <pdalgd at gmail.com> wrote:

            
#
On 27 Oct 2013, at 21:33, Simon Zehnder <szehnder at uni-bonn.de> wrote:

            
Please note that http://r.research.att.com/tools/ explicitly warns about using the Fortran compiler from http://hpc.sourceforge.net, in case you need Fortran for building a package from source.  Unfortunately the Fortran compiler especially supplied for R use is ancient and will not properly compile stuff that depends on a more modern Fortran compiler version (such as Julia).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20131028/4a1842d5/attachment-0001.bin>
#
Thanks for the link! Something new for me.
On 28 Oct 2013, at 12:11, Federico Calboli <f.calboli at imperial.ac.uk> wrote:

            
#
Thanks for the replies.

Adding "-D__ACCELERATE__" to CPPFLAGS does seem to work. I did see that thread before, but I was under the impression that it was an issue with configuring against the vecLib framework rather than Accelerate. It seems pretty surprising to me that not defining this variable would lead to a type conversion error. Hey-ho.

In any case, there seems to be no issue with my toolchain: self-built gcc/g++/gfortran works just fine with this tweak.

Regards,
Jon
On 28 Oct 2013, at 12:02, Simon Zehnder <szehnder at uni-bonn.de> wrote: