-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
Can't install; multiple compilation error messages #7
Comments
Your gcc version is too old to support C++11. You will need to upgrade to 4.7 or newer. @ALL: Any idea how to check for this and throw an error? |
This works, but: Found the following file(s) containing GNU extensions: |
New approach: Use std=c++11 flag instead of CXX_STD = CXX11, should work on gcc >=4.7 and throw an error on earlier versions. But this time: Non-portable flags in variable 'PKG_CPPFLAGS': |
And one more approach: Created a cpp file checking for the preprocessor directive "__cplusplus". Seems to work. |
** package ‘ranger’ successfully unpacked and MD5 sums checked
** libs
g++ -std=c++0x -I/usr/share/R/include -DNDEBUG -I"/home/andy/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Data.cpp -o Data.o
g++ -std=c++0x -I/usr/share/R/include -DNDEBUG -I"/home/andy/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c DataChar.cpp -o DataChar.o
g++ -std=c++0x -I/usr/share/R/include -DNDEBUG -I"/home/andy/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c DataDouble.cpp -o DataDouble.o
g++ -std=c++0x -I/usr/share/R/include -DNDEBUG -I"/home/andy/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c DataFloat.cpp -o DataFloat.o
g++ -std=c++0x -I/usr/share/R/include -DNDEBUG -I"/home/andy/R/i686-pc-linux-gnu-library/3.2/Rcpp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c Forest.cpp -o Forest.o
Forest.cpp: In member function ‘void Forest::showProgress(std::string)’:
Forest.cpp:657:22: error: ‘std::chrono::steady_clock’ has not been declared
Forest.cpp:661:3: error: ‘steady_clock’ has not been declared
Forest.cpp:661:28: error: expected ‘;’ before ‘start_time’
Forest.cpp:662:3: error: ‘steady_clock’ has not been declared
Forest.cpp:662:28: error: expected ‘;’ before ‘last_time’
Forest.cpp:668:51: error: ‘steady_clock’ has not been declared
Forest.cpp:668:73: error: ‘last_time’ was not declared in this scope
Forest.cpp:672:56: error: ‘steady_clock’ has not been declared
Forest.cpp:672:78: error: ‘start_time’ was not declared in this scope
Forest.cpp:676:19: error: ‘steady_clock’ has not been declared
make: *** [Forest.o] Error 1
ERROR: compilation failed for package ‘ranger’
Warning in install.packages :
installation of package ‘ranger’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpBv2B7n/downloaded_packages’
Packages -------------------------------------------------------------------------------
package * version date source
Boruta * 4.0.0 2014-12-07 CRAN (R 3.2.2)
curl 0.9.3 2015-08-25 CRAN (R 3.2.1)
devtools * 1.9.1 2015-09-11 CRAN (R 3.2.2)
digest 0.6.8 2014-12-31 CRAN (R 3.2.0)
httr 1.0.0 2015-06-25 CRAN (R 3.2.1)
magrittr 1.5 2014-11-22 CRAN (R 3.2.0)
memoise 0.2.1 2014-04-22 CRAN (R 3.2.0)
R6 2.1.1 2015-08-19 CRAN (R 3.2.1)
randomForest * 4.6-10 2014-07-17 CRAN (R 3.2.0)
rFerns * 1.1.0 2014-11-30 CRAN (R 3.2.0)
stringi 0.5-5 2015-06-29 CRAN (R 3.2.1)
stringr 1.0.0 2015-04-30 CRAN (R 3.2.1)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.9.1 Boruta_4.0.0 rFerns_1.1.0 randomForest_4.6-10
loaded via a namespace (and not attached):
[1] httr_1.0.0 R6_2.1.1 magrittr_1.5 tools_3.2.2
[5] rstudioapi_0.3.1 curl_0.9.3 memoise_0.2.1 stringi_0.5-5
[9] stringr_1.0.0 digest_0.6.8
The text was updated successfully, but these errors were encountered: