Mock Version: 5.0 Mock Version: 5.0 Mock Version: 5.0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec'], chrootPath='/var/lib/mock/f39-build-1736940-41276/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1700438400 Wrote: /builddir/build/SRPMS/R-V8-4.3.0-1.fc39.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec'], chrootPath='/var/lib/mock/f39-build-1736940-41276/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=864000uid=996gid=135user='mockbuild'nspawn_args=[]unshare_net=TrueprintOutput=False) Executing command: ['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'} and shell False Building target platforms: riscv64 Building for target riscv64 setting SOURCE_DATE_EPOCH=1700438400 Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.CzlcPr + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf V8 + /usr/bin/mkdir -p V8 + cd V8 + /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/V8_4.3.0.tar.gz + STATUS=0 + '[' 0 -ne 0 ']' + rm -rf /builddir/build/BUILD/V8-SPECPARTS + /usr/bin/mkdir -p /builddir/build/BUILD/V8-SPECPARTS + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + cd V8 + /usr/lib/rpm/rpmuncompress /builddir/build/SOURCES/0001-Use-local-path-for-example-sources.patch + /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Wh8LNf + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd V8 + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.YzMlgw + umask 022 + cd /builddir/build/BUILD + '[' /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64 '!=' / ']' + rm -rf /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64 ++ dirname /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64 + mkdir -p /builddir/build/BUILDROOT + mkdir /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64 + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd V8 + mkdir -p /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64/usr/lib64/R/library + /usr/bin/R CMD INSTALL -l /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64/usr/lib64/R/library V8 * installing *source* package ‘V8’ ... files ‘R/V8.R’, ‘man/V8.Rd’ have the wrong MD5 checksums ** using staged installation Found C++17 compiler: g++ Using CXXCPP=g++ -std=gnu++17 -E Using PKG_CFLAGS=-I/usr/include/v8 -I/usr/include/v8-3.14 Using PKG_LIBS=-lv8 -lv8_libplatform Running feature test for pointer compression... Pointer compression not needed ** libs using C++ compiler: ‘g++ (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)’ using C++17 rm -f V8.so RcppExports.o bindings.o g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG -I/usr/include/v8 -I/usr/include/v8-3.14 -DV8_ENABLE_CHECKS -DISNODEJS=11.3.244.8-node.9 -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include -fvisibility=hidden -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -c RcppExports.cpp -o RcppExports.o g++ -std=gnu++17 -I"/usr/include/R" -DNDEBUG -I/usr/include/v8 -I/usr/include/v8-3.14 -DV8_ENABLE_CHECKS -DISNODEJS=11.3.244.8-node.9 -I'/usr/lib64/R/library/Rcpp/include' -I/usr/local/include -fvisibility=hidden -fpic -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -c bindings.cpp -o bindings.o g++ -std=gnu++17 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -o V8.so RcppExports.o bindings.o -lv8 -lv8_libplatform -L/usr/lib64/R/lib -lR installing to /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64/usr/lib64/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) + test -d V8/src + cd V8/src + rm -f RcppExports.o bindings.o V8.so + rm -f /builddir/build/BUILDROOT/R-V8-4.3.0-1.fc39.riscv64/usr/lib64/R/library/R.css + /usr/bin/find-debuginfo -j8 --strict-build-id -m -i --build-id-seed 4.3.0-1.fc39 --unique-debug-suffix -4.3.0-1.fc39.riscv64 --unique-debug-src-base R-V8-4.3.0-1.fc39.riscv64 --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 50000000 -S debugsourcefiles.list /builddir/build/BUILD/V8 find-debuginfo: starting Extracting debug info from 1 files DWARF-compressing 1 files sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match. Creating .debug symlinks for symlinks to ELF files Copying sources found by 'debugedit -l' to /usr/src/debug/R-V8-4.3.0-1.fc39.riscv64 40 blocks find-debuginfo: done + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-ldconfig + /usr/lib/rpm/brp-compress + /usr/lib/rpm/redhat/brp-strip-lto /usr/bin/strip + /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/check-rpaths + /usr/lib/rpm/redhat/brp-mangle-shebangs + /usr/lib/rpm/brp-remove-la-files + env /usr/lib/rpm/redhat/brp-python-bytecompile '' 1 0 -j8 + /usr/lib/rpm/redhat/brp-python-hardlink Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.IJd2wH + umask 022 + cd /builddir/build/BUILD + CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CFLAGS + CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer ' + export CXXFLAGS + FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FFLAGS + FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -I/usr/lib64/gfortran/modules ' + export FCFLAGS + VALAFLAGS=-g + export VALAFLAGS + RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn' + export RUSTFLAGS + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes ' + export LDFLAGS + LT_SYS_LIBRARY_PATH=/usr/lib64: + export LT_SYS_LIBRARY_PATH + CC=gcc + export CC + CXX=g++ + export CXX + cd V8 + export LANG=C.UTF-8 + LANG=C.UTF-8 + /usr/bin/R CMD check V8 --ignore-vignettes * using log directory ‘/builddir/build/BUILD/V8/V8.Rcheck’ * using R version 4.3.2 (2023-10-31) * using platform: riscv64-koji-linux-gnu (64-bit) * R was compiled by gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) GNU Fortran (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) * running under: Fedora Linux 39 (Thirty Nine) * using session charset: UTF-8 * using option ‘--ignore-vignettes’ * checking for file ‘V8/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘V8’ version ‘4.3.0’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ...Warning: unable to access index for repository https://CRAN.R-project.org/src/contrib: cannot open URL 'https://CRAN.R-project.org/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.18/bioc/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.18/bioc/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.18/data/annotation/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.18/data/annotation/src/contrib/PACKAGES' Warning: unable to access index for repository https://bioconductor.org/packages/3.18/data/experiment/src/contrib: cannot open URL 'https://bioconductor.org/packages/3.18/data/experiment/src/contrib/PACKAGES' OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘V8’ can be installed ... OK * used C++ compiler: ‘g++ (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)’ * checking C++ specification ... OK Not all R platforms support C++17 * checking installed package size ... OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking startup messages can be suppressed ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking line endings in shell scripts ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... NOTE Package has both ‘src/Makevars.in’ and ‘src/Makevars’. Installation with --no-configure' is unlikely to work. If you intended ‘src/Makevars’ to be used on Windows, rename it to ‘src/Makevars.win’ otherwise remove it. If ‘configure’ created ‘src/Makevars’, you need a ‘cleanup’ script. * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking compiled code ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... SKIPPED * checking examples ... ERROR Running examples in ‘V8-Ex.R’ failed The error most likely occurred in: > ### Name: V8 > ### Title: Run JavaScript in a V8 context > ### Aliases: V8 v8 new_context engine_info > > ### ** Examples > > # Create a new context > ctx <- v8(); > > # Evaluate some code > ctx$eval("var foo = 123") > ctx$eval("var bar = 456") > ctx$eval("foo+bar") [1] "579" > > # Functions and closures > ctx$eval("JSON.stringify({x:Math.random()})") [1] "{\"x\":0.6372307363850742}" > ctx$eval("(function(x){return x+1;})(123)") [1] "124" > > # Objects (via JSON only) > ctx$assign("mydata", mtcars) > ctx$get("mydata") mpg cyl disp hp drat wt qsec vs am gear carb Mazda RX4 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 Mazda RX4 Wag 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 Datsun 710 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 Hornet 4 Drive 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 Hornet Sportabout 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 Valiant 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 Duster 360 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4 Merc 240D 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2 Merc 230 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2 Merc 280 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4 Merc 280C 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4 Merc 450SE 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3 Merc 450SL 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3 Merc 450SLC 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3 Cadillac Fleetwood 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4 Lincoln Continental 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4 Chrysler Imperial 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4 Fiat 128 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1 Honda Civic 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2 Toyota Corolla 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1 Toyota Corona 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 Dodge Challenger 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2 AMC Javelin 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2 Camaro Z28 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4 Pontiac Firebird 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2 Fiat X1-9 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 Porsche 914-2 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2 Lotus Europa 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2 Ford Pantera L 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4 Ferrari Dino 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6 Maserati Bora 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8 Volvo 142E 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2 > outlist <- ctx$get("mydata", simplifyVector = FALSE) > outlist[1] [[1]] [[1]]$mpg [1] 21 [[1]]$cyl [1] 6 [[1]]$disp [1] 160 [[1]]$hp [1] 110 [[1]]$drat [1] 3.9 [[1]]$wt [1] 2.62 [[1]]$qsec [1] 16.46 [[1]]$vs [1] 0 [[1]]$am [1] 1 [[1]]$gear [1] 4 [[1]]$carb [1] 4 [[1]]$`_row` [1] "Mazda RX4" > > # Assign JavaScript > ctx$assign("foo", JS("function(x){return x*x}")) > ctx$assign("bar", JS("foo(9)")) > ctx$get("bar") [1] 81 > > # Validate script without evaluating > ctx$validate("function foo(x){2*x}") #TRUE [1] TRUE > ctx$validate("foo = function(x){2*x}") #TRUE [1] TRUE > ctx$validate("function(x){2*x}") #FALSE [1] FALSE > > # Use a JavaScript library > ctx$source("/usr/share/javascript/underscore/underscore-min.js") > ctx$call("_.filter", mtcars, JS("function(x){return x.mpg < 15}")) mpg cyl disp hp drat wt qsec vs am gear carb Duster 360 14.3 8 360 245 3.21 3.570 15.84 0 0 3 4 Cadillac Fleetwood 10.4 8 472 205 2.93 5.250 17.98 0 0 3 4 Lincoln Continental 10.4 8 460 215 3.00 5.424 17.82 0 0 3 4 Chrysler Imperial 14.7 8 440 230 3.23 5.345 17.42 0 0 3 4 Camaro Z28 13.3 8 350 245 3.73 3.840 15.41 0 0 3 4 > > # Example from underscore manual > ctx$eval("_.templateSettings = {interpolate: /\\{\\{(.+?)\\}\\}/g}") [1] "[object Object]" > ctx$eval("var template = _.template('Hello {{ name }}!')") *** caught segfault *** address 0xaaaadcb0d818, cause 'memory not mapped' Traceback: 1: context_eval(join(src), private$context, serialize, await) 2: get_str_output(context_eval(join(src), private$context, serialize, await)) 3: evaluate_js(src, serialize = serialize, await = await) 4: ctx$eval("var template = _.template('Hello {{ name }}!')") An irrecoverable exception occurred. R is aborting now ... * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘engine.R’ Comparing ‘engine.Rout’ to ‘engine.Rout.save’ ...4d3 < Using V8 engine 11.3.244.8-node.9 Running ‘testthat.R’ OK * checking PDF version of manual ... WARNING LaTeX errors when creating PDF version. This typically indicates Rd problems. LaTeX errors found: ! LaTeX Error: File `inconsolata.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty) ! Emergency stop. l.303 ^^M ! ==> Fatal error occurred, no output PDF file produced! * checking PDF version of manual without index ... OK * DONE Status: 1 ERROR, 1 WARNING, 1 NOTE See ‘/builddir/build/BUILD/V8/V8.Rcheck/00check.log’ for details. error: Bad exit status from /var/tmp/rpm-tmp.IJd2wH (%check) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.IJd2wH (%check) Child return code was: 1 EXCEPTION: [Error('Command failed: \n # bash --login -c /usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec\n', 1)] Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) ^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/site-packages/mockbuild/util.py", line 597, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --noclean --target riscv64 --nodeps /builddir/build/SPECS/R-V8.spec