trouble installing rstan 2.14.1 on Yosemite

56 views
Skip to first unread message

Blaine Mooers

unread,
Mar 8, 2017, 9:21:38 PM3/8/17
to Stan users mailing list
Last fall in succeded in installing rstan from R run from the command line on MacOS Yosemite.
I cannot upgrade to versoin 2.14.1 from 2.12.1.
I have followed the install instructions on the rstan github site.

I currently have the R packages saved my local Library folder.


more .R/Makevars
# created by rstan at Sat May  2 15:36:03 2015 
CFLAGS=-g -O -mtune=native
FFLAGS=-g -O -mtune=native
FCFLAGS=-g -O -mtune=native
CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function
CXXFLAGS+=-flto  -Wno-unused-local-typedefs
CC=clang
CXX=clang++ -arch x86_64 -ftemplate-depth-256

I have uninstalled gcc48 and R.
I switched to gcc49.
I have reinstalled R (3.3.2).
I still get the same final error messages.

I am stumped. 
I have not found similar posts.

> install.packages("rstan", lib="/Users/blaine-mooers/Library/R/3.3/library/rstan/libs", dependencies=TRUE)
Content type 'application/x-gzip' length 743652 bytes (726 KB)
==================================================
downloaded 726 KB

* installing *source* package ‘rstan’ ...
** package ‘rstan’ successfully unpacked and MD5 sums checked
** libs
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c chains.cpp -o chains.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c init.cpp -o init.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__ast_def.cpp -o lang__ast_def.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__bare_type_grammar_inst.cpp -o lang__grammars__bare_type_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__expression07_grammar_inst.cpp -o lang__grammars__expression07_grammar_inst.o
In file included from chains.cpp:26:
In file included from /opt/local/include/boost/accumulators/statistics/stats.hpp:14:
In file included from /opt/local/include/boost/accumulators/statistics_fwd.hpp:12:
/opt/local/include/boost/mpl/print.hpp:50:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
    const int m_x = 1 / (sizeof(T) - sizeof(T));
                  ^
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__expression_grammar_inst.cpp -o lang__grammars__expression_grammar_inst.o
1 warning generated.
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__functions_grammar_inst.cpp -o lang__grammars__functions_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__indexes_grammar_inst.cpp -o lang__grammars__indexes_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__program_grammar_inst.cpp -o lang__grammars__program_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__semantic_actions.cpp -o lang__grammars__semantic_actions.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__statement_2_grammar_inst.cpp -o lang__grammars__statement_2_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__statement_grammar_inst.cpp -o lang__grammars__statement_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__term_grammar_inst.cpp -o lang__grammars__term_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__var_deccls_grammar_inst.cpp -o lang__grammars__var_deccls_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__grammars__whitespace_grammar_inst.cpp -o lang__grammars__whitespace_grammar_inst.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c misc.cpp -o misc.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c sparse_extractors.cpp -o sparse_extractors.o
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c stanc.cpp -o stanc.o
clang++ -arch x86_64 -ftemplate-depth-256 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/Library/Frameworks/R.framework/Resources/lib -L/opt/local/lib -Wl,-headerpad_max_install_names -o rstan.so chains.o init.o lang__ast_def.o lang__grammars__bare_type_grammar_inst.o lang__grammars__expression07_grammar_inst.o lang__grammars__expression_grammar_inst.o lang__grammars__functions_grammar_inst.o lang__grammars__indexes_grammar_inst.o lang__grammars__program_grammar_inst.o lang__grammars__semantic_actions.o lang__grammars__statement_2_grammar_inst.o lang__grammars__statement_grammar_inst.o lang__grammars__term_grammar_inst.o lang__grammars__var_deccls_grammar_inst.o lang__grammars__whitespace_grammar_inst.o misc.o sparse_extractors.o stanc.o -F/opt/local/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/blaine-mooers/Library/R/3.3/library/rstan/libs/rstan/libs
** R
** inst
** preparing package for lazy loading
Error in setMethod("traceplot", signature = "stanfit", function(object,  : 
  no existing definition for function ‘traceplot’
Error : unable to load R code in package ‘rstan’
ERROR: lazy loading failed for package ‘rstan’
* removing ‘/Users/blaine-mooers/Library/R/3.3/library/rstan/libs/rstan’
Warning in install.packages :
  installation of package ‘rstan’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/v0/1cx4cd192j51cs1qs_v3hbjm0000gn/T/RtmpmSXhaJ/downloaded_packages’

Ben Goodrich

unread,
Mar 8, 2017, 9:49:08 PM3/8/17
to Stan users mailing list
On Wednesday, March 8, 2017 at 9:21:38 PM UTC-5, Blaine Mooers wrote:
** preparing package for lazy loading
Error in setMethod("traceplot", signature = "stanfit", function(object,  : 
  no existing definition for function ‘traceplot’
Error : unable to load R code in package ‘rstan’
ERROR: lazy loading failed for package ‘rstan’
* removing ‘/Users/blaine-mooers/Library/R/3.3/library/rstan/libs/rstan’
Warning in install.packages :
  installation of package ‘rstan’ had non-zero exit status

My guess is that you have some other package loaded that exports a traceplot() function. In

https://github.com/stan-dev/rstan/blob/develop/rstan/rstan/R/stanfit-class.R#L592

it tests whether there is a S4 generic function called traceplot before creating one.

If you start R with the --vanilla option, installation of rstan may work (although you should be able to install the binary version from CRAN rather than building from source).

Ben

Blaine Mooers

unread,
Mar 9, 2017, 12:13:39 AM3/9/17
to stan-...@googlegroups.com
Thank you Ben for the suggestions!

I deleted everything in .Rprofile. I get the same error message in Rstudio when I try to install rstan from cran.

When I use  R --vanilla on the command line, the installation quits much sooner and delivers a new message:

> install.packages('rstan')
Installing package into ‘/Users/blaine-mooers/Library/R/3.3/library’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
HTTPS CRAN mirror

 1: 0-Cloud [https]                 2: Algeria [https]
 3: Australia (Canberra) [https]    4: Australia (Melbourne) [https]
 5: Australia (Perth) [https]       6: Austria [https]
 7: Belgium (Ghent) [https]         8: Brazil (RJ) [https]
 9: Brazil (SP 1) [https]          10: Bulgaria [https]
11: Canada (MB) [https]            12: Chile 1 [https]
13: Chile 2 [https]                14: China (Beijing) [https]
15: China (Hefei) [https]          16: China (Lanzhou) [https]
17: Colombia (Cali) [https]        18: Czech Republic [https]
19: Denmark [https]                20: France (Lyon 1) [https]
21: France (Lyon 2) [https]        22: France (Marseille) [https]
23: France (Montpellier) [https]   24: France (Paris 2) [https]
25: Germany (Münster) [https]      26: Iceland [https]
27: India [https]                  28: Indonesia (Jakarta) [https]
29: Ireland [https]                30: Italy (Padua) [https]
31: Japan (Tokyo) [https]          32: Malaysia [https]
33: Mexico (Mexico City) [https]   34: New Zealand [https]
35: Norway [https]                 36: Philippines [https]
37: Russia (Moscow) [https]        38: Serbia [https]
39: Spain (A Coruña) [https]       40: Spain (Madrid) [https]
41: Sweden [https]                 42: Switzerland [https]
43: Taiwan (Chungli) [https]       44: Turkey (Denizli) [https]
45: Turkey (Mersin) [https]        46: UK (Bristol) [https]
47: UK (Cambridge) [https]         48: UK (London 1) [https]
49: USA (CA 1) [https]             50: USA (IA) [https]
51: USA (IN) [https]               52: USA (KS) [https]
53: USA (MI 1) [https]             54: USA (OR) [https]
55: USA (TN) [https]               56: USA (TX 1) [https]
57: USA (TX 2) [https]             58: (HTTP mirrors)


Selection: 54
Content type 'application/x-gzip' length 743652 bytes (726 KB)
==================================================
downloaded 726 KB

* installing *source* package ‘rstan’ ...
** package ‘rstan’ successfully unpacked and MD5 sums checked
** libs
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c chains.cpp -o chains.o
Rscript execution error: No such file or directory
In file included from chains.cpp:26:
In file included from /opt/local/include/boost/accumulators/statistics/stats.hpp:14:
In file included from /opt/local/include/boost/accumulators/statistics_fwd.hpp:12:
/opt/local/include/boost/mpl/print.hpp:50:19: warning: in-class initialization of non-static data member is a C++11 extension
      [-Wc++11-extensions]
    const int m_x = 1 / (sizeof(T) - sizeof(T));
                  ^
1 warning generated.
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c init.cpp -o init.o
Rscript execution error: No such file or directory
clang++ -arch x86_64 -ftemplate-depth-256 -I/opt/local/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I"../inst/include" -I"../inst/include/boost_not_in_BH" -I"`"/opt/local/Library/Frameworks/R.framework/Resources/bin/Rscript" --vanilla -e "cat(system.file('include', 'src', package = 'StanHeaders'))"`" -DBOOST_RESULT_OF_USE_TR1 -DBOOST_NO_DECLTYPE -DBOOST_DISABLE_ASSERTS -DFUSION_MAX_VECTOR_SIZE=12 -I/opt/local/include -I"/Users/blaine-mooers/Library/R/3.3/library/Rcpp/include" -I"/Users/blaine-mooers/Library/R/3.3/library/RcppEigen/include" -I"/Users/blaine-mooers/Library/R/3.3/library/BH/include" -I"/Users/blaine-mooers/Library/R/3.3/library/StanHeaders/include"   -fPIC  -O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function -flto  -Wno-unused-local-typedefs -c lang__ast_def.cpp -o lang__ast_def.o
Rscript execution error: No such file or directory
lang__ast_def.cpp:18:10: fatal error: 'stan/lang/ast_def.cpp' file not found
#include <stan/lang/ast_def.cpp>
         ^
1 error generated.
make: *** [lang__ast_def.o] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/Users/blaine-mooers/Library/R/3.3/library/rstan’
* restoring previous ‘/Users/blaine-mooers/Library/R/3.3/library/rstan’

The downloaded source packages are in
‘/private/var/folders/v0/1cx4cd192j51cs1qs_v3hbjm0000gn/T/Rtmpr70mag/downloaded_packages’
Warning message:
In install.packages("rstan") :
  installation of package ‘rstan’ had non-zero exit status

--
You received this message because you are subscribed to a topic in the Google Groups "Stan users mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/stan-users/j4C7lErMhMI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stan-users+unsubscribe@googlegroups.com.
To post to this group, send email to stan-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
********************************************************
Blaine Mooers, Ph.D.
Assistant Professor
Department of Biochemistry and Molecular Biology
University of Oklahoma Health Sciences Center
S.L. Young Biomedical Research Center Rm. 466

Letter address:                    Shipping address:
P.O. Box 26901, BRC 466      975 NE 10th Street, BRC 466
Oklahoma City, OK 73190     Oklahoma City, OK 73104-5419

office: (405) 271-8300   lab: (405) 271-8313  fax:  (405) 271-3910
e-mail:  blaine...@ouhsc.edu

Blaine Mooers

unread,
Mar 10, 2017, 8:41:26 PM3/10/17
to Stan users mailing list
I deleted the \url{./Library/R/3.3} and forced install of rstan and its dependences into the macports library while using sudo
\url{/opt/local/Library/Frameworks/R.framework/Versions/3.3/Resources/library}. Perhaps the presence of two libraries was causing trouble.
Reply all
Reply to author
Forward
0 new messages