Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation Error on Installation #48

Open
samuel-marsh opened this issue Mar 12, 2024 · 10 comments
Open

Compilation Error on Installation #48

samuel-marsh opened this issue Mar 12, 2024 · 10 comments

Comments

@samuel-marsh
Copy link

Hi,

I'm having compilation issue with installation of singlet, hoping you might be able to help debug. Haven't had issue in compilation in while.

Here is output of installation:

install output
> devtools::install_github("zdebruine/singlet")
Downloading GitHub repo zdebruine/singlet@HEAD
Skipping 2 packages not available: fgsea, limma
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file/private/var/folders/92/rwb8659d3jl658jf5nmmvw580000gn/T/Rtmp1tm6Mt/remotesf1df3a2bdf62/zdebruine-singlet-5164658/DESCRIPTION...preparingsinglet:checking DESCRIPTION meta-informationcleaning srcchecking for LF line-endings in source and make files and shell scriptschecking for empty or unneeded directories
     NB: this package now depends on R (>= 3.5.0)
     WARNING: Added dependency on R >= 3.5.0 because serialized objects in
     serialize/load version 3 cannot be read in older versions of R.
     File(s) containing such objects:singlet/data/pbmc3k.RData’
─  buildingsinglet_0.99.6.tar.gz* installing *source* packagesinglet...
** using staged installation
** libs
using C++ compiler:Homebrew clang version 17.0.6using C++11
using SDK:MacOSX13.1.sdkclang++ -arch x86_64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/RcppEigen/include' -I/usr/local/opt/llvm/17.0.6/include     -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC  -falign-functions=64 -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:56:
../inst/include/src/IVCSC/IVCSC_SparseMatrix.hpp:87:120: error: no type named 'Vector' in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
        inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, compressionLevel, columnMajor>::Vector& vec);
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:58:
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:78:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
            ^
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:79:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
            ^
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:80:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
            ^
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:77:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
            ^
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:131:14: warning: unused variable 'twos' [-Wunused-variable]
    uint32_t twos = 0;
             ^
../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:130:14: warning: unused variable 'ones' [-Wunused-variable]
    uint32_t ones = 0;
             ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:59:
../inst/include/src/IVCSC/IVCSC_Methods.hpp:312:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/IVCSC/IVCSC_Methods.hpp:359:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/IVCSC/IVCSC_Methods.hpp:403:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:60:
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:47:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:171:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == compressionLevel) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:180:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 1) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:183:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        else if constexpr (otherCompressionLevel == 2) {
                ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:631:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:61:
../inst/include/src/IVCSC/IVCSC_BLAS.hpp:80:92: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, compressionLevel, columnMajor>::vectorMultiply(
                                                                                           ^~~~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:66:
../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:117:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:128:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:69:
../inst/include/src/VCSC/VCSC_SparseMatrix.hpp:82:105: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x02', columnMajor>'
        inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec);
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:71:
../inst/include/src/VCSC/VCSC_Private_Methods.hpp:77:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
            ^
../inst/include/src/VCSC/VCSC_Private_Methods.hpp:80:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
            ^
../inst/include/src/VCSC/VCSC_Private_Methods.hpp:79:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
            ^
../inst/include/src/VCSC/VCSC_Private_Methods.hpp:78:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
            ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:72:
../inst/include/src/VCSC/VCSC_Methods.hpp:256:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
../inst/include/src/VCSC/VCSC_Methods.hpp:326:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/VCSC/VCSC_Methods.hpp:356:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:73:
../inst/include/src/VCSC/VCSC_Constructors.hpp:107:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 2) {
           ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:116:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 1) {
           ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:119:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        else if constexpr (otherCompressionLevel == 3) {
                ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:542:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:74:
../inst/include/src/VCSC/VCSC_BLAS.hpp:74:77: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x02', columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, 2, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec) {
                                                                            ^~~~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:77:
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:161:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (auto& [key, value] : data) {
             ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:173:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (auto& [key, value] : data) {
             ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:359:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (const auto& [key, value] : data) {
                   ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:373:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (const auto &[key, value] : newVector.data) {
                   ^~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:79:
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:118:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:129:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:148:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values == other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:154:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values != other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:160:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values < other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:166:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values > other.values;
               ^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:82:
../inst/include/src/CSC/CSC_SparseMatrix.hpp:79:63: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x01', columnMajor>'
            typename SparseMatrix<T, indexT, 1, columnMajor>::Vector& vec);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:84:
../inst/include/src/CSC/CSC_Private_Methods.hpp:50:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
            ^
../inst/include/src/CSC/CSC_Private_Methods.hpp:51:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
            ^
../inst/include/src/CSC/CSC_Private_Methods.hpp:49:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
            ^
../inst/include/src/CSC/CSC_Private_Methods.hpp:52:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
            ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:86:
../inst/include/src/CSC/CSC_Constructors.hpp:139:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (compressionLevel2 == 1) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:147:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (compressionLevel2 == 2) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:149:13: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  } else if constexpr (compressionLevel2 == 3) {
            ^
../inst/include/src/CSC/CSC_Constructors.hpp:178:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:230:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:339:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:387:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:87:
../inst/include/src/CSC/CSC_BLAS.hpp:79:65: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x01', columnMajor>'
inline Eigen::VectorXd SparseMatrix<T, indexT, 1, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 1, columnMajor>::Vector &vec) {
                                                                ^~~~~~~~~~~~~~
44 warnings and 10 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for packagesinglet* removing/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/singletWarning messages:
1: In readLines(old_path) :
  incomplete final line found on '/Users/marsh_mbp/.R/Makevars'
2: In i.p(...) :
  installation of package/var/folders/92/rwb8659d3jl658jf5nmmvw580000gn/T//Rtmp1tm6Mt/filef1df1656b8c4/singlet_0.99.6.tar.gzhad non-zero exit status
sessionInfo() output
> sessionInfo()
R version 4.3.2 Patched (2023-11-10 r85510)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6.8

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: internal

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

loaded via a namespace (and not attached):
 [1] miniUI_0.1.1.1          compiler_4.3.2          promises_1.2.1          Rcpp_1.0.12            
 [5] stringr_1.5.1           callr_3.7.5             later_1.3.2             fastmap_1.1.1          
 [9] mime_0.12               R6_2.5.1                curl_5.2.1              htmlwidgets_1.6.4      
[13] desc_1.4.3              profvis_0.3.8           shiny_1.8.0             rlang_1.1.3            
[17] cachem_1.0.8            stringi_1.8.3           httpuv_1.6.14           fs_1.6.3               
[21] pkgload_1.3.4           memoise_2.0.1           cli_3.6.2               magrittr_2.0.3         
[25] ps_1.7.6                processx_3.8.3          digest_0.6.35           pbmc3k.SeuratData_3.1.4
[29] rstudioapi_0.15.0       xtable_1.8-4            remotes_2.4.2.1         devtools_2.4.5         
[33] lifecycle_1.0.4         vctrs_0.6.5             glue_1.7.0              urlchecker_1.0.1       
[37] sessioninfo_1.2.2       pkgbuild_1.4.3          purrr_1.0.2             tools_4.3.2            
[41] usethis_2.2.3           ellipsis_0.3.2          htmltools_0.5.7 

Thanks!
Sam

@zdebruine
Copy link
Owner

Thanks @samuel-marsh. I cannot reproduce on Linux RedHat or Windows (I don't have a Mac) and have not encountered this error before.

I do not see RcppEigen in your sessionInfo(). Can you try installing and loading the latest version of RcppEigen on CRAN? If that works for you, then I can address that requirement in the singlet DESCRIPTION and NAMESPACE file.

@samuel-marsh
Copy link
Author

Hi @zdebruine,

Ya I was able to install on linux system just fine so not sure what's happening. I just tried with loading RcppEigen but got same error (even tried after reinstalling RcppEigen from source instead of binary just to extra check). I'll keep hunting around for issue and will post back if I learn anything more.

Since the installations work elsewhere my best guess (unless all of sudden others start reporting error too) is that it's just some specific compiler issue on my laptop. I'll close issue for now because not sure what else there is to try since other platforms are ok.

Thanks again!!

@zdebruine
Copy link
Owner

No, I'm going to reopen the issue as it appears to be related to our specific use of Eigen. We need this to pass install checks on Mac too, and I think if we just revert to the legacy Eigen API commands instead of the latest commands that we were using it should compile on Mac no problem. Glad you did get it to work elsewhere!

@zdebruine zdebruine reopened this Mar 15, 2024
@samuel-marsh
Copy link
Author

Gotcha sounds good! Thanks again!!

@jws777
Copy link

jws777 commented Mar 22, 2024

Thanks so much for these amazing tools, I'm so looking forward to analysing my data with them!

I received the same error trying to install singlet as noted above, also on a mac. Additionally, here on the github, it says I would need the development version of RcppML, but I receive this error below when trying to compile that. (I can open this as an issue on RcppML if you prefer - just wanted to mention here as instructed in installation for singlet also).

As a workaround, I was using the cran RcppML package directly, and I looked at your website tutorial here: https://www.zachdebruine.com/post/cross-validation-for-nmf-rank-determination/
Where is the crossValidate function called from please? Is that in the RcppML development version?

Thanks very much!

`>devtools::install_github("zdebruine/RcppML")
Downloading GitHub repo zdebruine/RcppML@HEAD
── R CMD build ──────────────────────────────────────────────────────────────────────────────────────────────────────
✔ checking for file ‘/private/var/folders/zx/4p3992yn2v5fbvqmyz06cp6w0000gn/T/RtmpWoYvK8/remotes15daa2d7190bd/zdebruine-RcppML-5449a5b/DESCRIPTION’ ...
─ preparing ‘RcppML’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
NB: this package now depends on R (>= 3.5.0)
WARNING: Added dependency on R >= 3.5.0 because serialized objects in
serialize/load version 3 cannot be read in older versions of R.
File(s) containing such objects:
‘RcppML/data/aml.rdata’ ‘RcppML/data/hawaiibirds.rdata’
‘RcppML/data/movielens.rdata’
─ building ‘RcppML_0.5.6.tar.gz’

Installing package into ‘/Users/jswann/Library/R/arm64/4.3/library’
(as ‘lib’ is unspecified)

  • installing source package ‘RcppML’ ...
    ** using staged installation
    ** libs
    using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.102)’
    using C++11
    using SDK: ‘MacOSX12.3.sdk’
    clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/RcppML.h:13:
    ../inst/include/RcppML/SparseMatrix.h:96:63: warning: private field 's_size' is not used [-Wunused-private-field]
    int col_, index, max_index, s_max_index, s_index = 0, s_size;
    ^
    1 warning generated.
    clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC -falign-functions=64 -Wall -g -O2 -c RcppFunctions.cpp -o RcppFunctions.o
    In file included from RcppFunctions.cpp:9:
    ../inst/include/RcppML/SparseMatrix.h:96:63: warning: private field 's_size' is not used [-Wunused-private-field]
    int col_, index, max_index, s_max_index, s_index = 0, s_size;
    ^
    1 warning generated.
    clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC -falign-functions=64 -Wall -g -O2 -c bipartiteMatch.cpp -o bipartiteMatch.o
    clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o RcppML.so RcppExports.o RcppFunctions.o bipartiteMatch.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0 -L/opt/gfortran/lib -lgfortran -lemutls_w -lquadmath -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
    ld: warning: directory not found for option '-L/opt/gfortran/lib/gcc/aarch64-apple-darwin20.0/12.2.0'
    ld: warning: directory not found for option '-L/opt/gfortran/lib'
    ld: library not found for -lgfortran
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [RcppML.so] Error 1
    ERROR: compilation failed for package ‘RcppML’
  • removing ‘/Users/jswann/Library/R/arm64/4.3/library/RcppML’
  • restoring previous ‘/Users/jswann/Library/R/arm64/4.3/library/RcppML’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/zx/4p3992yn2v5fbvqmyz06cp6w0000gn/T//RtmpWoYvK8/file15daa7ad57f99/RcppML_0.5.6.tar.gz’ had non-zero exit status

`

Session info:

R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.5.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

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

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] MLDataR_1.0.1 uwot_0.1.16 ggrepel_0.9.5 sparseMatrixStats_1.13.4
[5] MatrixGenerics_1.15.0 matrixStats_1.2.0 Matrix_1.6-5 RcppML_0.3.7
[9] RcppEigen_0.3.4.0.0 loomR_0.2.1.9000 hdf5r_1.3.10 R6_2.5.1
[13] RcisTarget_1.20.0 SCENIC_1.3.1 ggplot2_3.5.0 SCINA_1.2.0
[17] gplots_3.1.3.1 MASS_7.3-60.0.1 cowplot_1.1.3 data.table_1.15.2
[21] dplyr_1.1.4 Seurat_5.0.3 SeuratObject_5.0.1 sp_2.1-3

loaded via a namespace (and not attached):
[1] RcppAnnoy_0.0.22 splines_4.3.1 later_1.3.2 bitops_1.0-7
[5] tibble_3.2.1 R.oo_1.26.0 polyclip_1.10-6 graph_1.78.0
[9] XML_3.99-0.16.1 fastDummies_1.7.3 lifecycle_1.0.4 processx_3.8.3
[13] globals_0.16.3 lattice_0.22-5 magrittr_2.0.3 plotly_4.10.4
[17] remotes_2.4.2.1 httpuv_1.6.14 glmGamPoi_1.12.2 sctransform_0.4.1
[21] spam_2.10-0 sessioninfo_1.2.2 pkgbuild_1.4.3 spatstat.sparse_3.0-3
[25] reticulate_1.35.0 pbapply_1.7-2 DBI_1.2.2 RColorBrewer_1.1-3
[29] pkgload_1.3.4 abind_1.4-5 zlibbioc_1.48.0 GenomicRanges_1.54.1
[33] Rtsne_0.17 purrr_1.0.2 R.utils_2.12.3 BiocGenerics_0.48.1
[37] RCurl_1.98-1.14 GenomeInfoDbData_1.2.11 IRanges_2.36.0 S4Vectors_0.40.2
[41] irlba_2.3.5.1 listenv_0.9.1 spatstat.utils_3.0-4 goftest_1.2-3
[45] RSpectra_0.16-1 spatstat.random_3.2-3 annotate_1.80.0 fitdistrplus_1.1-11
[49] parallelly_1.37.1 DelayedMatrixStats_1.24.0 leiden_0.4.3.1 codetools_0.2-19
[53] DelayedArray_0.28.0 tidyselect_1.2.1 farver_2.1.1 stats4_4.3.1
[57] spatstat.explore_3.2-7 jsonlite_1.8.8 ellipsis_0.3.2 progressr_0.14.0
[61] ggridges_0.5.6 survival_3.5-8 tools_4.3.1 ica_1.0-3
[65] Rcpp_1.0.12 glue_1.7.0 gridExtra_2.3 SparseArray_1.2.2
[69] usethis_2.2.3 GenomeInfoDb_1.38.1 AUCell_1.22.0 withr_3.0.0
[73] BiocManager_1.30.22 fastmap_1.1.1 fansi_1.0.6 callr_3.7.5
[77] caTools_1.18.2 digest_0.6.35 mime_0.12 colorspace_2.1-0
[81] scattermore_1.2 gtools_3.9.5 tensor_1.5 spatstat.data_3.0-4
[85] RSQLite_2.3.5 R.methodsS3_1.8.2 utf8_1.2.4 tidyr_1.3.1
[89] generics_0.1.3 httr_1.4.7 htmlwidgets_1.6.4 S4Arrays_1.2.0
[93] pkgconfig_2.0.3 gtable_0.3.4 blob_1.2.4 lmtest_0.9-40
[97] XVector_0.42.0 htmltools_0.5.7 dotCall64_1.1-1 GSEABase_1.62.0
[101] scales_1.3.0 Biobase_2.62.0 png_0.1-8 rstudioapi_0.15.0
[105] reshape2_1.4.4 curl_5.2.1 nlme_3.1-164 zoo_1.8-12
[109] cachem_1.0.8 stringr_1.5.1 KernSmooth_2.23-22 vipor_0.4.7
[113] parallel_4.3.1 miniUI_0.1.1.1 arrow_14.0.0.2 AnnotationDbi_1.64.1
[117] desc_1.4.3 ggrastr_1.0.2 pillar_1.9.0 grid_4.3.1
[121] vctrs_0.6.5 RANN_2.6.1 promises_1.2.1 xtable_1.8-4
[125] cluster_2.1.6 beeswarm_0.4.0 cli_3.6.2 compiler_4.3.1
[129] rlang_1.1.3 crayon_1.5.2 future.apply_1.11.1 labeling_0.4.3
[133] ps_1.7.6 ggbeeswarm_0.7.2 fs_1.6.3 plyr_1.8.9
[137] stringi_1.8.3 viridisLite_0.4.2 deldir_2.0-4 assertthat_0.2.1
[141] munsell_0.5.0 Biostrings_2.70.1 lazyeval_0.2.2 devtools_2.4.5.9000
[145] spatstat.geom_3.2-9 RcppHNSW_0.6.0 patchwork_1.2.0 bit64_4.0.5
[149] future_1.33.1 KEGGREST_1.42.0 shiny_1.8.0 SummarizedExperiment_1.32.0
[153] ROCR_1.0-11 igraph_2.0.3 memoise_2.0.1 bit_4.0.5

@cindyfang70
Copy link

Hey! I came across this error too when installing singlet. I am on Mac M2. What fixed it in my case was downgrading my version of GCC to gcc-12 rather than gcc-13. I also had to place the following lines in my .R/Makevars:

FLIBS= -L/opt/homebrew/bin/gcc-12
CC=gcc-12
CXX=g++-12
CXX1X=g++-12
CXX11=g++-12
CXX14=g++-12

@tomsing1
Copy link

Just to confirm that the installation still fails on my Apple M2 MacBook.
I tried to follow @cindyfang70 's advice, but wasn't quite sure how to downgrade gcc 🤷 .

Luckily, (like others) I was able to install singlet on a ubuntu Linux machine, with

devtools::install_github("zdebruine/RcppML", force = TRUE)
devtools::install_github("zdebruine/singlet", force = TRUE)

The singlet package looks incredibly useful - thanks a lot for working on it. In case you need testers with Macs, let me know!

Error
* installing *source* package ‘singlet’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’
using C++11
using SDK: ‘MacOSX14.4.sdk’
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/include" -DNDEBUG -I../inst/include/ -I'/Users/sandmann/Library/Caches/org.R-project.R/R/renv/library/singlet-2fa8e6c5/R-4.3/aarch64-apple-darwin20/Rcpp/include' -I'/Users/sandmann/Library/Caches/org.R-project.R/R/renv/library/singlet-2fa8e6c5/R-4.3/aarch64-apple-darwin20/RcppEigen/include' -I/opt/homebrew/include    -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC  -I/opt/homebrew/include -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:56:
../inst/include/src/IVCSC/IVCSC_SparseMatrix.hpp:87:120: error: no type named 'Vector' in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
        inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, compressionLevel, columnMajor>::Vector& vec);
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:59:
../inst/include/src/IVCSC/IVCSC_Methods.hpp:312:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/IVCSC/IVCSC_Methods.hpp:359:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/IVCSC/IVCSC_Methods.hpp:403:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:60:
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:47:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:171:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == compressionLevel) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:180:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 1) {
           ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:183:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        else if constexpr (otherCompressionLevel == 2) {
                ^
../inst/include/src/IVCSC/IVCSC_Constructors.hpp:631:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:61:
../inst/include/src/IVCSC/IVCSC_BLAS.hpp:80:92: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, compressionLevel, columnMajor>::vectorMultiply(
                                                                                           ^~~~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:66:
../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:117:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:128:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:69:
../inst/include/src/VCSC/VCSC_SparseMatrix.hpp:82:105: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, '\x02', columnMajor>'
        inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec);
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:72:
../inst/include/src/VCSC/VCSC_Methods.hpp:256:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
../inst/include/src/VCSC/VCSC_Methods.hpp:326:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
../inst/include/src/VCSC/VCSC_Methods.hpp:356:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
                if constexpr (columnMajor) {
                   ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:73:
../inst/include/src/VCSC/VCSC_Constructors.hpp:107:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 2) {
           ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:116:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (otherCompressionLevel == 1) {
           ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:119:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        else if constexpr (otherCompressionLevel == 3) {
                ^
../inst/include/src/VCSC/VCSC_Constructors.hpp:542:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (columnMajor) {
           ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:74:
../inst/include/src/VCSC/VCSC_BLAS.hpp:74:77: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, '\x02', columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, 2, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec) {
                                                                            ^~~~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:77:
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:161:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (auto& [key, value] : data) {
             ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:173:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (auto& [key, value] : data) {
             ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:359:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (const auto& [key, value] : data) {
                   ^~~~~~~~~~~~
../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:373:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
  for (const auto &[key, value] : newVector.data) {
                   ^~~~~~~~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:79:
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:118:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:129:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
        if constexpr (!columnMajor) {
           ^
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:148:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values == other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:154:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values != other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:160:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values < other.values;
               ^~~~~~
../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:166:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
        return values > other.values;
               ^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:82:
../inst/include/src/CSC/CSC_SparseMatrix.hpp:79:63: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, '\x01', columnMajor>'
            typename SparseMatrix<T, indexT, 1, columnMajor>::Vector& vec);
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:86:
../inst/include/src/CSC/CSC_Constructors.hpp:139:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (compressionLevel2 == 1) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:147:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (compressionLevel2 == 2) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:149:13: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  } else if constexpr (compressionLevel2 == 3) {
            ^
../inst/include/src/CSC/CSC_Constructors.hpp:178:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:230:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:339:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
../inst/include/src/CSC/CSC_Constructors.hpp:387:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
  if constexpr (columnMajor) {
     ^
In file included from RcppExports.cpp:4:
In file included from ./../inst/include/singlet.h:24:
In file included from ../inst/include/IVSparse.h:87:
../inst/include/src/CSC/CSC_BLAS.hpp:79:65: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, '\x01', columnMajor>'
inline Eigen::VectorXd SparseMatrix<T, indexT, 1, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 1, columnMajor>::Vector &vec) {
                                                                ^~~~~~~~~~~~~~
30 warnings and 10 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘singlet’
* removing ‘/Users/sandmann/repositories/singlet/renv/staging/1/singlet’
install of package 'singlet' failed [error code 1]
Traceback (most recent calls last):
12: renv::install(".")
11: renv_install_impl(records)
10: renv_install_staged(records)
 9: renv_install_default(records)
 8: handler(package, renv_install_package(record))
 7: renv_install_package(record)
 6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 5: renv_install_package_impl(record)
 4: r_cmd_install(package, path)
 3: r_exec_error(package, output, "install", status)
 2: abort(all)
 1: stop(fallback)
SessionInfo
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.4.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

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

time zone: America/Los_Angeles
tzcode source: internal

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

loaded via a namespace (and not attached):
 [1] compiler_4.3.1      BiocManager_1.30.22 credentials_2.0.1   tools_4.3.1         rstudioapi_0.15.0   curl_5.2.0         
 [7] jsonlite_1.8.8      renv_1.0.5          openssl_2.1.1       sys_3.4.2           askpass_1.2.0      

@samuel-marsh
Copy link
Author

Hi @zdebruine,

Just wondering if there is any updates on potential timeline for potential fix? I know it may not be high priority but just wanted to check. I do have access to Linux environment to run successfully but primary analysis environment is Mac so would be really helpful not to have to move back and forth.

Best,
Sam

@cindyfang70
Copy link

Hi @tomsing1, sorry for the late response to this but if you are using Homebrew, I basically followed the advice here. So the command for downgrading to gcc-12 would be brew install gcc@12.

@mfrancesconi81
Copy link

Hello,
I also have a problem with installation on my Mac book pro M1. See below for details.

Any clue on what wrong? Does this have anything to do with gcc?
Thanks a lot!

R version 4.3.3 (2024-02-29)
Platform aarch64-apple-darwin20 (64-bit)

Installing package into ‘/Users/mirko/Library/R/arm64/4.3/library’
(as ‘lib’ is unspecified)

  • installing source package ‘singlet’ ...
    ** using staged installation
    ** libs
    using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’
    using C++11
    using SDK: ‘’
    clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include/ -I'/Users/mirko/Library/R/arm64/4.3/library/Rcpp/include' -I'/Users/mirko/Library/R/arm64/4.3/library/RcppEigen/include' -I/opt/R/arm64/include -DEIGEN_INITIALIZE_MATRICES_BY_ZERO -DEIGEN_NO_DEBUG -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:56:
    ../inst/include/src/IVCSC/IVCSC_SparseMatrix.hpp:87:120: error: no type named 'Vector' in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
    inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, compressionLevel, columnMajor>::Vector& vec);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:58:
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:80:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
    ^
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:79:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
    ^
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:78:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
    ^
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:77:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
    ^
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:130:14: warning: unused variable 'ones' [-Wunused-variable]
    uint32_t ones = 0;
    ^
    ../inst/include/src/IVCSC/IVCSC_Private_Methods.hpp:131:14: warning: unused variable 'twos' [-Wunused-variable]
    uint32_t twos = 0;
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:59:
    ../inst/include/src/IVCSC/IVCSC_Methods.hpp:312:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Methods.hpp:359:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Methods.hpp:403:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:60:
    ../inst/include/src/IVCSC/IVCSC_Constructors.hpp:47:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Constructors.hpp:171:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (otherCompressionLevel == compressionLevel) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Constructors.hpp:180:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (otherCompressionLevel == 1) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Constructors.hpp:183:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    else if constexpr (otherCompressionLevel == 2) {
    ^
    ../inst/include/src/IVCSC/IVCSC_Constructors.hpp:631:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:61:
    ../inst/include/src/IVCSC/IVCSC_BLAS.hpp:80:92: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<T, indexT, compressionLevel, columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, compressionLevel, columnMajor>::vectorMultiply(
    ^~~~~~~~~~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:66:
    ../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:117:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (!columnMajor) {
    ^
    ../inst/include/src/InnerIterators/IVCSC_Iterator_Methods.hpp:128:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (!columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:69:
    ../inst/include/src/VCSC/VCSC_SparseMatrix.hpp:82:105: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x02', columnMajor>'
    inline Eigen::Matrix<T, -1, 1> vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:71:
    ../inst/include/src/VCSC/VCSC_Private_Methods.hpp:80:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
    ^
    ../inst/include/src/VCSC/VCSC_Private_Methods.hpp:78:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
    ^
    ../inst/include/src/VCSC/VCSC_Private_Methods.hpp:79:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
    ^
    ../inst/include/src/VCSC/VCSC_Private_Methods.hpp:77:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:72:
    ../inst/include/src/VCSC/VCSC_Methods.hpp:256:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/VCSC/VCSC_Methods.hpp:326:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/VCSC/VCSC_Methods.hpp:356:20: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:73:
    ../inst/include/src/VCSC/VCSC_Constructors.hpp:107:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (otherCompressionLevel == 2) {
    ^
    ../inst/include/src/VCSC/VCSC_Constructors.hpp:116:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (otherCompressionLevel == 1) {
    ^
    ../inst/include/src/VCSC/VCSC_Constructors.hpp:119:17: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    else if constexpr (otherCompressionLevel == 3) {
    ^
    ../inst/include/src/VCSC/VCSC_Constructors.hpp:542:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:74:
    ../inst/include/src/VCSC/VCSC_BLAS.hpp:74:77: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x02', columnMajor>'
    inline Eigen::Matrix<T, -1, 1> SparseMatrix<T, indexT, 2, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 2, columnMajor>::Vector& vec) {
    ^~~~~~~~~~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:77:
    ../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:161:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
    for (auto& [key, value] : data) {
    ^~~~~~~~~~~~
    ../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:173:14: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
    for (auto& [key, value] : data) {
    ^~~~~~~~~~~~
    ../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:359:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
    for (const auto& [key, value] : data) {
    ^~~~~~~~~~~~
    ../inst/include/src/Vectors/VCSC_Vector_Methods.hpp:373:20: warning: decomposition declarations are a C++17 extension [-Wc++17-extensions]
    for (const auto &[key, value] : newVector.data) {
    ^~~~~~~~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:79:
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:118:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (!columnMajor) {
    ^
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:129:12: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (!columnMajor) {
    ^
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:148:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
    return values == other.values;
    ^~~~~~
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:154:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
    return values != other.values;
    ^~~~~~
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:160:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
    return values < other.values;
    ^~~~~~
    ../inst/include/src/InnerIterators/VCSC_Iterator_Methods.hpp:166:16: error: use of non-static data member 'values' of 'SparseMatrix<T, indexT, 2, columnMajor>' from nested type 'InnerIterator'
    return values > other.values;
    ^~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:82:
    ../inst/include/src/CSC/CSC_SparseMatrix.hpp:79:63: error: no type named 'Vector' in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x01', columnMajor>'
    typename SparseMatrix<T, indexT, 1, columnMajor>::Vector& vec);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:84:
    ../inst/include/src/CSC/CSC_Private_Methods.hpp:52:13: warning: unused variable 'byte3' [-Wunused-variable]
    uint8_t byte3 = (val_t >> 24) & 0xFF;
    ^
    ../inst/include/src/CSC/CSC_Private_Methods.hpp:49:13: warning: unused variable 'byte0' [-Wunused-variable]
    uint8_t byte0 = val_t & 0xFF;
    ^
    ../inst/include/src/CSC/CSC_Private_Methods.hpp:51:13: warning: unused variable 'byte2' [-Wunused-variable]
    uint8_t byte2 = (val_t >> 16) & 0xFF;
    ^
    ../inst/include/src/CSC/CSC_Private_Methods.hpp:50:13: warning: unused variable 'byte1' [-Wunused-variable]
    uint8_t byte1 = (val_t >> 8) & 0xFF;
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:86:
    ../inst/include/src/CSC/CSC_Constructors.hpp:139:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (compressionLevel2 == 1) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:147:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (compressionLevel2 == 2) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:149:13: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    } else if constexpr (compressionLevel2 == 3) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:178:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:230:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:339:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    ../inst/include/src/CSC/CSC_Constructors.hpp:387:6: warning: constexpr if is a C++17 extension [-Wc++17-extensions]
    if constexpr (columnMajor) {
    ^
    In file included from RcppExports.cpp:4:
    In file included from ./../inst/include/singlet.h:24:
    In file included from ../inst/include/IVSparse.h:87:
    ../inst/include/src/CSC/CSC_BLAS.hpp:79:65: error: out-of-line definition of 'vectorMultiply' does not match any declaration in 'SparseMatrix<type-parameter-0-0, type-parameter-0-1, (unsigned char)'\x01', columnMajor>'
    inline Eigen::VectorXd SparseMatrix<T, indexT, 1, columnMajor>::vectorMultiply(typename SparseMatrix<T, indexT, 1, columnMajor>::Vector &vec) {
    ^~~~~~~~~~~~~~
    44 warnings and 10 errors generated.
    make: *** [RcppExports.o] Error 1
    ERROR: compilation failed for package ‘singlet’
  • removing ‘/Users/mirko/Library/R/arm64/4.3/library/singlet’
    Warning message:
    In i.p(...) :
    installation of package ‘/var/folders/vg/693pw7js3833vmpvhb3nx_zh0000gp/T//RtmpDRg2tL/fileabd6320a773/singlet_0.99.6.tar.gz’ had non-zero exit status

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants