jeroen / V8

Embedded JavaScript Engine for R
https://cran.r-project.org/package=V8
Other
200 stars 29 forks source link

Installation error on CentOS Linux 7 #183

Open HarryZhang1224 opened 1 day ago

HarryZhang1224 commented 1 day ago

Hi,

I am having trouble installing R v8 in a conda environment on linux, both using CRAN and conda.

Full error: ` installing source* package ‘V8’ ... package ‘V8’ successfully unpacked and MD5 sums checked using staged installation Found C++17 compiler: x86_64-conda-linux-gnu-c++ Target architecture: x86_64 Getting bundle: v8-6.8.275.32-gcc-4.8.tar.gz [100%] Downloaded 8563543 bytes... Using CXXCPP=x86_64-conda-linux-gnu-c++ -std=gnu++17 -E Using PKG_CFLAGS=-I/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include Using PKG_LIBS=-L/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/lib -lv8_monolith Running feature test for pointer compression... Pointer compression not needed ** libs using C++ compiler: ‘x86_64-conda-linux-gnu-c++ (conda-forge gcc 14.1.0-1) 14.1.0’ using C++17 rm -f V8.so RcppExports.o bindings.o x86_64-conda-linux-gnu-c++ -std=gnu++17 -I"/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/lib/R/include" -DNDEBUG -I/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include -DV8_ENABLE_CHECKS -I'/lila/data/deyk/harry/spatial/conda_envs/ST_env/lib/R/library/Rcpp/include' -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -I/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -Wl,-rpath-link,/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/lib -fvisibility=hidden -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1728291269090/work=/usr/local/src/conda/r-base-4.4.1 -fdebug-prefix-map=/home/zhangh10/dey_hz/spatial/conda_envs/ST_env=/usr/local/src/conda-prefix -c RcppExports.cpp -o RcppExports.o x86_64-conda-linux-gnu-c++ -std=gnu++17 -I"/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/lib/R/include" -DNDEBUG -I/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include -DV8_ENABLE_CHECKS -I'/lila/data/deyk/harry/spatial/conda_envs/ST_env/lib/R/library/Rcpp/include' -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -I/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -Wl,-rpath-link,/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/lib -fvisibility=hidden -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/zhangh10/dey_hz/spatial/conda_envs/ST_env/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1728291269090/work=/usr/local/src/conda/r-base-4.4.1 -fdebug-prefix-map=/home/zhangh10/dey_hz/spatial/conda_envs/ST_env=/usr/local/src/conda-prefix -c bindings.cpp -o bindings.o bindings.cpp:21:40: error: 'FixedArray' is not a member of 'v8'; did you mean 'TypedArray'? 21 #define FixedArrayParam ,v8::Local import_arributes ^~~~~~ bindings.cpp:89:57: note: in expansion of macro 'FixedArrayParam' 89 FixedArrayParam, v8::Local referrer) { ^~~~~~~ bindings.cpp:21:50: error: template argument 1 is invalid 21 #define FixedArrayParam ,v8::Local import_arributes ^ bindings.cpp:89:57: note: in expansion of macro 'FixedArrayParam' 89 FixedArrayParam, v8::Local referrer) { ^~~~~~~ bindings.cpp:21:40: error: 'FixedArray' is not a member of 'v8'; did you mean 'TypedArray'? 21 #define FixedArrayParam ,v8::Local import_arributes ^~~~~~ bindings.cpp:126:5: note: in expansion of macro 'FixedArrayParam' 126 FixedArrayParam ^~~~~~~ bindings.cpp:21:50: error: template argument 1 is invalid 21 #define FixedArrayParam ,v8::Local import_arributes ^ bindings.cpp:126:5: note: in expansion of macro 'FixedArrayParam' 126 FixedArrayParam ^~~~~~~ bindings.cpp: In function 'v8::ScriptOrigin make_origin(std::string)': bindings.cpp:138:69: error: no matching function for call to 'v8::ScriptOrigin::ScriptOrigin(v8::Isolate*&, v8::Local, int, int, bool, int, v8::Local, bool, bool, bool)' 138 v8::Local(), false, false, true); ^ In file included from V8_types.h:1, from bindings.cpp:2: /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:9721:1: note: candidate: 'v8::ScriptOrigin::ScriptOrigin(v8::Local, v8::Local, v8::Local, v8::Local, v8::Local, v8::Local, v8::Local, v8::Local, v8::Local, v8::Local)' 9721 ScriptOrigin::ScriptOrigin(Local resource_name, ^~~~ /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:9721:41: note: no known conversion for argument 1 from 'v8::Isolate*' to 'v8::Local' 9721 ScriptOrigin::ScriptOrigin(Local resource_name, ~~~^~~ /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:1152:7: note: candidate: 'constexpr v8::ScriptOrigin::ScriptOrigin(const v8::ScriptOrigin&)' 1152 class ScriptOrigin { ^~~~ /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:1152:7: note: candidate expects 1 argument, 10 provided /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:1152:7: note: candidate: 'constexpr v8::ScriptOrigin::ScriptOrigin(v8::ScriptOrigin&&)' /scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:1152:7: note: candidate expects 1 argument, 10 provided bindings.cpp: In function 'v8::Local read_module(std::string, v8::Local)': bindings.cpp:163:42: error: invalid conversion from 'v8::MaybeLocal ()(v8::Local, v8::Local, int, v8::Local)' to 'v8::Module::ResolveCallback' {aka 'v8::MaybeLocal ()(v8::Local, v8::Local, v8::Local)'} [-fpermissive] 163 if(!module->InstantiateModule(context, ResolveModuleCallback).FromMaybe(false)){ ^~~~~
v8::MaybeLocal (*)(v8::Local, v8::Local, int, v8::Local)
/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:1303:71: note: initializing argument 2 of 'v8::Maybe v8::Module::InstantiateModule(v8::Local, ResolveCallback)' 1303 ResolveCallback callback); ~~~~^~~~ bindings.cpp: In function 'void start_v8_isolate(void)': bindings.cpp:215:51: error: invalid conversion from 'v8::MaybeLocal ()(v8::Local, v8::Local, v8::Local, int)' to 'v8::HostImportModuleDynamicallyCallback' {aka 'v8::MaybeLocal (*)(v8::Local, v8::Local, v8::Local)'} [-fpermissive] 215 isolate->SetHostImportModuleDynamicallyCallback(ResolveDynamicModuleCallback); ^~~~~~~~
v8::MaybeLocal (*)(v8::Local, v8::Local, v8::Local, int)

/scratch/lsftmp/10314240.tmpdir/RtmpmKrf2S/R.INSTALL1b6523ce0b16/V8/.deps/include/v8.h:7346:43: note: initializing argument 1 of 'void v8::Isolate::SetHostImportModuleDynamicallyCallback(v8::HostImportModuleDynamicallyCallback)' 7346 | HostImportModuleDynamicallyCallback callback); | ~~~~~~~~^~~~ make: *** [/home/zhangh10/dey_hz/spatial/conda_envs/ST_env/lib/R/etc/Makeconf:204: bindings.o] Error 1 ERROR: compilation failed for package ‘V8’`

session info: `R version 4.4.1 (2024-06-14) Platform: x86_64-conda-linux-gnu Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /lila/data/deyk/harry/spatial/conda_envs/ST_env/lib/libopenblasp-r0.3.27.so; LAPACK version 3.12.0

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: America/New_York tzcode source: system (glibc)

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.4.1`.

I have tried the option of setting Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1).

Thanks for your help!

jeroen commented 22 hours ago

If you use conda you need to install from https://anaconda.org/conda-forge/r-v8