os x rstan compilation failure

116 views
Skip to first unread message

Jarrett Barber

unread,
Jun 3, 2013, 8:34:05 PM6/3/13
to stan-...@googlegroups.com
Hi All,

I followed the instructions at


to install RStan on a Mac Pro (3.33 GHz 6 core Intel Xeon) running Mountain Lion (10.8.3).  I get at least one error involving syntax (see below), and RStan is not installed.  My sessionInfo() is at the end (2.15.3 x86_64).

Your help is appreciated.

Thanks,

Jarrett

My R session:

R version 2.15.3 (2013-03-01) -- "Security Blanket"
Copyright (C) 2013 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Welcome to R for OS X!

Location for user startup files is 
 WORKING DIRECTORY = /Users/jarrettbarber/Desktop/temp

Location for user-downloaded add-on packages is 
 LIBRARY = ~/Library/R/librarymac/

Packages loaded on startup (in addition to base) = 
  datasets utils grDevices graphics stats methods 

> .help.ESS <- help
> options(STERM='iESS', editor='emacsclient')
> library(inline) 
> library(Rcpp)
> src <- ' 
+   std::vector<std::string> s; 
+   s.push_back("hello");
+   s.push_back("world");
+   return Rcpp::wrap(s);
+ '
> hellofun <- cxxfunction(body = src, includes = '', plugin = 'Rcpp', verbose = FALSE)
> cat(hellofun(), '\n')
hello world 
> options(repos = c(getOption("repos"), rstan = "http://wiki.stan.googlecode.com/git/R"))
> install.packages('rstan', type = 'source')
Installing package(s) into '/Users/jarrettbarber/Library/R/librarymac'
(as 'lib' is unspecified)
trying URL 'http://wiki.stan.googlecode.com/git/R/src/contrib/rstan_1.3.0.tar.gz'
Content type 'application/x-gzip' length unknown
opened URL
.......... .......... .......... .......... ..........
<snip!>
.......... .......... .......... .......... 
downloaded 4.1 Mb

Welcome to R for OS X!

Location for user startup files is 
 WORKING DIRECTORY = /Users/jarrettbarber/Desktop/temp

Location for user-downloaded add-on packages is 
 LIBRARY = ~/Library/R/librarymac/

Packages loaded on startup (in addition to base) = 
  datasets utils grDevices graphics stats methods 

* installing *source* package 'rstan' ...
** libs
** arch - x86_64
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c stanc.cpp -o stanc.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c chains.cpp -o chains.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c misc.cpp -o misc.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__ast_def.cpp -o gm__ast_def.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__expression_grammar_inst.cpp -o gm__grammars__expression_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__program_grammar_inst.cpp -o gm__grammars__program_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__statement_2_grammar_inst.cpp -o gm__grammars__statement_2_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__statement_grammar_inst.cpp -o gm__grammars__statement_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__term_grammar_inst.cpp -o gm__grammars__term_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__var_deccls_grammar_inst.cpp -o gm__grammars__var_deccls_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c gm__grammars__whitespace_grammar_inst.cpp -o gm__grammars__whitespace_grammar_inst.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c agrad__rev__var_stack.cpp -o agrad__rev__var_stack.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c agrad__matrix.cpp -o agrad__matrix.o
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I"../inst/include/stansrc"   -I"../inst/include/stanlib/eigen_3.1.2"  -I"../inst/include/stanlib/eigen_3.1.2/unsupported"  -I"../inst/include/stanlib/boost_1.53.0"  -I"../inst/include"  -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -I/usr/local/include -I"/Users/jarrettbarber/Library/R/librarymac/Rcpp/include"   -fPIC  -O3  -c math__matrix.cpp -o math__matrix.o
ar qc libstan.a agrad__rev__var_stack.o agrad__matrix.o math__matrix.o 
/usr/bin/ranlib: file: libstan.a(math__matrix.o) has no symbols
ranlib: file: libstan.a(math__matrix.o) has no symbols

# -@if test ! -e ../inst/libstan/x86_64; then mkdir -p ../inst/libstan/x86_64; fi
# cp libstan.a ../inst/libstan/x86_64
# rm libstan.a 
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `if test  "zstanc.o chains.o misc.o gm__ast_def.o gm__grammars__expression_grammar_inst.o gm__grammars__program_grammar_inst.o gm__grammars__statement_2_grammar_inst.o gm__grammars__statement_grammar_inst.o gm__grammars__term_grammar_inst.o gm__grammars__var_deccls_grammar_inst.o gm__grammars__whitespace_grammar_inst.o" != "z"; then   echo g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress  -L/usr/local/lib -o rstan.so stanc.o chains.o misc.o gm__ast_def.o gm__grammars__expression_grammar_inst.o gm__grammars__program_grammar_inst.o gm__grammars__statement_2_grammar_inst.o gm__grammars__statement_grammar_inst.o gm__grammars__term_grammar_inst.o gm__grammars__var_deccls_grammar_inst.o gm__grammars__whitespace_grammar_inst.o Welcome to R for OS X!  Location for user startup files is   WORKING DIRECTORY = /private/var/folders/fc/vzsczjk91b1bn45zwt0cdsvm0000gq/T/RtmpPvglBe/R.INSTALL58f5159a9dd5/rstan/src  Location for user-downloaded add-on packages is   LIBRARY = ~/Library/R/librarymac/  Packages loaded on startup (in addition to base) =    datasets utils grDevices graphics stats methods   /Users/jarrettbarber/Library/R/librarymac/Rcpp/lib/x86_64/libRcpp.aLeaving R for OS X.   -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation;   g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress  -L/usr/local/lib -o rstan.so stanc.o chains.o misc.o gm__ast_def.o gm__grammars__expression_grammar_inst.o gm__grammars__program_grammar_inst.o gm__grammars__statement_2_grammar_inst.o gm__grammars__statement_grammar_inst.o gm__grammars__term_grammar_inst.o gm__grammars__var_deccls_grammar_inst.o gm__grammars__whitespace_grammar_inst.o Welcome to R for OS X!  Location for user startup files is   WORKING DIRECTORY = /private/var/folders/fc/vzsczjk91b1bn45zwt0cdsvm0000gq/T/RtmpPvglBe/R.INSTALL58f5159a9dd5/rstan/src  Location for user-downloaded add-on packages is   LIBRARY = ~/Library/R/librarymac/  Packages loaded on startup (in addition to base) =    datasets utils grDevices graphics stats methods   /Users/jarrettbarber/Library/R/librarymac/Rcpp/lib/x86_64/libRcpp.aLeaving R for OS X.   -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation; fi'
make: *** [rstan.so] Error 2
ERROR: compilation failed for package 'rstan'
* removing '/Users/jarrettbarber/Library/R/librarymac/rstan'


The downloaded source packages are in
'/private/var/folders/fc/vzsczjk91b1bn45zwt0cdsvm0000gq/T/RtmpO2VkNj/downloaded_packages'
Warning message:
In install.packages("rstan", type = "source") :
  installation of package 'rstan' had non-zero exit status

> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] Rcpp_0.10.2   inline_0.3.11

loaded via a namespace (and not attached):
[1] tools_2.15.3

Jiqiang Guo

unread,
Jun 4, 2013, 1:51:11 PM6/4/13
to stan-...@googlegroups.com
I have not figured out why it happened.  In the mean time, could you please let us know your gcc version and make version. 

Also from a terminal you can try the following, which might be helpful for us to figure out.  Suppose you have a very simple cpp file as follows.

$ more a.cpp
int foo() {
  return 1;
}

Then you do R CMD SHLIB on the cpp file. 


$ R CMD SHLIB a.cpp
ccache llvm-g++-4.2 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c a.cpp -o a.o
ccache llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o a.so a.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation


--
Jiqiang 

--
You received this message because you are subscribed to the Google Groups "stan users mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jarrett Barber

unread,
Jun 5, 2013, 3:50:13 PM6/5/13
to stan-...@googlegroups.com
Here you go.  I believe gcc and make came with the latest version of Xcode developer tools (4.6.2).

Thanks for looking into this.

Jarrett

My terminal transcript (after creating a.cpp as suggested):

cauchy:temp jarrettbarber$ R CMD SHLIB a.cpp
g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG  -I/usr/local/include    -fPIC  -g -O2  -c a.cpp -o a.o
g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o a.so a.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

cauchy:temp jarrettbarber$ ls
a.cpp a.o a.so

cauchy:temp jarrettbarber$ which gcc
/usr/bin/gcc

cauchy:temp jarrettbarber$ gcc -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~148/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~148/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)

cauchy:temp jarrettbarber$ which make
/usr/bin/make

cauchy:temp jarrettbarber$ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

cauchy:temp jarrettbarber$ 

Jiqiang Guo

unread,
Jun 5, 2013, 4:50:12 PM6/5/13
to stan-...@googlegroups.com

I don't think there is a problem with your GCC and make from your output.  But I still do not know why.

Could you try not using Emacs speaks statistics for installing rstan if you are?

Jiqiang

Jiqiang Guo

unread,
Jun 5, 2013, 5:17:27 PM6/5/13
to stan-...@googlegroups.com
That (ESS) might not be the reason.  Now I strongly doubt you have a ~/.Rprofile, which might cause the problem.  Could you please try the following from a terminal? 

$ Rscript -e "R.home()"
[1] "/Library/Frameworks/R.framework/Resources"

Also if you have ~/.Rprofile, please post that or let me know what it incudes. 

---
Jiqiang 

Jarrett Barber

unread,
Jun 5, 2013, 6:26:47 PM6/5/13
to stan-...@googlegroups.com
My terminal transcript is below, followed by my (years old) .Rprofile file.  Note that I do use ESS, but I get the same compilation error when using the R console GUI window.

Thanks again for your continued investigation.

Jarrett


My terminal transcript:



cauchy:~ jarrettbarber$ Rscript -e "R.home()"
Welcome to R for OS X!

Location for user startup files is 
 WORKING DIRECTORY = /Users/jarrettbarber

Location for user-downloaded add-on packages is 
 LIBRARY = ~/Library/R/librarymac/

Packages loaded on startup (in addition to base) = 
  datasets utils grDevices graphics stats 

[1] "/Library/Frameworks/R.framework/Resources"
Leaving R for OS X.

cauchy:~ jarrettbarber$ 



My .Rprofile file:



## .Rprofile file for Mac OS X 
 
## Commented lines begin with # Uncomment by removing # 
options(papersize="letter") 
## options(editor="notepad") 
## options(pager="internal") 

## Width of R printouts in characters: 
options(width=65) 

##Define a function for R to run "first," automatically. 
.First = function() { 
  cat("Welcome to R for OS X!\n\n") 
  wd = getwd() 
  cat("Location for user startup files is \n WORKING DIRECTORY = ", 
      wd, "\n\n", sep="") 
  userlib = Sys.getenv("R_LIBS_USER") 
  cat("Location for user-downloaded add-on packages is \n LIBRARY = ", 
      userlib, "\n\n", sep="") 
  cat("Packages loaded on startup (in addition to base) = \n ", 
      getOption("defaultPackages"), "\n\n") 
} 

##Define function for R to run "last," automatically. 
.Last = function() cat("Leaving R for OS X.\n\n") 

## Compiled HTML help. Set to FALSE else risk (more) problems with 
## the help system, especially with regard to using help in add--on 
## packages in user libraries when users do not have sufficient 
## file permissions. 
#options(chmhelp=FALSE) 

## HTML help. Set to TRUE else risk (more) problems with 
## the help system, especially with regard to using help in add--on 
## packages located in user libraries. 
##options(htmlhelp=TRUE)

## .Library.site <- file.path(Rchartr("\\", "/", R.home()), "site-library") 

## Set a CRAN mirror (add--on package repository) and have R load 
## package(s) on startup 
local({ 
  r <- getOption("repos"); defPack<- getOption("defaultPackages") 
  addPack<- c(NULL) ## add more package names as desired 
  options(repos=r, defaultPackages=c(defPack,addPack)) 
}) 

Jiqiang Guo

unread,
Jun 5, 2013, 7:23:12 PM6/5/13
to stan-...@googlegroups.com
Your .Rprofile outputs a lot of stuff, which becomes part of the makefile for installing RStan as it uses Rscript to find some files in Rcpp.  Currently the easy solution for you is to let R not use this .Rprofile (for example, renaming it temporarily).

Jiqiang 

Jarrett Barber

unread,
Jun 5, 2013, 8:06:09 PM6/5/13
to stan-...@googlegroups.com
That's it. .Rprofile was the problem. RStan now compiles as expected after renaming .Rprofile.  In retrospect, in absence of a similar reported problem, I should have thought to look at my startup files.  It's been several years since I've done anything with these, so they were largely forgotten.

Thanks so much for your help!  I'm off to run RStan!

Jarrett

To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+unsubscribe@googlegroups.com.

Jiqiang Guo

unread,
Jun 5, 2013, 9:28:07 PM6/5/13
to stan-...@googlegroups.com
I am adding --vanilla for calling Rscript so the ~/.Rprofile will not be used for installing rstan.  Then similar problems should not occur for next versions. 

--
Jiqiang 

To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages