Dear Wolfram,
To answer your original question: you can use 'installopts' to provide
additional arguments to "R CMD INSTALL" command being used to install an
R package, so when installing an R package as an extension:
exts_list = [
...
('V8', '1.2.3', {
...
'installopts': "--configure-vars='INCLUDE_DIR=/.../include
LIB_DIR=/.../lib'",
...
}),
...
]
regards,
Kenneth
On 12/08/2019 15:31, Wolfram Zieger wrote:
Hello again,
before you all try in time consuming ways to find a perfect solution
please note:
I just found out my question is of *rhetorical* nature:
While I still would like to know whether it’s possible to submit a
custom “R CMD INSTALL” command for a R extension, the example case I
mentioned (the R extension “V8”) is hopeless:
It really wants not only the INCLUDE header files but the v8.so itself
too (which isn’t part of the nodejs environment module build with eb).
Building my own v8.so is nightmare stuff (e.g. with >1GB of sources to
be fetched) and because of that I really want the OS-Library instead.
As the extension installer states that would be deb: libv8-dev or
libnode-dev (Debian / Ubuntu) or rpm: v8-devel (Fedora, EPEL).
So that’s that and with best regards,
Wolfram
*From:* [email protected]
<[email protected]> *On Behalf Of *Wolfram Zieger
*Sent:* Monday, August 12, 2019 2:22 PM
*To:* [email protected]
*Subject:* [easybuild] RPackage: How to submit special R CMD INSTALL
command for R extension
Hello,
Is there the possibility to submit an individual “R CMD INSTALL” command
for a certain R extension?
Background:
---------------------
The R extension “V8” uses hardcoded Paths to the NodeJS “V8” library in
its configure step. However I want it to use the NODEJS environment
module instead.
This is, how the “configure” script of the R extension “V8” looks:
-------------------------------------------------------------------------------------------------------------
#!/usr/bin/env bash
# …
# If your libv8 is installed in a custom location you need to set
# INCLUDE_DIR and LIB_DIR manually via e.g:
# R CMD INSTALL --configure-vars='INCLUDE_DIR=/.../include LIB_DIR=/.../lib'
# …
PKG_CFLAGS="-I/usr/include/v8 -I/usr/include/v8-3.14"
-------------------------------------------------------------------------------------------------------------
So indeed, as the comment in the header states, the most promising step
would be to submit a R CMD INSTALL command – i.e.
R CMD INSTALL --configure-vars='INCLUDE_DIR=/.../include LIB_DIR=/.../lib'
Is there an elegant way to do this for an RPackage (exts_defaultclass =
'RPackage') ?
Else I’d try to patch the “configure” file from the “V8”-R-extension.
Thank you and best regards,
Wolfram
PS: Thanks Kenneth for pointing out my error in regards to the wrong
mail address – which also lead to the discovery of a further grave error
in my first mail – which now nobody can see any more :)
Wolfram Zieger
––––––––––––––
Senior Systems Engineer
IT Services Berlin
Phone: +49 30 2007 697 -12
alt. Phone: +49 211 399 223 -45
Fax: +49 30 2007 697 -11
[email protected] <mailto:[email protected]>
science+computing ag/ATOS
Geschäftsstelle Berlin
Ordensmeisterstraße 15
12099 Berlin, Germany
https://de.atos.net/sc
___ ___
/\ \ /\ \
/::\ \ __ /::\ \
/:/\:\ \ /\ \ /:/\:\ \
_\:\-\:\ \ \:\ \___ /:/ \:\ \
/\ \:\ \:\__\ /\___ __\ /:/__/ \:\__\
\:\ \:\ \/__/ \/__/\ \_/ \:\ \ \/__/
\:\ \:\__\ \:\_\ \:\ \
\:\/:/ / \/_/ \:\ \
\::/ / \:\__\
\/__/ \/__/
--== science + computing ==--
an A T O S company