Package Details: r-v8 4.4.2-3

Git Clone URL: https://aur.archlinux.org/r-v8.git (read-only, click to copy)
Package Base: r-v8
Description: Embedded JavaScript and WebAssembly Engine for R
Upstream URL: https://cran.r-project.org/package=V8
Licenses: MIT
Submitter: dviktor
Maintainer: BioArchLinuxBot (malacology)
Last Packager: BioArchLinuxBot
Votes: 0
Popularity: 0.000000
First Submitted: 2020-07-09 12:52 (UTC)
Last Updated: 2024-04-03 12:58 (UTC)

Latest Comments

1 2 Next › Last »

pekkarr commented on 2024-03-31 09:46 (UTC)

@petronny The goal is that users could have both the official nodejs (for any applications that need the node binary) and libnode installed at the same time, so the packages shouldn't conflict each other.

The headers are likely the same regardless of --shared, but having the headers in libnode makes sure that the headers and the shared library are always from the same node version. Otherwise, if the official repo nodejs is updated before libnode, there would be a mismatch (as nodejs also installs the headers).

I think we should abandon the nodejs-shared package and rename it to libnode, which should install only the shared library and the header files (in a different location).

petronny commented on 2024-03-31 09:09 (UTC) (edited on 2024-03-31 09:40 (UTC) by petronny)

@pekkarr I can confirm that r-v8 now could be built with nodejs-shared.

I'll try to also build libnode in the PKGBUILD of nodejs-shared.

libnode should also install the header files under a different directory in /usr/include than nodejs to avoid them having file conflicts.

Will the headers be different with --shared enabled?

$ LANG=C diff --brief --recursive nodejs nodejs-shared
Files nodejs/usr/bin/node and nodejs-shared/usr/bin/node differ
Files nodejs/usr/include/node/config.gypi and nodejs-shared/usr/include/node/config.gypi differ
Only in nodejs-shared/usr/lib: libnode.so
Only in nodejs-shared/usr/lib: libnode.so.120

So is it necessary to install /usr/bin/node and usr/include/node/config.gypi in libnode?

pekkarr commented on 2024-03-30 20:46 (UTC)

@petronny Yeah, the v8-r package and the upstream repo are a mess. Getting the v8 sources requires custom tools, which are just fetched from depot_tools git head without any verification. This also makes it impossible to embed the v8 source checksums in the PKGBUILD.

I see you created the nodejs-shared package, but I think the second suggestion about creating a libnode package would be better. This allows users to keep using the official nodejs package, while only the shared library would come from the AUR package. libnode should also install the header files under a different directory in /usr/include than nodejs to avoid them having file conflicts.

petronny commented on 2024-03-30 17:43 (UTC)

It looks like that v8-r is quite hard to build. I'm thinking about some alternative solutions like:

  1. Creating a package called nodejs-shared that re-enable --shared option so it will provide libnode.so.
  2. Creating a package called libnode that only install libnode.so from the above package.

Any suggestions?

pekkarr commented on 2024-01-31 14:21 (UTC)

@peippo You are correct, the nodejs package stopped providing the shared library, see the nodejs feature request. I'm in the process of migrating this package to use v8-r instead of nodejs.

peippo commented on 2024-01-31 14:12 (UTC)

This package does not build anymore. It seems that nodejs does not provide libnode.so anymore?

/usr/bin/ld: cannot find -lnode: No such file or directory

peippo commented on 2023-05-09 06:41 (UTC)

+1 on @pekkarr's comment. This comes into play as soon as you use the (now fairly common) aurutils, and probably affects other aur helpers, also.

pekkarr commented on 2023-04-09 17:59 (UTC)

Could you change the prepare function to not overwrite the source archive? It's problematic to modify it, because it prevents rebuilds as the sha256sums won't match the archive after running prepare once.

R CMD INSTALL can install directly from the extracted and patched directory, so there's no need to compress it again. The following patch demonstrates this:

diff --git a/PKGBUILD b/PKGBUILD
index ec8d581..fb67370 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,16 +31,16 @@ prepare() {
   # build with system nodejs
   sed -i '11,12d' ${_pkgname}/configure
   sed -i '11i PKG_LIBS="-lnode"\nPKG_CFLAGS="-I/usr/include/node"' ${_pkgname}/configure
-  tar cvfz ${_pkgname}_${pkgver}.tar.gz ${_pkgname}
 }

 build() {
-  R CMD INSTALL ${_pkgname}_${pkgver}.tar.gz -l "${srcdir}"
+  mkdir -p build
+  R CMD INSTALL ${_pkgname} -l build
 }

 package() {
   install -dm0755 "${pkgdir}/usr/lib/R/library"
-  cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
+  cp -a --no-preserve=ownership "build/${_pkgname}" "${pkgdir}/usr/lib/R/library"
   install -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
 }
 # vim:set ts=2 sw=2 et:

dviktor commented on 2022-01-10 20:40 (UTC)

Further maintenance and support for this package has been moved there. You can install pre-built packages from my repo

japhir commented on 2020-10-26 15:29 (UTC)

The dependency v8>=6 doesn't seem to recognize that my v8-r package version 8.8.166-1 is higher than 6. Changing the dependency to v8 and makepkg -si works to install this.