Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install on RHEL with Static lib V8 pre-downloaded (no live internet connection nor admin rights) ? #168

Closed
jmbo1190 opened this issue Apr 28, 2023 · 2 comments

Comments

@jmbo1190
Copy link

Hello, would it be possible to specify the location of the static libV8 e.g. in an environment variable (previously downloaded from a separate machine and copied to the RHEL system) instead of downloading during the installation process ?

This would help when you have no direct internet access nor sudo rights!

@jeroen
Copy link
Owner

jeroen commented Apr 28, 2023

Yes you can set envvars V8_PKG_LIBS and V8_PKG_CFLAGS

V8/configure

Lines 15 to 19 in dff09bc

if [ "$V8_PKG_LIBS" ]; then
PKG_LIBS="$V8_PKG_LIBS"
PKG_CFLAGS="$V8_PKG_CFLAGS"
DISABLE_STATIC_LIBV8=1
fi

@pat-s
Copy link

pat-s commented Apr 17, 2024

Here's a reprex on Alma9 based on jeroens instructions from #123 (comment)

curl -OL https://github.com/jeroen/V8/releases/download/v3.6.0/v8-9.6.180.12-amd64.tar.gz
mv v8/ /opt/
export V8_PKG_LIBS='-L/opt/v8/lib -lv8_monolith'
export V8_PKG_CFLAGS=-I/opt/v8/include/
install.packages("V8", repos = "https://cloud.r-project.org")

install.packages("V8", repos = "https://cloud.r-project.org")
trying URL 'https://cloud.r-project.org/src/contrib/V8_4.4.2.tar.gz'
Content type 'application/x-gzip' length 672334 bytes (656 KB)
==================================================
downloaded 656 KB

* installing *source* package ‘V8’ ...
** package ‘V8’ successfully unpacked and MD5 sums checked
** using staged installation
Found C++17 compiler: g++
Using CXXCPP=g++ -std=gnu++17 -E
Using PKG_CFLAGS=-I/opt/v8/include/
Using PKG_LIBS=-L/opt/v8/lib -lv8_monolith
Running feature test for pointer compression...
Enabling pointer compression
Running feature test for sandbox...
Sandbox not enabled
** libs
using C++ compiler: ‘g++ (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2)’
using C++17
rm -f V8.so RcppExports.o bindings.o
g++ -std=gnu++17 -I"/opt/R/4.3.3/lib/R/include" -DNDEBUG -I/opt/v8/include/ -DV8_COMPRESS_POINTERS -I'/opt/R/4.3.3/lib/R/library/Rcpp/include' -I/usr/local/include   -fvisibility=hidden -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++17 -I"/opt/R/4.3.3/lib/R/include" -DNDEBUG -I/opt/v8/include/ -DV8_COMPRESS_POINTERS -I'/opt/R/4.3.3/lib/R/library/Rcpp/include' -I/usr/local/include   -fvisibility=hidden -fpic  -g -O2  -c bindings.cpp -o bindings.o
g++ -std=gnu++17 -shared -L/opt/R/4.3.3/lib/R/lib -L/usr/local/lib -o V8.so RcppExports.o bindings.o -L/opt/v8/lib -lv8_monolith -L/opt/R/4.3.3/lib/R/lib -lR
installing to /opt/R/4.3.3/lib/R/library/00LOCK-V8/00new/V8/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package ‘V8’
    finding HTML links ... done
    JS                                      html
    V8                                      html
    finding level-2 HTML links ... done

    wasm                                    html
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (V8)

rm v8-9.6.180.12-amd64.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants