I'm trying to build R-devel / R-patched. I've read some links, connected with steps for doing this.
1) https://www.r-bloggers.com/2022/01/building-r-4-2-for-windows-with-openblas/
2) https://www.r-bloggers.com/2020/05/building-r-4-for-windows-with-openblas/
3) https://github.com/r-windows/r-base
But unfortunatelly, without any success.
In "1" I have no "Makefile.win" and no file with "-lf77blas -latlas"
In "2" manually created "full-build.sh" script do not do anything.
In "3" I have an error with Use_ATLAS=YES
installing 'sysdata.rda'
make[3]: *** [../../../share/make/basepkg.mk:151: sysdata] Error 127
make[2]: *** [Makefile.win:22: all] Error 2
make[1]: *** [Makefile.win:32: R] Error 1
make: *** [Makefile:18: all] Error 2
This error is connected with this row in basepkg.mk:
@$(ECHO) "tools:::sysdata2LazyLoadDB(\"$(srcdir)/R/sysdata.rda\",\"$(top_builddir)/library/$(pkg)/R\")" | \
R_DEFAULT_PACKAGES=NULL LC_ALL=C $(R_EXE)
So, could anyone helps me, pls? What's wrong with these 3 ways? How it's possible to build R devel correctly (with installation file if possible)? Also is it possible to compile this with AMD BLIS library (I have Ryzen 9 5950x).
Thank you.
P.S. I use Windows 11 and gcc-12.02 from winlibs P.P.S. If possible, please, add a recipe for building R with AMD BLIS...
Following the 2 above links, here are some basic steps:
1. Install Rtools43
(i) Download; (ii) Install it to default location (i.e.,
C:\rtools43)2. Install MikTeX and Inno Setup
3. General setup
Run the Msys2 shell (
c:/rtools43/msys2.exe)Make a folder to store the source files:
mkdir /c/R-develUpdate Msys2:
pacman -Syuuit may update only the core stuff first, then ask you to close the terminal. You should follow the instructions, then relaunch Msys2 shell and rerunpacman -Syuua second time to fully update all the componentsInstall wget and subversion:
pacman -Sy wget subversionChange the working directory to the folder created in step 3.2:
cd /c/R-develGrab latest Tcl/Tk bundle from here, a file named such as
tcltk-5493-5412.zip:Grab the latest R version (R-devel), and unzip Tcl:
4. Add a
MkRules.localin/c/R-devel/trunk/src/gnuwin32/You can use Notepad++ to create a new
MkRules.localfile with the following contents (editISDIR = ...to the appropriate directory in step 2):5. Adjust
/c/R-devel/trunk/src/extra/blas/Makefile.winYou can use Notepad++ to change the line
-L../../../$(IMPDIR) -lR -L"$(ATLAS_PATH)" -lf77blas -latlasto-L../../../$(IMPDIR) -lR -fopenmp -lopenblas6. Compile R
Run the Msys2 shell and change to appropriate working directory:
cd /c/R-devel/trunk/src/gnuwin32/Set environment variables as follows (update the MiKTeX installation directory in the commands below):
Test that the tools are available:
which make gcc pdflatex tarBuild R installer:
The installer will be available at:
/c/R-devel/trunk/src/gnuwin32/installer/R-devel-win.exe7. Test if our R compilation utilize OpenBLAS
The following R code should run much faster compare to standard R for Windows downloaded from CRAN: