david-cortes / MatrixExtra

(R) Efficient methods and operators for the sparse matrix classes in 'Matrix' (esp. CSR format or "RsparseMatrix")
https://cran.r-project.org/package=MatrixExtra
GNU General Public License v3.0
19 stars 3 forks source link

Problem installing {MatrixExtra} for R 4.2.0 in macOS 12.4 (Intel) #5

Closed sicabi closed 2 years ago

sicabi commented 2 years ago

Hi, after trying for a while to solve this problem I ran out of options. I keep getting this error message. Can you help me?

install.packages("MatrixExtra")
Installing package into ‘/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/MatrixExtra_0.1.10.tar.gz'
Content type 'application/x-gzip' length 210398 bytes (205 KB)
==================================================
downloaded 205 KB

* 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
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c assignment.cpp -o assignment.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c cbind.cpp -o cbind.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c matmul.cpp -o matmul.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c misc.cpp -o misc.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c operators.cpp -o operators.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c rbind.cpp -o rbind.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c slice.cpp -o slice.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/Rcpp/include' -I'/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c slice_coo.cpp -o slice_coo.o
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `if test  "zRcppExports.o assignment.o cbind.o matmul.o misc.o operators.o rbind.o slice.o slice_coo.o" != "z"; then   echo clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/usr/local/Cellar/r/4.2.0/lib/R/lib" -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o MatrixExtra.so RcppExports.o assignment.o cbind.o matmul.o misc.o operators.o rbind.o slice.o slice_coo.o  -L/usr/local/opt/openblas/lib -lopenblas -L/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin21/11 -L/usr/local/opt/gcc/lib/gcc/11/gcc -L/usr/local/opt/gcc/lib/gcc/11 -lgfortran -lquadmath -lm /usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/libs/libfloat.a -llapack -lblas  -L"/usr/local/Cellar/r/4.2.0/lib/R/lib" -lR -lintl -Wl,-framework -Wl,CoreFoundation;   clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L"/usr/local/Cellar/r/4.2.0/lib/R/lib" -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o MatrixExtra.so RcppExports.o assignment.o cbind.o matmul.o misc.o operators.o rbind.o slice.o slice_coo.o  -L/usr/local/opt/openblas/lib -lopenblas -L/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin21/11 -L/usr/local/opt/gcc/lib/gcc/11/gcc -L/usr/local/opt/gcc/lib/gcc/11 -lgfortran -lquadmath -lm /usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/float/libs/libfloat.a -llapack -lblas  -L"/usr/local/Cellar/r/4.2.0/lib/R/lib" -lR -lintl -Wl,-framework -Wl,CoreFoundation; fi'
make: *** [MatrixExtra.so] Error 2
ERROR: compilation failed for package ‘MatrixExtra’
* removing ‘/usr/local/lib/R/¡Welcome to R version 4.2.0 (2022-04-22)/site-library/MatrixExtra’
Warning in install.packages :
  installation of package ‘MatrixExtra’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/pf/6730cw150k318n5bbz3qz8dw0000gn/T/Rtmp3DdIfO/downloaded_packages’

My sessionInfo() also is:

R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin21.3.0 (64-bit)
Running under: macOS Monterey 12.4

Matrix products: default
LAPACK: /usr/local/Cellar/r/4.2.0/lib/R/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] rstudioapi_0.13   magrittr_2.0.3    usethis_2.1.6     devtools_2.4.3   
 [5] pkgload_1.2.4     R6_2.5.1          rlang_1.0.2       fastmap_1.1.0    
 [9] tools_4.2.0       pkgbuild_1.3.1    sessioninfo_1.2.2 cli_3.3.0        
[13] withr_2.5.0       ellipsis_0.3.2    remotes_2.4.2     rprojroot_2.0.3  
[17] lifecycle_1.0.1   crayon_1.5.1      brio_1.1.3        processx_3.6.1   
[21] purrr_0.3.4       callr_3.7.0       fs_1.5.2          ps_1.7.1         
[25] curl_4.3.2        testthat_3.1.4    memoise_2.0.1     glue_1.6.2       
[29] cachem_1.0.6      compiler_4.2.0    desc_1.4.1        prettyunits_1.1.1

The content of my .zshrc file is:

export PROMPT='%2/> '
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export GREP_OPTIONS=”–color=always”
export LANG=es_ES.UTF-8
export LC_ALL=es_ES.UTF-8
export LC_CTYPE=es_ES.UTF-8
export PATH="/usr/local/opt/openssl@3/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
export PKG_CPPFLAGS="-Xclang -fopenmp"
export PKG_LIBS=-lomp
export PATH="/usr/local/opt/openjdk/bin:$PATH"
export CPPFLAGS="-I/usr/local/opt/openjdk/include"
export PATH="/Library/Frameworks/Python.framework/Versions/3.8/bin:${PATH}"
alias python="/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8"
export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"
export PKG_CONFIG_PATH="/usr/local/opt/lapack/lib/pkgconfig"
export LDFLAGS="-L/usr/local/opt/lapack/lib"
export CPPFLAGS="-I/usr/local/opt/lapack/include"

I used homebrew to install both R and gcc compilers.

Thanks.

david-cortes commented 2 years ago

Thanks for the bug report.

This looks more like an R bug and I guess you could work around it by reinstalling R into a folder without spaces in the name. The script that's failing is not part of this package and I guess it might be coming from the R build system.

By the way, if I look at CRAN I see there's a binary version of this package built for macOS-x86 - any particular reason why you are trying to compile it from source?

david-cortes commented 2 years ago

Actually, on second thought, the issue is from the package "float". In particular, it's failing to add quotation marks in the link arguments. Will try to fix it here though.

david-cortes commented 2 years ago

@sicabi I've pushed an update which I think should fix the problem - could you give it a try?

remotes::install_github("david-cortes/MatrixExtra")
sicabi commented 2 years ago

Hi, thanks a lot for the prompt response. I reinstalled my R version to remove the long name from the directory and then I installed the package with {remotes} and it just worked! Thank you.

> remotes::install_github("david-cortes/MatrixExtra")
Downloading GitHub repo david-cortes/MatrixExtra@HEAD
'/usr/bin/git' clone --depth 1 --no-hardlinks --recurse-submodules https://github.com/Tessil/robin-map.git /var/folders/pf/6730cw150k318n5bbz3qz8dw0000gn/T//RtmpQ45UKy/remotesac703eb6d7de/david-cortes-MatrixExtra-a10b89f/src/robinmap
Cloning into '/var/folders/pf/6730cw150k318n5bbz3qz8dw0000gn/T//RtmpQ45UKy/remotesac703eb6d7de/david-cortes-MatrixExtra-a10b89f/src/robinmap'...
Installing 3 packages: float, Rcpp, RhpcBLASctl
Installing packages into ‘/usr/local/lib/R/4.2/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/float_0.3-0.tar.gz'
Content type 'application/x-gzip' length 1425826 bytes (1.4 MB)
==================================================
downloaded 1.4 MB

trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_1.0.8.3.tar.gz'
Content type 'application/x-gzip' length 3086192 bytes (2.9 MB)
==================================================
downloaded 2.9 MB

trying URL 'https://cran.rstudio.com/src/contrib/RhpcBLASctl_0.21-247.1.tar.gz'
Content type 'application/x-gzip' length 41291 bytes (40 KB)
==================================================
downloaded 40 KB

* installing *source* package ‘float’ ...
** package ‘float’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
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 we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for sinf in -lm... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking size of int... 4
checking for gcc option to support OpenMP... unsupported
checking for echo... yes
checking for grep... yes
checking for sgetrf_ in -lRlapack... no
checking for sgemm_ in -lopenblas... no
checking for sgemm_ in -lmkl... no
checking for sgemm_ in -latlas... no
checking for sgemm_ in -lblas... yes
checking for sgetrf_ in -lopenblas... no
checking for sgetrf_ in -lmkl... no
checking for sgetrf_ in -latlas... no
checking for sgetrf_ in -llapack... yes

******************* Results of float package configure *******************
* OpenMP Report:
    >> OPENMP_CFLAGS=
    >> OMPFLAGS_C=
    >> OMPFLAGS_F=
* byte order: little endian
* using system BLAS library
    >> BLAS_LIBFLAGS=-lblas
* using system LAPACK library
    >> LAPACK_LIBFLAGS=-llapack
*************************************************************************

configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/endianness.h
config.status: creating R/02-libflags.r
config.status: creating src/config.h
config.status: src/config.h is unchanged
** libs
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c backsolve.c -o backsolve.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c binary.c -o binary.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c chol.c -o chol.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c chol2inv.c -o chol2inv.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c colSums.c -o colSums.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c cond.c -o cond.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c converters.c -o converters.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c crossprod.c -o crossprod.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c eigen.c -o eigen.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c extremes.c -o extremes.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c float_native.c -o float_native.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c isSymmetric.c -o isSymmetric.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c machine.c -o machine.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c math.c -o math.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c matmult.c -o matmult.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c NA.c -o NA.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c norm.c -o norm.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c qr.c -o qr.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c rand.c -o rand.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c scale.c -o scale.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c sign.c -o sign.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c solve.c -o solve.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c sum.c -o sum.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c svd.c -o svd.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c sweep.c -o sweep.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c xpose.c -o xpose.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c utils/matmult.c -o utils/matmult.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c utils/symmetrize.c -o utils/symmetrize.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include  -I../inst/include/ -fPIC  -Wno-implicit-function-declaration  -c utils/xpose.c -o utils/xpose.o
/usr/local/opt/gcc/bin/gfortran -fno-optimize-sibling-calls -g -O2 -msse2 -mfpmath=sse -fPIC  -g -O2  -c slapack_wrap.f -o slapack_wrap.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/4.2.0/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o float.so backsolve.o binary.o chol.o chol2inv.o colSums.o cond.o converters.o crossprod.o eigen.o extremes.o float_native.o isSymmetric.o machine.o math.o matmult.o NA.o norm.o qr.o rand.o scale.o sign.o solve.o sum.o svd.o sweep.o xpose.o utils/matmult.o utils/symmetrize.o utils/xpose.o slapack_wrap.o -llapack -lblas -L/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin21/11 -L/usr/local/opt/gcc/lib/gcc/11/gcc -L/usr/local/opt/gcc/lib/gcc/11 -lgfortran -lquadmath -lm -L/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin21/11 -L/usr/local/opt/gcc/lib/gcc/11/gcc -L/usr/local/opt/gcc/lib/gcc/11 -lgfortran -lquadmath -lm -L/usr/local/Cellar/r/4.2.0/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ld: warning: object file (slapack_wrap.o) was built for newer macOS version (12.4) than being linked (12.0)
ld: warning: dylib (/usr/local/opt/gcc/lib/gcc/11/libgfortran.dylib) was built for newer macOS version (12.4) than being linked (12.0)
ld: warning: dylib (/usr/local/opt/gcc/lib/gcc/11/libquadmath.dylib) was built for newer macOS version (12.4) than being linked (12.0)
ar crs libfloat.a backsolve.o binary.o chol.o chol2inv.o colSums.o cond.o converters.o crossprod.o eigen.o extremes.o float_native.o isSymmetric.o machine.o math.o matmult.o NA.o norm.o qr.o rand.o scale.o sign.o solve.o sum.o svd.o sweep.o xpose.o utils/matmult.o utils/symmetrize.o utils/xpose.o slapack_wrap.o
ranlib libfloat.a
installing via 'install.libs.R' to /usr/local/lib/R/4.2/site-library/00LOCK-float/00new/float
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Creating a generic function for ‘backsolve’ from package ‘base’ in package ‘float’
Creating a generic function for ‘forwardsolve’ from package ‘base’ in package ‘float’
Creating a generic function for ‘chol2inv’ from ‘base’ in package ‘float’
    (from the saved implicit definition)
Creating a generic function for ‘chol2inv’ from package ‘base’ in package ‘float’
Creating a generic function for ‘colSums’ from package ‘base’ in package ‘float’
Creating a generic function for ‘rowSums’ from package ‘base’ in package ‘float’
Creating a generic function for ‘colMeans’ from package ‘base’ in package ‘float’
Creating a generic function for ‘rowMeans’ from package ‘base’ in package ‘float’
Creating a generic function for ‘rcond’ from ‘base’ in package ‘float’
    (from the saved implicit definition)
Creating a generic function for ‘rcond’ from package ‘base’ in package ‘float’
Creating a generic function for ‘typeof’ from package ‘base’ in package ‘float’
Creating a generic function for ‘storage.mode’ from package ‘base’ in package ‘float’
Creating a generic function for ‘crossprod’ from package ‘base’ in package ‘float’
Creating a generic function for ‘tcrossprod’ from package ‘base’ in package ‘float’
Creating a generic function for ‘diag’ from package ‘base’ in package ‘float’
Creating a generic function for ‘nrow’ from package ‘base’ in package ‘float’
Creating a generic function for ‘ncol’ from package ‘base’ in package ‘float’
Creating a generic function for ‘NROW’ from package ‘base’ in package ‘float’
Creating a generic function for ‘NCOL’ from package ‘base’ in package ‘float’
Creating a generic function for ‘eigen’ from package ‘base’ in package ‘float’
Creating a generic function for ‘which.min’ from package ‘base’ in package ‘float’
Creating a generic function for ‘which.max’ from package ‘base’ in package ‘float’
Creating a generic function for ‘rownames’ from package ‘base’ in package ‘float’
Creating a generic function for ‘rownames<-’ from package ‘base’ in package ‘float’
Creating a generic function for ‘colnames’ from package ‘base’ in package ‘float’
Creating a generic function for ‘colnames<-’ from package ‘base’ in package ‘float’
Creating a generic function for ‘norm’ from package ‘base’ in package ‘float’
Creating a generic function for ‘qr.Q’ from package ‘base’ in package ‘float’
Creating a generic function for ‘qr.R’ from package ‘base’ in package ‘float’
Creating a generic function for ‘qr.qy’ from package ‘base’ in package ‘float’
Creating a generic function for ‘qr.qty’ from package ‘base’ in package ‘float’
Creating a generic function for ‘La.svd’ from package ‘base’ in package ‘float’
Creating a generic function for ‘svd’ from ‘base’ in package ‘float’
    (from the saved implicit definition)
Creating a generic function for ‘svd’ from package ‘base’ in package ‘float’
Creating a generic function for ‘sweep’ from package ‘base’ in package ‘float’
** help
*** installing help indices
** 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 (float)
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c api.cpp -o api.o
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c attributes.cpp -o attributes.o
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c barrier.cpp -o barrier.o
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c date.cpp -o date.o
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c module.cpp -o module.o
clang++ -std=gnu++14 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/4.2.0/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/usr/local/Cellar/r/4.2.0/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/4.2/site-library/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** 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 (Rcpp)
* installing *source* package ‘RhpcBLASctl’ ...
** package ‘RhpcBLASctl’ successfully unpacked and MD5 sums checked
** using staged installation
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for sys/sysctl.h... yes
checking for sysctl... yes
checking for sysctlbyname... yes
checking for sys/sysinfo.h... no
checking for get_nprocs... no
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/config.h
** libs
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -Wno-implicit-function-declaration  -c blasctl.c -o blasctl.o
clang -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG   -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fPIC  -Wno-implicit-function-declaration  -c registerDynamicSymbol.c -o registerDynamicSymbol.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/4.2.0/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o RhpcBLASctl.so blasctl.o registerDynamicSymbol.o -ldl -L/usr/local/Cellar/r/4.2.0/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
installing to /usr/local/lib/R/4.2/site-library/00LOCK-RhpcBLASctl/00new/RhpcBLASctl/libs
** R
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** 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 (RhpcBLASctl)

The downloaded source packages are in
    ‘/private/var/folders/pf/6730cw150k318n5bbz3qz8dw0000gn/T/RtmpQ45UKy/downloaded_packages’
✔  checking for file ‘/private/var/folders/pf/6730cw150k318n5bbz3qz8dw0000gn/T/RtmpQ45UKy/remotesac703eb6d7de/david-cortes-MatrixExtra-a10b89f/DESCRIPTION’ (347ms)
─  preparing ‘MatrixExtra’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
✔  checking vignette meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘MatrixExtra_0.1.11.tar.gz’

Installing package into ‘/usr/local/lib/R/4.2/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘MatrixExtra’ ...
** 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
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c assignment.cpp -o assignment.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c cbind.cpp -o cbind.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c matmul.cpp -o matmul.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c misc.cpp -o misc.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c operators.cpp -o operators.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c rbind.cpp -o rbind.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c slice.cpp -o slice.o
clang++ -std=gnu++11 -I"/usr/local/Cellar/r/4.2.0/lib/R/include" -DNDEBUG -DUSE_ROBINMAP -DHAS_LD=1 -DSUPPORTS_RESTRICT=1 -I'/usr/local/lib/R/4.2/site-library/Rcpp/include' -I'/usr/local/lib/R/4.2/site-library/float/include' -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/xz/include -I/usr/local/include   -fno-trapping-math -fno-math-errno  -fPIC  -g -O2  -c slice_coo.cpp -o slice_coo.o
clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/Cellar/r/4.2.0/lib/R/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/xz/lib -L/usr/local/lib -o MatrixExtra.so RcppExports.o assignment.o cbind.o matmul.o misc.o operators.o rbind.o slice.o slice_coo.o -L/usr/local/opt/openblas/lib -lopenblas -L/usr/local/opt/gcc/lib/gcc/11/gcc/x86_64-apple-darwin21/11 -L/usr/local/opt/gcc/lib/gcc/11/gcc -L/usr/local/opt/gcc/lib/gcc/11 -lgfortran -lquadmath -lm /usr/local/lib/R/4.2/site-library/float/libs/libfloat.a -llapack -lblas -L/usr/local/Cellar/r/4.2.0/lib/R/lib -lR -lintl -Wl,-framework -Wl,CoreFoundation
ld: warning: dylib (/usr/local/opt/gcc/lib/gcc/11/libgfortran.dylib) was built for newer macOS version (12.4) than being linked (12.0)
ld: warning: dylib (/usr/local/opt/gcc/lib/gcc/11/libquadmath.dylib) was built for newer macOS version (12.4) than being linked (12.0)
installing to /usr/local/lib/R/4.2/site-library/00LOCK-MatrixExtra/00new/MatrixExtra/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** 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 (MatrixExtra)

The reason I built it from sources is because it was the only way I found to run {data.table} with more than 1 thread on macOS (because all the OpenMP configuration). To do it, I had to install R from homebrew to be able to run it in the command line, otherwise I cannot install {data.table} properly. Every now and then this messes up with the installation of other packages, just as it happened now with {MatrixExtra}, but now it's all solved. Thanks!