Closed Javdat closed 4 years ago
The undeclared reference to make_unique() confirms that the compiler is not recognizing C++14.
Do you know what compiler you are using? The incantation for specifying C++14 can vary among compilers.
Compiler was g++
at /usr/bin/g++
So, I decided to directly declare it:
CXX14=/usr/bin/g++
This did not work.
Apparently, the problem was that g++
was an old version (?):
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
So, I followed this: https://stackoverflow.com/questions/53552166/rstan-c14-error-while-installing-centos
Install g++8
yum install centos-release-scl
yum install devtoolset-8-gcc*
Enable it as default (believe this can be skipped if we are defining it in Makevars?)
scl enable devtoolset-8 bash
Locate it:
>which g++
/opt/rh/devtoolset-8/root/usr/bin/g++
>g++ --version
g++ (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Declare it in ~/.R/Makevars
CXX14FLAGS=-O3 -march=native -mtune=native -fPIC
CXX14=/opt/rh/devtoolset-8/root/usr/bin/g++
This fixed the problem.
Thank you.
I am trying to install
Rborist
as part of dependency for another package (VSURF
) in R.But compilation keeps failing inside the docker running CentOS 7.
Initial error was:
So, I followed a suggestion to declare it in Makevars:
But it is still falling:
OS: CentOS 7 R version: Microsoft R Open 3.5.3 (its based R-3.5.3)
Maybe someone has suggestions? Thank you!