[R-SIG-Mac] Build / source of libRblas.vecLib.dylib

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Tue Oct 31 17:43:25 CET 2023


On 31/10/2023 16:08, Colin Rundel wrote:
> The short version of the question - does anyone know what build process is used to generate the libRblas.vecLib.dylib that is included in /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib by R-4.3.1-arm64.pkg? I have not been able to find any direct references in the R source files or the build scripts on svn.r-project.org/R-dev-web/ <http://svn.r-project.org/R-dev-web/>.

I asked Simon a few weeks ago -- it is not in the docs.  He said

"the currently shipped version is the umbrella one - i.e. it is simply 
created with -sub_umbrella Accelerate"

which is beyond my mach-O knowledge (and not easy to search for).

Also, it is incomplete (read on) and can cause segfaults.

> The longer version with context - I was recently interested in experimenting with the Accelerate framework / vecLib. Using CRAN's binary pkg installer libRblas.vecLib.dylib is provided and it is straightforward to change the libRblas.dylib symlink and get everything working.
> 
> However, I've typically used homebrew's formula distribution to install R on my systems which compiles R from source. The maintainers have currently opted to compile and directly link to openblas which prevents the swapping of blas engines via changing symlinks. Changing back to configuring / compiling with --enable-BLAS-shlib is easy enough but since Apple has now changed how framework dylibs are accessed it seems like something along the lines of libRblas.vecLib.dylib is needed,

Something is needed, as the accelerate functions do not use the same ABI 
as the Fortran compiler used to compile R, and so 'shims' are needed 
(and those in the R sources only cover issues in LAPACK, not direct BLAS 
calls).  See

https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Accelereate

for how this can be done with 'new' Accelerate in R-devel.  My 
experiments showed OpenBLAS to work comparably to 'new' Accelerate.

How best to work around those ABI differences is still under investigation.

> I just can't for the life of me figure out how to create it / whereit comes from at the moment. An additional wrinkle is that for homerbrew 
fomulae everything must be compiled from source so the dylib can't just 
be bundled or downloaded.
> 
> Thanks,
> -Colin
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-SIG-Mac mailing list