<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 12 juin 2019 à 17:52, Jeroen Ooms <<a href="mailto:jeroen@berkeley.edu">jeroen@berkeley.edu</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jun 12, 2019 at 5:46 PM Jérémy Lal <<a href="mailto:kapouer@melix.org" target="_blank">kapouer@melix.org</a>> wrote:<br>
><br>
><br>
><br>
> Le mer. 12 juin 2019 à 17:37, Jeroen Ooms <<a href="mailto:jeroen@berkeley.edu" target="_blank">jeroen@berkeley.edu</a>> a écrit :<br>
>><br>
>> On Wed, Jun 12, 2019 at 10:58 AM Andreas Tille <<a href="mailto:tille@debian.org" target="_blank">tille@debian.org</a>> wrote:<br>
>> ><br>
>> > Hi Jeroen,<br>
>> ><br>
>> > On Sun, Jun 09, 2019 at 02:39:33PM +0200, Jeroen Ooms wrote:<br>
>> > > Debian 'experimental' now has nodeJS v12.x which ships with a new<br>
>> > > version of the v8 engine. In order to build r-cran-v8 against this<br>
>> > > libnode, you need the latest version of the R package:<br>
>> > > <a href="https://cran.r-project.org/web/packages/V8/index.html" rel="noreferrer" target="_blank">https://cran.r-project.org/web/packages/V8/index.html</a><br>
>> ><br>
>> > Thanks a lot for this hint.<br>
>> ><br>
>> > > Perhaps r-cran-v8 2.2 should be uploaded to experimental?<br>
>> ><br>
>> > Unfortunately I get:<br>
>> ><br>
>> > ...<br>
>> > I: R packages needed for DEP8: testthat<br>
>> > I: R Package: V8 Version: 2.2<br>
>> > I: Building using R version 3.6.0-2<br>
>> > I: R API version: r-api-3.5<br>
>> > I: Using built-time from d/changelog: Wed, 12 Jun 2019 09:49:25 +0200<br>
>> > mkdir -p /build/r-cran-v8-2.2\+dfsg/debian/r-cran-v8/usr/lib/R/site-library<br>
>> > R CMD INSTALL -l /build/r-cran-v8-2.2\+dfsg/debian/r-cran-v8/usr/lib/R/site-library --clean . "--built-timestamp='Wed, 12 Jun 2019 09:49:25 +0200'"<br>
>> > * installing *source* package 'V8' ...<br>
>> > files 'inst/doc/npm.html', 'inst/doc/v8_intro.html' are missing<br>
>> > ** using staged installation<br>
>> > Using PKG_CFLAGS=-I/usr/include/v8 -I/usr/include/v8-3.14<br>
>> > Using PKG_LIBS=-lv8 -lv8_libplatform<br>
>> > ** libs<br>
>> > make[1]: Entering directory '/build/r-cran-v8-2.2+dfsg/src'<br>
>> > rm -f V8.so RcppExports.o bindings.o<br>
>> > g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include/v8 -I/usr/include/v8-3.14 -I"/usr/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-3.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o<br>
>> > g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I/usr/include/v8 -I/usr/include/v8-3.14 -I"/usr/lib/R/site-library/Rcpp/include" -fvisibility=hidden -fpic -g -O2 -fdebug-prefix-map=/build/r-base-3.6.0=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c bindings.cpp -o bindings.o<br>
>> > g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-z,relro -o V8.so RcppExports.o bindings.o -lv8 -lv8_libplatform -L/usr/lib/R/lib -lR<br>
>> > make[1]: Leaving directory '/build/r-cran-v8-2.2+dfsg/src'<br>
>> > make[1]: Entering directory '/build/r-cran-v8-2.2+dfsg/src'<br>
>> > make[1]: Leaving directory '/build/r-cran-v8-2.2+dfsg/src'<br>
>> > installing to /build/r-cran-v8-2.2+dfsg/debian/r-cran-v8/usr/lib/R/site-library/00LOCK-r-cran-v8-2.2+dfsg/00new/V8/libs<br>
>> > ** R<br>
>> > ** inst<br>
>> > ** byte-compile and prepare package for lazy loading<br>
>> > ** help<br>
>> > *** installing help indices<br>
>> > ** building package indices<br>
>> > ** installing vignettes<br>
>> > ** testing if installed package can be loaded from temporary location<br>
>> > Error: package or namespace load failed for 'V8' in dyn.load(file, DLLpath = DLLpath, ...):<br>
>> > unable to load shared object '/build/r-cran-v8-2.2+dfsg/debian/r-cran-v8/usr/lib/R/site-library/00LOCK-r-cran-v8-2.2+dfsg/00new/V8/libs/V8.so':<br>
>> > /usr/lib/x86_64-linux-gnu/libnode.so.72: undefined symbol: _ZN4node13native_module14has_code_cacheE<br>
>> > Error: loading failed<br>
>> > Execution halted<br>
>> > ERROR: loading failed<br>
>> > * removing '/build/r-cran-v8-2.2+dfsg/debian/r-cran-v8/usr/lib/R/site-library/V8'<br>
>> ><br>
>> ><br>
>> > I have no idea what might be wrong here.<br>
>><br>
>><br>
>> This sounds a lot like this upstream issue:<br>
>> <a href="https://github.com/nodejs/node/issues/27431" rel="noreferrer" target="_blank">https://github.com/nodejs/node/issues/27431</a>. I'm the Jérémy (libnode<br>
>> maintainer) to the cc.<br>
><br>
><br>
> If you have this issue that means you're not linking r-cran-v8 to the shared libv8 (a.k.a. libnode),<br>
> and indeed the log above tells it's trying to build its own v8 copy.<br>
<br>
Hmm I don't think that diagnosis is correct. The V8.so from the log<br>
file above is the shared library for the R bindings only. The linking<br>
error that follows actually shows that the symbol is specifically<br>
missing form libnode.so.72, which corresponds to this bug in nodejs<br>
(they forgot to add a new cc file to libnode v12):<br>
<a href="https://github.com/nodejs/node/issues/27431" rel="noreferrer" target="_blank">https://github.com/nodejs/node/issues/27431</a></blockquote><div><br></div><div>Thank you for the explanation (headache here, i should have refrained from replying).</div><div>Am tracking upstream issue, and keen on waiting a bit to see if they resolve it.</div><div><br></div><div>Jérémy</div></div></div>