schochastics / graphlayouts

new layout algorithms for network visualizations in R

Home Page:https://schochastics.github.io/graphlayouts/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation fails on MacOS 11.2

conorotompkins opened this issue · comments

Compilation fails for me, installing from CRAN and GitHub.

CRAN error logs:

Installing package into ‘/usr/local/lib/R/4.0/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/graphlayouts_0.7.1.tar.gz'
Content type 'application/x-gzip' length 2410184 bytes (2.3 MB)
==================================================
downloaded 2.3 MB

* installing *source* package ‘graphlayouts’ ...
** package ‘graphlayouts’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -I"/usr/local/Cellar/r/4.0.3_2/lib/R/include" -DNDEBUG  -I'/usr/local/lib/R/4.0/site-library/Rcpp/include' -I'/usr/local/lib/R/4.0/site-library/RcppArmadillo/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 RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo:21:
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/compiler_check.hpp:50:4: error: "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
  #error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
   ^
In file included from RcppExports.cpp:4:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo:85:
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:149:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:150:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:151:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:161:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:162:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:163:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:173:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:174:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:175:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:185:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:186:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:187:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:197:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = T1::is_row;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:198:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = T1::is_col;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:199:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = T1::is_xvec;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:209:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:210:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:211:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘graphlayouts’
* removing ‘/usr/local/lib/R/4.0/site-library/graphlayouts’
Warning in install.packages :
  installation of package ‘graphlayouts’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/9h/4jxmf82d5191ch21bc8_tbc00000gn/T/RtmpKEURJe/downloaded_packages’

GitHub error logs:

> remotes::install_github("schochastics/graphlayouts")
Downloading GitHub repo schochastics/graphlayouts@HEAD
✓  checking for file ‘/private/var/folders/9h/4jxmf82d5191ch21bc8_tbc00000gn/T/RtmpCQWdU4/remotes41d461458bc/schochastics-graphlayouts-81c700e/DESCRIPTION’ ...
─  preparing ‘graphlayouts’:
✓  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
─  building ‘graphlayouts_0.7.1.tar.gz’
   
Installing package into ‘/usr/local/lib/R/4.0/site-library’
(as ‘lib’ is unspecified)
* installing *source* package ‘graphlayouts’ ...
** using staged installation
** libs
clang++ -I"/usr/local/Cellar/r/4.0.3_2/lib/R/include" -DNDEBUG  -I'/usr/local/lib/R/4.0/site-library/Rcpp/include' -I'/usr/local/lib/R/4.0/site-library/RcppArmadillo/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 RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo:21:
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/compiler_check.hpp:50:4: error: "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
  #error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
   ^
In file included from RcppExports.cpp:4:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo:85:
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:149:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:150:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:151:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:161:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:162:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:163:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:173:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:174:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:175:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:185:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = true;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:186:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:187:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:197:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = T1::is_row;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:198:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = T1::is_col;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:199:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = T1::is_xvec;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:209:12: error: unknown type name 'constexpr'
    static constexpr bool is_row  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:210:12: error: unknown type name 'constexpr'
    static constexpr bool is_col  = false;
           ^
/usr/local/lib/R/4.0/site-library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:211:12: error: unknown type name 'constexpr'
    static constexpr bool is_xvec = false;
           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘graphlayouts’
* removing ‘/usr/local/lib/R/4.0/site-library/graphlayouts’
Error: Failed to install 'graphlayouts' from GitHub:
  (converted from warning) installation of package ‘/var/folders/9h/4jxmf82d5191ch21bc8_tbc00000gn/T//RtmpCQWdU4/file41d363559a2/graphlayouts_0.7.1.tar.gz’ had non-zero exit status

Session info:

> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin20.2.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /usr/local/Cellar/r/4.0.3_2/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] Rcpp_1.0.6         magrittr_2.0.1     units_0.6-7        maptools_1.0-2     tigris_1.0         rappdirs_0.3.3    
 [7] uuid_0.1-4         tidyselect_1.1.0   lattice_0.20-41    R6_2.5.0           rlang_0.4.10       stringr_1.4.0     
[13] httr_1.4.2         parzer_0.3.0       dplyr_1.0.4        tools_4.0.3        rgdal_1.5-23       grid_4.0.3        
[19] KernSmooth_2.23-18 e1071_1.7-4        DBI_1.1.1          class_7.3-18       ellipsis_0.3.1     assertthat_0.2.1  
[25] tibble_3.0.6       lifecycle_0.2.0    sf_0.9-7           crayon_1.4.0       purrr_0.3.4        vctrs_0.3.6       
[31] glue_1.4.2         sp_1.4-5           stringi_1.5.3      compiler_4.0.3     pillar_1.4.7       generics_0.1.0    
[37] classInt_0.4-3     foreign_0.8-81     pkgconfig_2.0.3   

Maybe also related to #30 . I found a related thread on stackoverflow.
TL;DR: compile with c++11 support enabled ( for clang -std=c++11 )

I think this was caused by RStudio. The issue is described here: rstudio/rstudio#8800

I installed RStudio daily version 1.4.1554 and it resolved the compilation issue.