[R-pkg-devel] Reliably detecting FLIBS on source build of R (w.r.t Rust packages)

Balasubramanian Narasimhan n@r@@ @end|ng |rom @t@n|ord@edu
Sat Jan 25 17:54:45 CET 2025


I got the note below from Prof. Ripley on my package 'clarabel' failing 
M1mac checks.

This puzzles me because I am using FLIBS determined via`R CMD config 
FLIBS` using the crate I wrote for this very purpose 
(https://github.com/blas-lapack-rs/r-src/blob/966266425b1a21a1e979f767c6023e6bf00616fc/build.rs#L160). 


The only thing I can think of is that FLIBS is being set outside 
config.site or Makevars during the R build.

What could I be missing? (As is remarked, the M1Mac/README.txt may not 
be up to date re: toolchain details.)

Thank you.

-Naras

> Dear maintainer,
>
> Please see the problems shown on
> <https://cran.r-project.org/web/checks/check_results_clarabel.html>.
>
> Please correct before 2025-02-08 to safely retain your package on CRAN.
>
> There is a check service for M1mac issues: see
> https://www.stats.ox.ac.uk/pub/bdr/M1mac/README.txt .
> However, it is running a much older version of the OS
> and toolchain -- and the latter often matters.
>
> The CRAN Team

gfortran is not a system library everywhere so you need to use FLIBS. On 
my macOS box that is

FLIBS =  -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/14.2.0 
-L/opt/gfortran/lib -lemutls_w -lheapt_w -lgfortran -lquadmath

On CRAN distributions these libraries may be found in R_HOME/lib, but 
not when building from sources.


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list