R 4.3.0 for windows Generic_Debug
and <CPU optimized>_NoDebug
Versions of Debug/Optimized for C, C++, and Fortran on 64 bit Windows
This repository builds modified clones (think of Star Wars Clonetroopers) of the Old Non-Official-Version/Patched-snapshot/Build-of-the-development (NOPB) version of R
https://github.com/r-windows/r-base
Changes in this repository https://github.com/AndreMikulec/r-base include different build options
- debugging flags
- optimization flags and/or possibly OpenBlas
Two exist: Generic_Debug
and <CPU optimized>_NoDebug
.
The Debug version Generic_Debug
contains R language debugging symbols. E.g. if the debug target is Rterm.exe and the package DLL has been loaded, then when debugging the package DLL, the symbols Rf_error
and Rf_PrintValue
are available.
See the video:
Using gdb to debug R packages with native code
userprimary
The CPU Optimized version <CPU optimized>_NoDebug
is built using custom optimization gcc/gfortran flag(s) available in Rtools.
Debugging symbols are not
included.
One may not be aware of a new release/point_release of R. E.g. a point release is like the following: 4.2.x or 4.3.y. If so, inform one about it. Email to [email protected]. One then should then run the AppVeyor build to create the new release/point_releases.
If one may want the non-official version of R for windows, then one may go to any one of here (R 4.2.1 and earlier - unofficial): https://cran.r-project.org/bin/windows/base/ or (official) https://github.com/r-windows/r-base/releases .
If one may want the non-official patched snapshot build of R for windows, then one may go here: https://cran.r-project.org/bin/windows/base/rpatched.html or here: https://nightly.link/r-windows/r-base/workflows/full-build/master (choose r-patched).
If one may want the non-offical build of the development version (which will eventually become the next major release) of R for windows, then one may go here: https://cran.r-project.org/bin/windows/base/rdevel.html or here: https://nightly.link/r-windows/r-base/workflows/full-build/master (choose r-devel).
From the NOPB version of R for windows in the repository https://github.com/r-windows/r-base (R 4.2.1 and earlier) compared to this repository https://github.com/AndreMikulec/r-base differences (in here) follow.
Multiple build-job R version (r-patched/r-devel) and Debug/Optimization Combinations may be Attempted
This is configured In the file https://github.com/AndreMikulec/r-base/blob/master/appveyor.yml
environment:
matrix:
- version: 4.3.0
BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES'
MARCHMTUNE: '-march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math'
MARCHMTUNENAME: 'CPU Build CoreI7 with AVX2'
DIST_BUILD: 'with Debugging Symbols'
DEPLOYNAME: CoreI7_mAVX2_Debug
- version: patched
BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES'
MARCHMTUNE: / -march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math
MARCHMTUNENAME: CPU Build Generic / CPU Build CoreI7 with AVX2
DIST_BUILD: with Debugging Symbols / without Debugging Symbols
DEPLOYNAME: Generic_Debug / CoreI7_mAVX2_NoDebug
- version: devel
BUILDFLAGS: 'DEBUG=T USE_ATLAS=YES'
MARCHMTUNE: / -march=corei7 -mavx -mavx2 -O3 -funroll-loops -ffast-math
MARCHMTUNENAME: CPU Build Generic / CPU Build CoreI7 with AVX2
DIST_BUILD: with Debugging Symbols / without Debugging Symbols
DEPLOYNAME: Generic_Debug / CoreI7_mAVX2_NoDebug
In the NOPB version of R, the version nick name is set in the R mirror
file https://github.com/wch/r-source/blob/trunk/VERSION-NICK.
In the
file https://github.com/AndreMikulec/r-base/blob/master/build.sh
added (appended to) the
file https://github.com/wch/r-source/blob/trunk/VERSION-NICK
contents, are the messages $MARCHMTUNENAME
and $DIST_BUILD
sed -i "s/\(.*\)/\1 $MARCHMTUNENAME $DIST_BUILD/" VERSION-NICK
Because 64-bit Windows does not support dwarf-*, in the file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in adding and using
ifdef DEBUG
G_FLAG =
endif
and in the file https://github.com/AndreMikulec/r-base/blob/master/build.sh adding and using
if ! test "0" = "`grep -c -e "^\s*G_FLAG\s*?\?+\?=\s*" ${srcdir}/MkRules.local.in`"
then
sed -i "s/^\s*G_FLAG\s*?\?+\?=.*/G_FLAG = -ggdb -Og -g3/" ${srcdir}/MkRules.local.in
else
echo "G_FLAG = -ggdb -Og -g3" >> ${srcdir}/MkRules.local.in
fi
sets (overrides) is the (self declared) variable G_FLAG in the file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in
Because 64-bit Windows does not support dwarf-*, in the file https://github.com/AndreMikulec/r-base/blob/master/build.sh adding and using
if ! test "0" = "`grep -c -e "^\s*DEBUGFLAG\s*?\?+\?=\s*" ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf`"
then
sed -i -e "s/-gdwarf-2/-ggdb -Og -g3/" ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
else
echo -e "\n" >> ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
echo "DEBUGFLAG = -ggdb -Og -g3" >> ${srcdir}/R-source/src/gnuwin32/fixed/etc/Makeconf
fi
sets (overrides) is the variable DEBUGFLAG in the file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/fixed/Makeconf
Because, of the various custom debug/optimization runs of these AppVeyor build-jobs in the github R mirror file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/MkRules.rules in the NOPB version of R the variable EOPTS
EOPTS ?= -mfpmath=sse -msse2 -mstackrealign
is set (if the value does not already exist in the
file https://github.com/AndreMikulec/r-base/blob/master/MkRules.local.in).
However, in the
file https://github.com/AndreMikulec/r-base/blob/master/build.sh
to the
file https://github.com/wch/r-source/blob/trunk/src/gnuwin32/MkRules.rules
adding to (appended to) and using the previous EOPTS value, if any, is the $MARCHMTUNE
value
if ! test "0" = "`grep -c -e "^\s*EOPTS\s*?\?+\?=\s*" ${srcdir}/R-source/src/gnuwin32/MkRules.rules`"
then
if ! test "-$MARCHMTUNE-" = "--"
then
sed -i "s/\(^\s*EOPTS\s*?\?+\?=.*\)/\1 $MARCHMTUNE/" ${srcdir}/R-source/src/gnuwin32/MkRules.rules
fi
else
if ! test "-$MARCHMTUNE-" = "--"
then
echo -e "\n" >> ${srcdir}/R-source/src/gnuwin32/MkRules.rules
echo "EOPTS += $MARCHMTUNE" >> ${srcdir}/R-source/src/gnuwin32/MkRules.rules
fi
fi
In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh to make some matrix operations faster, OpenBLAS may be included.
if ! test "0" = `echo $BUILDFLAGS | grep -c -e "\bUSE_ATLAS=YES\b"`
then
pacman -S --needed --noconfirm mingw-w64-{i686,x86_64}-openblas
fi
In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh the ATLAS flags are begin replaced by the OpenBLAS flag.
if ! test "0" = "`grep -c -e "-lf77blas -latlas\b" ${srcdir}/R-source/src/extra/blas/Makefile.win`"
then
sed -i "s/-lf77blas -latlas\b/-lopenblas/" ${srcdir}/R-source/src/extra/blas/Makefile.win
fi
In the file https://github.com/AndreMikulec/r-base/blob/master/build.sh changed, is from
make distribution
to
make distribution $BUILDFLAGS
meaning (for example could be) make distribution DEBUG=T or make distribution
The checks are not performed. These tests would/may cause any Appveyor build-job to use
over one hour of allowed Appveyor build-job allowed time. In the
file https://github.com/AndreMikulec/r-base/blob/master/build.sh
make check-all
is not performed (and not written in build.sh).
#make check-all
https://qpdf.readthedocs.io/en/stable/
Located near the top of the
page https://github.com/AndreMikulec/r-base/releases
one may get deployments from one of the top
(recent) build-jobs.
The naming format is the following.
r-base_<appveyor build iteration>_<master repository>_<version>_<DEPLOYNAME>
- version is patched or devel or the version number
- DEPLOYNAME describes the build: debug xor optimization
Expand the asset drop down arrow: [v}Asset. Next, download the file base_*...*.zip
. Using an unzip software program, manually extract the R installer executable: R-x.y.z-win.exe. Finally, install R.