[R-SIG-Mac] building R under Lion

Simon Urbanek simon.urbanek at r-project.org
Wed Aug 29 02:51:07 CEST 2012


You were on the right path - it's only about renaming vecLib to Accelerate, so you just have to apply the patch below. It is annoying, since -framework vecLib still works just fine so you don't even need to change the configure flags. The patch will in some modified form make it to R eventually.

Cheers,
Simon


Index: vecLibg95c.c
===================================================================
--- vecLibg95c.c	(revision 59442)
+++ vecLibg95c.c	(working copy)
@@ -2,7 +2,7 @@
 #include <config.h>
 #endif
 
-#include <vecLib/vecLib.h>
+#include <Accelerate/Accelerate.h>
 
 void F77_FUNC_(rcblas_cdotu_sub,)(const int *N, const void *X, const int *incX,
                        const void *Y, const int *incY, void *dotu) 





On Aug 28, 2012, at 5:22 PM, Kasper Daniel Hansen wrote:

> I am running Lion, with the newest version of Xcode, and the 5666
> build of gcc+gfortran from Simon's page.  This is on Macbook pro last
> generation, with a quad core i7.  I have installed the latest stable
> release of Xquartz.
> 
> I am building R, not as a framework (--disable-framework), but I am
> using --with-blas='-framework vecLib' which at least used to be much
> better than the built-in BLAS.
> 
> My entire configure call is
> ../${SRCDIR}/configure SHELL='/bin/bash' \
>  --prefix=/usr/local/R/R-${R_VERSION} --disable-R-framework\
>  CC="/usr/bin/gcc-4.2 -arch x86_64 -std=gnu99" \
>  CFLAGS="-g -O2 -std=gnu99 -march=nocona" \
>  CXX="/usr/bin/g++-4.2 -arch x86_64" \
>  CXXFLAGS="-g -O2 -march=nocona" \
>  OBJC="/usr/bin/gcc-4.2 -arch x86_64" \
>  F77="/usr/bin/gfortran-4.2 -arch x86_64" \
>  FFLAGS="-g -O2 -march=nocona" \
>  FC="/usr/bin/gfortran-4.2 -arch x86_64" \
>  FCFLAGS="-g -O2 -march=nocona" \
>  --enable-memory-profiling\
>  --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib\
>  --with-system-zlib\
>  --with-blas='-framework vecLib' --with-lapack
> 
> When I build R-2.15.1-patched, I get
> 
> making internet.d from ../../../../R-2.15.x-src/src/modules/internet/internet.c
> In file included from
> ../../../../R-2.15.x-src/src/modules/lapack/vecLibg95c.c:5:
> /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:22:4:
> error: #error "<vecLib/vecLib.h> is deprecated.  Please #include
> <Accelerate/Accelerate.h> and link to Accelerate.framework."
> make[3]: *** [vecLibg95c.d] Error 1
> make[2]: *** [make.lapack] Error 2
> make[2]: *** Waiting for unfinished jobs....
> making nanoftp.d from ../../../../R-2.15.x-src/src/modules/internet/nanoftp.c
> 
> <SNIP>
> 
> /usr/bin/gcc-4.2 -arch x86_64 -std=gnu99 -I. -I../../../src/include
> -I../../../../R-2.15.x-src/src/include -I/usr/local/include
> -DHAVE_CONFIG_H   -fopenmp -fPIC  -g -O2 -std=gnu99 -march=nocona   -c
> ../../../../R-2.15.x-src/src/modules/internet/sockconn.c -o sockconn.o
> /usr/bin/gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib
> -Wl,-headerpad_max_install_names  -undefined dynamic_lookup
> -single_module -multiply_defined suppress -L/usr/local/lib -o
> internet.so Rhttpd.o Rsock.o internet.o nanoftp.o nanohttp.o sock.o
> sockconn.o   -Wl,-framework -Wl,CoreFoundation
> mkdir /Users/khansen/build/R/R-2.15.x-build/modules
> make[1]: *** [R] Error 1
> make: *** [R] Error 1
> 
> So it seems that it does not like -framework vecLib.  I tried with
> -framework Accelerate, but I get the same error.
> 
> My guess is that there is some new thing I have to do here, but I
> tried reading the admin guide for R-devel and could not see anything
> particular (except I do not need -arch x86_64 anymore).
> 
> Thanks,
> Kasper
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 



More information about the R-SIG-Mac mailing list