Closed jeroen closed 9 months ago
I must admit this is above my head but the easy fix seems to turn C++11 back on and inform CRAN of the reasons?
~IIUC, you don't need to communicate C++11 in DESCRIPTION
, perhaps setting CXXSTD
in Makevars
is sufficient?~
CRAN does not want this, and removing this is exactly what caused the problem
What's the gcc version there? I tested this on Fedora with gcc 13.2.1 and, while the compilation takes a lot more time with C++17 compared to e.g. C++14, it takes only a minimal amount of memory.
Just checked on a rocker/r-ubuntu:jammy
container with gcc 11.3.0, and I can confirm that the memory usage goes nuts after a few seconds.
I think the most reasonable fix is to add CXX_STD = CXX14
to the Makevars files. It was necessary to remove C++11
from SystemRequirements, but CRAN allows to set C++14 in the Makevars AFAIK.
@Enchufa2 Good idea but on old R versions on Windows I'm getting:
*** arch - i386
Error in .shlib_internal(args) :
C++14 standard requested but CXX14 is not defined
I'll probably go back to C++11.
Thank you for helping pinpoint the problematic GCC versions by the way. Good to know it seems fixed with more recent GCCs.
FYI: "switching" the gcc
used by Github Actions from the default 11.4.0 to 12.3.0 seems to work for me:
- name: Upgrade gcc to compile vdiffr without error
if: runner.os == 'Linux'
run: |
sudo apt-get install -y g++-12 gcc-12 # probably already installed
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 60
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 60
I'm trying to get a vdiffr update on CRAN, and this time it looks like it will go through :-)
On CRAN!
Since the switch to c++17 your CI hangs trying to compile
devSVG.cpp
for r-release and r-devel and also pkgdown. The latest versions of R now default to C++17, which causes a massive memory usage, at least on Ubuntu 22.04.Tested locally that the compilation of
devSVG.cpp
requires about 12GB mem and 10 minutes on ubuntu-22.04 in x64. I am not sure if this is a bug in GCC or expected. I am seeing the same problem on r-universe: