Hi - I'm attempting to install rstan on Mac OS 10.8.5. I installed XCode 5.0 and Command Line Tools.
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
When I run the suggested code to test the C++ compiler ...
I get the appended error message.
Suggestions? Thanks. --Dale
/bin/sh: llvm-g++-4.2: command not found
make: *** [file9ec1ba6fc12.o] Error 127
ERROR(s) during compilation: source code errors or compiler configuration errors!
Program source:
1:
2: // includes from the plugin
3:
4: #include <Rcpp.h>
5:
6:
7: #ifndef BEGIN_RCPP
8: #define BEGIN_RCPP
9: #endif
10:
11: #ifndef END_RCPP
12: #define END_RCPP
13: #endif
14:
15: using namespace Rcpp;
16:
17:
18: // user includes
19:
20:
21: // declarations
22: extern "C" {
23: SEXP file9ec1ba6fc12( ) ;
24: }
25:
26: // definition
27:
28: SEXP file9ec1ba6fc12( ){
29: BEGIN_RCPP
30:
31: std::vector<std::string> s;
32: s.push_back("hello");
33: s.push_back("world");
34: return Rcpp::wrap(s);
35:
36: END_RCPP
37: }
38:
39:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! /bin/sh: llvm-g++-4.2: command not found
make: *** [file9ec1ba6fc12.o] Error 127
In addition: Warning message:
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file9ec1ba6fc12.cpp 2> file9ec1ba6fc12.cpp.err.txt' had status 1
> cat(hellofun(), '\n')
Error in cat(hellofun(), "\n") : could not find function "hellofun"
/bin/sh: llvm-g++-4.2: command not found
make: *** [file9ec1ba6fc12.o] Error 127
ERROR(s) during compilation: source code errors or compiler configuration errors!
Program source:
1:
2: // includes from the plugin
3:
4: #include <Rcpp.h>
5:
6:
7: #ifndef BEGIN_RCPP
8: #define BEGIN_RCPP
9: #endif
10:
11: #ifndef END_RCPP
12: #define END_RCPP
13: #endif
14:
15: using namespace Rcpp;
16:
17:
18: // user includes
19:
20:
21: // declarations
22: extern "C" {
23: SEXP file9ec1ba6fc12( ) ;
24: }
25:
26: // definition
27:
28: SEXP file9ec1ba6fc12( ){
29: BEGIN_RCPP
30:
31: std::vector<std::string> s;
32: s.push_back("hello");
33: s.push_back("world");
34: return Rcpp::wrap(s);
35:
36: END_RCPP
37: }
38:
39:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! /bin/sh: llvm-g++-4.2: command not found
make: *** [file9ec1ba6fc12.o] Error 127
In addition: Warning message:
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file9ec1ba6fc12.cpp 2> file9ec1ba6fc12.cpp.err.txt' had status 1
> cat(hellofun(), '\n')
Error in cat(hellofun(), "\n") : could not find function "hellofun"