R-macos / recipes

System for building static dependent libraries for CRAN packages
43 stars 15 forks source link

build.sh requires /Library/Frameworks/R.framework/Resources/bin/Rscript #24

Closed astamm closed 2 years ago

astamm commented 2 years ago

I used to use build.sh r-base-dev for later build R from source. Recently, I get this error

Using R generator (/Library/Frameworks/R.framework/Resources/bin/Rscript)
./build.sh: line 126: 75475 Killed: 9               $RUN
ERROR: Makefile generation failed

It is normal that it cannot find Rscript since I first need to install r-base-dev before building R itself.

Also, how can I specify when running build.sh to use target macOS 11 instead of macOS 12? In effect, it seems that there is no gfortran available for arm64 macOS 12. @fxcoudert did release one here but I do not manage to use it for building R.

fxcoudert commented 2 years ago

it seems that there is no gfortran available for arm64 macOS 12

In addition to my build which you already linked (and others have used for R with success), Homebrew provides a GCC/gfortran for arm64 macOS 12.

astamm commented 2 years ago

Thanks for this pointer. The trouble I get into with your build is that it seems it cannot find libgfortran and asks me to adjust LDFLAGS but the folder that contains the lib is actually listed in that variable, which puzzles me. Using your build for macOS 11 works fine though.

s-u commented 2 years ago

@astamm I think your'e mixing unrelated things here. The error you show means you have broken R - looks maybe like a code signing issue. Just remove it or use build.sh -p to use the Perl driver instead, R is not really necessary for the recipes.

Then if you want to build R, then use the arm64 Fortran compiler from

https://mac.r-project.org/libs-arm64/gfortran-f51f1da0-darwin20.0-arm64.tar.gz

that's what we use. Also the full flags for the CRAN build of R are in

https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R4/conf.big-sur-arm64