[R-sig-Debian] Cpp Error installing CRAN version of MatrixExtra on Ubuntu 18.04

David Winsemius dw|n@em|u@ @end|ng |rom comc@@t@net
Mon Dec 20 03:14:21 CET 2021


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 
downloaded from CRAN and this is the session result of an effort with R 
CMD INSTALL:

(The name of my library is a historical accident, but I'm running R 
version 4.1.2 (2021-11-01) -- "Bird Hippie" and almost all of my other 
1536 packages have been updated without reported errors using 
`update.packages(checkBuilt=TRUE)`

======================================

david using davids:/usr/lib/R$ R CMD INSTALL ~/MatrixExtra_0.1.9.tar.gz
* installing to library ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1’
* installing *source* package ‘MatrixExtra’ ...
** package ‘MatrixExtra’ successfully unpacked and MD5 sums checked
** using staged installation
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -DUSE_ROBINMAP 
-DHAS_LD=1 -DSUPPORTS_RESTRICT=1 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/Rcpp/include' 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/float/include' 
-fopenmp -fno-trapping-math -fno-math-errno -fvisibility=hidden -fpic  
-g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -g  -Wno-ignored-attributes -c RcppExports.cpp -o 
RcppExports.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -DUSE_ROBINMAP 
-DHAS_LD=1 -DSUPPORTS_RESTRICT=1 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/Rcpp/include' 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/float/include' 
-fopenmp -fno-trapping-math -fno-math-errno -fvisibility=hidden -fpic  
-g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -g  -Wno-ignored-attributes -c assignment.cpp -o 
assignment.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -DUSE_ROBINMAP 
-DHAS_LD=1 -DSUPPORTS_RESTRICT=1 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/Rcpp/include' 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/float/include' 
-fopenmp -fno-trapping-math -fno-math-errno -fvisibility=hidden -fpic  
-g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -g  -Wno-ignored-attributes -c cbind.cpp -o cbind.o
g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -DUSE_ROBINMAP 
-DHAS_LD=1 -DSUPPORTS_RESTRICT=1 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/Rcpp/include' 
-I'/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/float/include' 
-fopenmp -fno-trapping-math -fno-math-errno -fvisibility=hidden -fpic  
-g -O2 -fdebug-prefix-map=/build/r-base-J7pprH/r-base-4.1.2=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -g  -Wno-ignored-attributes -c matmul.cpp -o matmul.o
matmul.cpp: In function ‘void gemm_csr_drm_as_dcm(int, int, const int*, 
const int*, const double*, const real_t*, size_t, real_t*, int, int)’:
matmul.cpp:137:41: error: ‘ldc’ is predetermined ‘shared’ for ‘shared’
              private(write_ptr, temp_arr)
                                          ^
/usr/lib/R/etc/Makeconf:177: recipe for target 'matmul.o' failed
make: *** [matmul.o] Error 1
ERROR: compilation failed for package ‘MatrixExtra’
* removing ‘/home/david/R/x86_64-pc-linux-gnu-library/3.5.1/MatrixExtra’

=======from an R console session==============================

 > sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods base

loaded via a namespace (and not attached):
[1] compiler_4.1.2

Thanks for any suggestions.

David Winsemius



More information about the R-SIG-Debian mailing list