Hi I'm installing the package using either try(install_github('philchalmers/mirt'), silent = T) or with_makevars(c(PKG_CFLAGS = '-std=c++11'),install_github('philchalmers/mirt')), but the below fatal error shows. Please let me know how I can proceed, thanks!
installing source package ‘mirt’ ...
using staged installation
libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I/usr/local/include -fPIC -Wall -g -O2 -c Estep.cpp -o Estep.o
In file included from Estep.cpp:1:
In file included from ./Misc.h:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:57:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo:27:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/compiler_check.hpp:72: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 Estep.cpp:1:
In file included from ./Misc.h:4:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:57:
In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo:122:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:156:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:157:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:158:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:168:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:169:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:170:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = true;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:180:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:181:12: error: unknown type name 'constexpr'
static constexpr bool is_col = true;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:182:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:192:12: error: unknown type name 'constexpr'
static constexpr bool is_row = true;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:193:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:194:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:204:12: error: unknown type name 'constexpr'
static constexpr bool is_row = T1::is_row;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:205:12: error: unknown type name 'constexpr'
static constexpr bool is_col = T1::is_col;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:206:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = T1::is_xvec;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:216:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:217:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:218: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: *** [Estep.o] Error 1
ERROR: compilation failed for package ‘mirt’
restoring previous ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/mirt’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/40/pvwc1c414w9cy3nl1ff_k0hw0000gn/T//RtmpjVEuk9/file3513d84a12e/mirt_1.41.8.tar.gz’ had non-zero exit status
It looks like your OS is missing a C++ 11 compiler. You'll have to install that prior to installing this dev version or the non-binary version from CRAN. Closing as this isn't specifically an issue with mirt.
Hi I'm installing the package using either try(install_github('philchalmers/mirt'), silent = T) or with_makevars(c(PKG_CFLAGS = '-std=c++11'),install_github('philchalmers/mirt')), but the below fatal error shows. Please let me know how I can proceed, thanks!
error "*** C++11 compiler required; enable C++11 mode in your compiler, or use an earlier version of Armadillo"
^ In file included from Estep.cpp:1: In file included from ./Misc.h:4: In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29: In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo/interface/RcppArmadilloForward.h:57: In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo:122: /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:156:12: error: unknown type name 'constexpr' static constexpr bool is_row = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:157:12: error: unknown type name 'constexpr' static constexpr bool is_col = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:158:12: error: unknown type name 'constexpr' static constexpr bool is_xvec = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:168:12: error: unknown type name 'constexpr' static constexpr bool is_row = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:169:12: error: unknown type name 'constexpr' static constexpr bool is_col = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:170:12: error: unknown type name 'constexpr' static constexpr bool is_xvec = true; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:180:12: error: unknown type name 'constexpr' static constexpr bool is_row = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:181:12: error: unknown type name 'constexpr' static constexpr bool is_col = true; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:182:12: error: unknown type name 'constexpr' static constexpr bool is_xvec = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:192:12: error: unknown type name 'constexpr' static constexpr bool is_row = true; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:193:12: error: unknown type name 'constexpr' static constexpr bool is_col = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:194:12: error: unknown type name 'constexpr' static constexpr bool is_xvec = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:204:12: error: unknown type name 'constexpr' static constexpr bool is_row = T1::is_row; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:205:12: error: unknown type name 'constexpr' static constexpr bool is_col = T1::is_col; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:206:12: error: unknown type name 'constexpr' static constexpr bool is_xvec = T1::is_xvec; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:216:12: error: unknown type name 'constexpr' static constexpr bool is_row = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:217:12: error: unknown type name 'constexpr' static constexpr bool is_col = false; ^ /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:218: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: *** [Estep.o] Error 1 ERROR: compilation failed for package ‘mirt’