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
Error in Installing Harmony in Rstudio #113
Comments
I have the same problem installing the |
Check your version of RcppArmadillo using If your version is 10.1.0, this is the reason. Try installing an older version of RcppArmadillo, as suggested in the warning messages. Version 9.900.3 worked for me:
Make sure to either restart R or detach and re-load the package in order to confirm the new version is being used. If you need to, it is probably fine to update back to the newer version after you finish installing your package (forecast or Harmony), since compilation should only need to happen once. |
Thanks a lot. This works fine to me with the same installation problems. |
I had the exact same issue that the above install of an older RcppArmadillo corrected. However, I'll add a nuance here. I tried the default harmony install on two separate machines. They both had RcppArmadillo 10.1.2, it worked on one and not on the other. They both have the same version of gcc, but I suspect that there was an issue with the one it did not work on with the correct compiler being defaulted to by R. Or perhaps it's a clang version issue? And yes, defaulting back to the updated version of RccpArmadillo after install worked just fine. |
Thanks,it really works. |
I had a similar Issue on macOS 11.1 Big Sur and couldn't get the Armadillo downgrade working. I then followed the error code which tells you to enable C++11 compiling mode. Following this tutorials https://gallery.rcpp.org/articles/first-steps-with-C++11/ first line of code did the trick for me:
|
@pseudonym2 thank you so much, your advice did works. |
I get this problem after trying to compile a simple method including RcppArmadillo.h In file included from trying.cpp:4: |
Dear all, Harmony is now available on CRAN! Please try to install through Cheers, |
Hello, I'm trying to install harmony through these two ways:
library(devtools)
install_github("immunogenomics/harmony")
install_local('mypathway/harmony-master.zip')
While all these two way to install this package failed.
I'm using Rstuidio 4.0.2 on maxOS Catalina Version 10.15.
Here's the information when I failed to install.
** using staged installation
** libs
clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from ./harmony_types.h:1:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo:21:
/Library/Frameworks/R.framework/Versions/4.0/Resources/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 ./harmony_types.h:1:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/RcppArmadillo.h:31:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:49:
In file included from /Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo:85:
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:149:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:149:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_row = false;
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:150:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:150:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_col = false;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:151:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:151:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_xvec = false;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:161:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:161:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_row = false;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:162:12: error: unknown type name 'constexpr'
static constexpr bool is_col = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:162:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_col = false;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:163:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = true;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:163:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_xvec = true;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:173:12: error: unknown type name 'constexpr'
static constexpr bool is_row = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:173:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_row = false;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:174:12: error: unknown type name 'constexpr'
static constexpr bool is_col = true;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:174:22: error: expected member name or ';' after declaration specifiers
static constexpr bool is_col = true;
~~~~~~~~~~~~~~~~ ^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:175:12: error: unknown type name 'constexpr'
static constexpr bool is_xvec = false;
^
/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include/armadillo_bits/arma_forward.hpp:175:22: error: expected member name or ';' after declaration specifiers
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 ‘harmony’
Error: Failed to install 'harmony-master.zip' from local:
(converted from warning) installation of package ‘/var/folders/vh/npjhcwzj3hq7jbl_7xl382jh0000gn/T//RtmpAGjRdD/remotes6190459000ff/harmony-master’ had non-zero exit status
The text was updated successfully, but these errors were encountered: