jeroen/V8

Installation Fails on Amazon Linux 2

judy-resmed opened this issue · 3 comments

I'm getting compilation errors while installing V8:

* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
** using staged installation
Using default C++11 compiler: 
Target architecture: x86_64
 [100%] Downloaded 12126286 bytes...
Using CXXCPP=g++ -std=gnu++11 -E
Using PKG_CFLAGS=-I/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include
Using PKG_LIBS=-L/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/lib -lv8_monolith
Running feature test for pointer compression...
In file included from /tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-local-handle.h:12:0,
                 from /tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-array-buffer.h:12,
                 from /tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8.h:25,
                 from tools/test.cpp:2:
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:38: error: ‘remove_cv_t’ is not a member of ‘std’
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                      ^~~~~~~~~~~
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:38: note: suggested alternative: ‘remove_cv’
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                      ^~~~~~~~~~~
                                      remove_cv
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:38: error: ‘remove_cv_t’ is not a member of ‘std’
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:38: note: suggested alternative: ‘remove_cv’
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                      ^~~~~~~~~~~
                                      remove_cv
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:50: error: template argument 2 is invalid
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                                  ^
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:63: error: ‘::Perform’ has not been declared
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                                               ^~~~~~~
/tmp/RtmpXUsIx0/R.INSTALL3f3f11055d7c/V8/.deps/include/v8-internal.h:563:63: note: suggested alternative: ‘Platform’
             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
                                                               ^~~~~~~
                                                               Platform

I'm using R 4.2.2 and I have v8-devel 9.4.146.26 installed. So far, I have tried setting DISABLE_STATIC_LIBV8 = 1 and DOWNLOAD_STATIC_LIBV8 = 1 but no luck there. Could you please help me take a look?

What output do you get with DISABLE_STATIC_LIBV8 = 1 ?

The problem is that your compiler is probably too old: recent versions of libv8 require c++14 which your system does not seem to support. Do you have alternative compilers available?

I got the same output after setting DISABLE_STATIC_LIBV8 = 1

I'm trying to find a way to upgrade the compiler and will try to install again. Thank you so much!

Able to install after changing compiler to c++14, closing the issue. Thank you so much!!