Closed whipson closed 8 months ago
Which version of R and gcc and libv8 do you have installed? Did you install libv8 from EPEL? Can you show output of
g++ --version
And
yum info v8-devel
R version = 4.2.3
gcc
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
yum info v8-devel
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
runner_gitlab-runner 245/245
Installed Packages
Name : v8-devel
Arch : x86_64
Epoch : 2
Version : 9.4.146.26
Release : 1.16.20.2.1.el7
Size : 0.0
Repo : installed
From repo : epel
Summary : v8 - development headers
URL : http://nodejs.org/
License : MIT and ASL 2.0 and ISC and BSD
Description : Development headers for the v8 runtime.
Hmmm it seems that EPEL has upgraded their v8-devel
to a version that requires more recent compilers from Redhat Developer Tools...
Not sure if this is an option for you, but I tested it with the RedHat devtools compilers. This works on CentOS7:
yum install -y centos-release-scl
yum install -y devtoolset-9-gcc-c++
You can set the CXX17 compiler in R by creating a file ~/.R/Makevars
that contains the following:
CXX17=/opt/rh/devtoolset-9/root/usr/bin/g++ -std=gnu++17
CXX17FLAGS=$(CXX11FLAGS)
CXX17PICFLAGS=$(CXX11PICFLAGS)
Alternatively you can set these fields globally for all users in the $(R RHOME)/etc/Makeconf
file.
This should work, you can now try to install the V8 package in R.
By the way, there are many R packages these days that require more recent compilers than gcc 4.8. You can automatically but the devtools compilers on the PATH like so:
echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc
Now if you restart the machine, g++ --version
should give you g++9.
Thanks that seems to have resolved the issue
By the way, is there any reason you want to use DISABLE_STATIC_LIBV8=1
? Usually the static libv8 is the easiest solution.
I'd previously tried with DISABLE_STATIC_LIBV8=1
because I saw it is a solution in some previous related issues. When I tried your solution here, I returned it to empty.
I'm trying to install
V8
on an on premises server running RHEL 7.9. I've setDISABLE_STATIC_LIBV8=1
. I'm getting the following error - seems to be related to C++ compilation.