Skip to content

OOM compiling devSVG.cpp in C++17 #137

Description

@jeroen

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:

* installing to library ‘/usr/local/lib/R/site-library’
  * installing *source* package ‘vdiffr’ ...
  ** using staged installation
  ** libs
  using C++ compiler: ‘g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0’
  g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/cpp11/include'     -fpic  -O2 -ffile-prefix-map=/build/r-base-MHXHhT/r-base-4.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c compare.cpp -o compare.o
  g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/cpp11/include'     -fpic  -O2 -ffile-prefix-map=/build/r-base-MHXHhT/r-base-4.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c cpp11.cpp -o cpp11.o
  g++ -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG  -I'/usr/local/lib/R/site-library/cpp11/include'     -fpic  -O2 -ffile-prefix-map=/build/r-base-MHXHhT/r-base-4.3.1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c devSVG.cpp -o devSVG.o
  g++: fatal error: Killed signal terminated program cc1plus
  compilation terminated.
  make: *** [/usr/lib/R/etc/Makeconf:200: devSVG.o] Error 1
  ERROR: compilation failed for package ‘vdiffr’
  * removing ‘/usr/local/lib/R/site-library/vdiffr’

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions