jtextor / dagitty

Graphical analysis of structural causal models / graphical causal models.
GNU General Public License v2.0
286 stars 46 forks source link

Finding libplatform.h on Gentoo #30

Closed stainesa closed 4 years ago

stainesa commented 4 years ago

Hi, Not sure if this belongs with you or with jeroen. In any event thank you both for very useful software! I suspect the difficulty is not in either package, but you may be able to advise on how to resolve it.

I'm installing dagitty on Gentoo, and there is a working Node.js installation which contains V8. The output is as follows -

`also installing the dependency ‘V8’

trying URL 'https://ftp.heanet.ie/mirrors/cran.r-project.org/src/contrib/V8_2.3.tar.gz' Content type 'application/x-gzip' length 304765 bytes (297 KB)

downloaded 297 KB

trying URL 'https://ftp.heanet.ie/mirrors/cran.r-project.org/src/contrib/dagitty_0.2-2.tar.gz' Content type 'application/x-gzip' length 168082 bytes (164 KB)

downloaded 164 KB

The downloaded source packages are in ‘/tmp/RtmpaOhK2w/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning messages: 1: In install.packages("dagitty") : installation of package ‘V8’ had non-zero exit status 2: In install.packages("dagitty") : installation of package ‘dagitty’ had non-zero exit status `

Now, libplatform.h is installed at /usr/include/node/libplatform/libplatform.h but the R installation can't find it. There are a bunch of other libraries in the same tree. R does not seem to have a specific configuration for Javascript libraries.

Any suggestions on how to tell R (or gcc) where to find these libraries? I guess it's likely to be the PKG_CFLAGS, but I don't know how to set or alter these.

Any help gratefully received. Thanks, Anthony Staines

stainesa commented 4 years ago

Ok, So I tried the following - R CMD INSTALL --configure-vars='INCLUDE_DIR=/usr/include/node/ LIB_DIR=/usr/local/lib64/libv8_libplatform.so' V8_2.3.tar.gz

The version of V8 is the package that R downloads. libplatform.so is in /usr/local/lib64 and libplatform/libplatform.h is in /usr/inlcude/node/.

`* installing to library ‘/usr/lib64/R/library’

libplatform.h is part of net-libs/nodejs-12.13.0

What version of nodejs is dagitty looking for? Regards, Anthony Staines

jtextor commented 4 years ago

Hi Anthony, sorry for not replying earlier. I am not really a gentoo user, but I have seen this issue before on ArchLinux. Unfortunately I can't do much about this as it is the V8 package (which dagitty depends on) that doesn't compile on these platforms. Perhaps you'll have better luck by opening an issue on the V8 GitHub, @jeroen might know how to get this working.