monocle3 icon indicating copy to clipboard operation
monocle3 copied to clipboard

Install leidenbase and monocle3 on M1 mac

Open RodrigoGM opened this issue 3 years ago • 3 comments

Hi, I'm trying to install monocle3 on an M1 mac. I can't seem to get passed the dependency leidenbase. Has anyone successfully installed both on an M1 Mac, if so, could you share your solution ?

I've tried with two versions of gfortran, R/tools Darwin 20 arm 64 release and GCC for ARM from fxcoudert. The R/tools release fails linking to '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0' and -lquadmath. Using the GCC from fxcoudert also fails, but for other reasons.

Again, if you could share a solution, that would be most appreciated.

Thanks in advance,

RodrigoGM avatar Dec 02 '21 02:12 RodrigoGM

Tried installing Fortran? Worked for me (I'm on Big Sur though).

Dazcam avatar Jan 14 '22 11:01 Dazcam

Thanks for the response. I did install various Fortran versions, both fxcoudert and R/tools, but none seem to work.

I recently upgraded to Monterrey, and repeating the process again. So far I'm getting the following when installing leidenbase. (I'm assuming this is still a monocle3 dependency, despite, no longer being described in the installation instructions).

-- Any help would be most appreciated.

193 warnings and 12 errors generated.
make: *** [rigraph/src/gengraph_random.o] Error 1
ERROR: compilation failed for package ‘leidenbase’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/leidenbase’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/leidenbase’

The 193 warnings are : warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]

Whereas the 12 errors are:

In file included from rigraph/src/gengraph_random.cpp:32:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:642:26: error: no template named 'numeric_limits'
    bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:642:60: error: no template named 'numeric_limits'
    bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
                                                           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:643:18: error: no template named 'numeric_limits'
    int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:643:50: error: no template named 'numeric_limits'
    int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:648:17: error: no template named 'numeric_limits'
  static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:651:25: error: no template named 'numeric_limits'
  return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:651:58: error: no template named 'numeric_limits'
  return _FloatBigger ? numeric_limits<_IntT>::max() :  (numeric_limits<_IntT>::max() >> _Bits << _Bits);
                                                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:645:25: error: no return statement in constexpr function
_LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
                        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:661:16: error: no template named 'numeric_limits'
  using _Lim = numeric_limits<_IntT>;
               ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:664:12: error: use of undeclared identifier '_Lim'
    return _Lim::max();
           ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:665:21: error: use of undeclared identifier '_Lim'
  } else if (__r <= _Lim::lowest()) {
                    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:666:12: error: use of undeclared identifier '_Lim'
    return _Lim::min();
           ^

Installation is being done under the latest Xcode command line tools, and gfortran 12.1 for Monterey (macOS 12)

$ clang --version
Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

$ gfortran --version
GNU Fortran (GCC) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Session Info:

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/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] Rcpp_1.0.9        compiler_4.1.2    later_1.3.0       urlchecker_1.0.1 
 [5] prettyunits_1.1.1 profvis_0.3.7     remotes_2.4.2     tools_4.1.2      
 [9] digest_0.6.29     pkgbuild_1.3.1    pkgload_1.3.0     memoise_2.0.1    
[13] lifecycle_1.0.1   rlang_1.0.4       shiny_1.7.2       cli_3.3.0        
[17] curl_4.3.2        fastmap_1.1.0     withr_2.5.0       stringr_1.4.0    
[21] fs_1.5.2          htmlwidgets_1.5.4 devtools_2.4.4    rprojroot_2.0.3  
[25] glue_1.6.2        R6_2.5.1          processx_3.7.0    sessioninfo_1.2.2
[29] callr_3.7.1       purrr_0.3.4       magrittr_2.0.3    ps_1.7.1         
[33] promises_1.2.0.1  ellipsis_0.3.2    htmltools_0.5.3   usethis_2.1.6    
[37] mime_0.12         xtable_1.8-4      httpuv_1.6.5      stringi_1.7.8    
[41] miniUI_0.1.1.1    cachem_1.0.6      crayon_1.5.1     ```

RodrigoGM avatar Aug 16 '22 13:08 RodrigoGM

Hi,

Is this still a problem?

Thank you, Brent

brgew avatar Aug 03 '23 19:08 brgew