[Solved]... was Cpp Error installing CRAN version of MatrixExtra on Ubuntu 18.04
MatrixExtra 1.9.0 introduced this problem and required something newer than gcc 8.3.1, e.g. gcc 9.3.1 (https://github.com/david-cortes/MatrixExtra/issues/2). It's been fixed in MatrixExtra 0.1.9-1, which is on CRAN since a yesterday or so. I've confirmed that this new version installs out of the box on Ubuntu 18.04 LTS with its default gcc 7.5.0. /Henrik
On Mon, Dec 20, 2021 at 11:25 AM David Winsemius <dwinsemius at comcast.net> wrote:
On 12/20/21 8:49 AM, Dirk Eddelbuettel wrote:
On 20 December 2021 at 15:48, Sebastian Meyer wrote: | Am 20.12.21 um 15:19 schrieb Dirk Eddelbuettel: | > | > On 19 December 2021 at 18:14, David Winsemius wrote: | > | I initially attempted installation of pkg:MatrixExtra with | > | `install.packages on my Ubuntu 18.04 LTS system from within RStudio. It | > | failed with an error attempting to compile a function named "matmul.cpp" | > | so I tried running R from a Terminal session. Same error. Finally I | > | > Well yes. Same system, same compiler and same R. Can you remind me what | > | > gcc --version | > | > says on Ubuntu 18.04. | | gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 That should be good enough.
I also get gcc version: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
| FWIW, "MatrixExtra" installs without problems for me on "ancient" I am fairly certain that the (accidental ?) mishap of mixing current R, i.e. his 4.1.2, with a 3.5.1 library is the issue.
It was just an R user library. I don't have a 3.5.1 library. I'll change it to something that doesn't bother you. Before: from Sys.getenv() R_HOME /usr/lib/R R_INCLUDE_DIR /usr/share/R/include R_LIBS_SITE /usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library R_LIBS_USER /home/david/R/x86_64-pc-linux-gnu-library/3.5.1/ After changing R_LIBS_USER value: R_HOME /usr/lib/R R_INCLUDE_DIR /usr/share/R/include R_LIBS_SITE /usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library R_LIBS_USER /home/david/R/Local_user_lib
> .libPaths( c( "/home/david/R/Local_user_lib", .libPaths()[2:4]) )
> install.packages("MatrixExtra")
Installing package into ?/home/david/R/Local_user_lib? (as ?lib? is unspecified) also installing the dependencies ?Matrix?, ?RhpcBLASctl?, ?float? trying URL 'https://cloud.r-project.org/src/contrib/Matrix_1.4-0.tar.gz' Content type 'application/x-gzip' length 2849865 bytes (2.7 MB) ================================================== downloaded 2.7 MB trying URL 'https://cloud.r-project.org/src/contrib/RhpcBLASctl_0.21-247.1.tar.gz' Content type 'application/x-gzip' length 41291 bytes (40 KB) ================================================== downloaded 40 KB trying URL 'https://cloud.r-project.org/src/contrib/float_0.2-6.tar.gz' Content type 'application/x-gzip' length 1373196 bytes (1.3 MB) ================================================== downloaded 1.3 MB trying URL 'https://cloud.r-project.org/src/contrib/MatrixExtra_0.1.9-1.tar.gz' Content type 'application/x-gzip' length 218705 bytes (213 KB) ================================================== downloaded 213 KB * installing *source* package ?Matrix? ... ** package ?Matrix? successfully unpacked and MD5 sums checked ** using staged installation ** libs ---------------snipped intermediate---------- installing to /home/david/R/Local_user_lib/00LOCK-Matrix/00new/Matrix/libs ** R ** data ** inst ** byte-compile and prepare package for lazy loading Error: package ?lattice? was installed before R 4.0.0: please re-install it Execution halted ERROR: lazy loading failed for package ?Matrix? * removing ?/home/david/R/Local_user_lib/Matrix? -------------snipped---- installing to /home/david/R/Local_user_lib/00LOCK-MatrixExtra/00new/MatrixExtra/libs ** R ** inst ** byte-compile and prepare package for lazy loading Error: package ?Matrix? 1.2.18 was found, but >= 1.3 is required by ?MatrixExtra? Execution halted ------------end copy------------ Ran `update.packages()` again and found quite a few not-yet-updated packages, many of them fairly essential, but NOT in the directory you were worried about, but rather such as in '/usr/lib/R/site-library' and '/usr/lib/R/library' -----fragment of listing of outdated packages---------- lattice : Version 0.20-41 installed in /usr/lib/R/library built under R 3.6.3 Version 0.20-45 available at https://cloud.r-project.org --------- So now I have a bunch of properly updated packages and MatrixExtra installs without complaint. ** testing if installed package can be loaded from final location ** testing if installed package keeps a record of temporary installation path * DONE (MatrixExtra) -- Thanks for the impetus to change that annoying, but eventually misleading, local user library name. I'd been meaning to do that for a while, and thanks for the advice to recheck version numbers. I'm not quite sure how I got away with this for so long. -- David.
It has been so long since I converted from pre-4.0.* that I forgot what the error message looks like but the arcanae one in David's post may qualify. | > R version 4.1.2 (2021-11-01) | > Platform: x86_64-pc-linux-gnu (64-bit) | > Running under: Ubuntu 18.04.6 LTS | > | > Matrix products: default | > BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 | > LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 | | I see openblas in your sessionInfo(). Could that be a problem? I do not think. Stable interface, unchanged for decades, hot-swappable. Dirk
_______________________________________________ R-SIG-Debian mailing list R-SIG-Debian at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-debian