I tried the new version just now. Installation went smoothly, but when trying the school example:
> print(fit)
Error in .Call("effective_sample_size", sim, n - 1) :
"effective_sample_size" not resolved from current namespace (rstan)
On Jul 4, 2014, at 2:16 PM, Bob Carpenter <ca...@alias-i.com> wrote:
> I found it and uploaded a new version and everyone
> should be able to see it again.
>
> Sorry for the glitch.
>
> - Bob
>
> P.S. GitHub rocks --- great search through their web
> interface.
>
>
> On Jul 4, 2014, at 1:44 PM, Emmanuel Charpentier <emanuel.c...@gmail.com> wrote:
>
>> Dear list,
>>
>> Trying to follow the procedure written out at the RStan Getting Started page, I find myself (today July 4th, 2014) unable to proceed : in fact, the "http://mc-stan.org/rstan/install.R" address redirects back to the Stan Project Home page.
>>
>> Ouch !
>>
>> It is probably a glitch (I have already installed rstan on other machines using the same procedure) ; is that a (curious) way for the Stan gang to enforce US national holiday ?
>>
>> Heads, up, someone ?
>>
>> --
>> Emmanuel Charpentier
>>
>> --
>> 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+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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+unsubscribe@googlegroups.com.
> install.packages(c("inline", "Rcpp"), type = "source") trying URL 'http://cran.rstudio.com/src/contrib/inline_0.3.13.tar.gz' Content type 'application/x-gzip' length 14224 bytes (13 Kb) opened URL downloaded 13 Kb trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.2.tar.gz' Content type 'application/x-gzip' length 2004313 bytes (1.9 Mb) opened URL downloaded 1.9 Mb * installing *source* package 'inline' ... ** package 'inline' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded *** arch - i386 *** arch - x64 * DONE (inline) * installing *source* package 'Rcpp' ... ** package 'Rcpp' successfully unpacked and MD5 sums checked ** libs *** arch - i386 Warning: running command 'make -f "Makevars.win" -f "C:/R/R-31~1.1/etc/i386/Makeconf" -f "C:/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 309 ERROR: compilation failed for package 'Rcpp' * removing 'C:/R/R-3.1.1/library/Rcpp' * restoring previous 'C:/R/R-3.1.1/library/Rcpp' Warning in install.packages : running command '"C:/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:\R\R-3.1.1\library" C:\Users\adminbsh\AppData\Local\Temp\RtmpmYE5li/downloaded_packages/Rcpp_0.11.2.tar.gz' had status 1 Warning in install.packages : installation of package ‘Rcpp’ had non-zero exit status The downloaded source packages are in ‘C:\Users\adminbsh\AppData\Local\Temp\RtmpmYE5li\downloaded_packages’
For what it's worth, my Path is set to
c:\Rtools\bin;c:\Rtools\gcc-4.6.3\bin;C:\Program Files (x86)\Common Files\Pervasive Software Shared\pvswcore;C:\PVSW\bin;C:\Oracle\product\11.2.0\client64\bin;C:\Oracle\product\11.2.0\client32\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\eDNA\;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Bazaar;C:\Program Files\ggobi
Do you see anything obvious to pursue?
install_rstan(multiarch = TRUE)
Thanks for trying, but that didn't work either. Here's the trace without running with debug:
> Sys.setenv(MAKEFLAGS = "-j4") > source('http://mc-stan.org/rstan/install.R', echo = TRUE, max.deparse.length = 2000) > install_rstan <- function(multiarch = FALSE) { + on.exit(Sys.unsetenv("R_MAKEVARS_USER")) + on.exit(Sys.unsetenv("R_MAKEVARS_SITE"), add = TRUE) + + try(remove.packages("rstan"), silent = TRUE) + Sys.setenv(R_MAKEVARS_USER = "foobar") + Sys.setenv(R_MAKEVARS_SITE = "foobar") + if(multiarch) install.packages(c("inline", "Rcpp"), type = "source", INSTALL_opts = '--merge-multiarch') + else install.packages(c("inline", "Rcpp"), type = "source") + 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) + test <- try(hellofun()) + if(inherits(test, "try-error")) stop("hello world failed; ask for help on Rcpp list") + + options(repos = c(getOption("repos"), + rstan = "http://rstan.org/repo/")) + if(multiarch) install.packages("rstan", type = 'source', INSTALL_opts = '--merge-multiarch') + else install.packages("rstan", type = 'source') + library(rstan) + set_cppo("fast") + if (any(grepl("^darwin", R.version$os, ignore.case = TRUE))) { + cat('\nCC=clang', 'CXX=clang++ -arch x86_64 -ftemplate-depth-256', + file = "~/.R/Makevars", sep = "\n", append = TRUE) + } + return(invisible(NULL)) + } > install_rstan(multiarch = TRUE) Removing package from ‘C:/R/R-3.1.1/library’ (as ‘lib’ is unspecified) Error in remove.packages : there is no package called ‘rstan’
trying URL 'http://cran.rstudio.com/src/contrib/inline_0.3.13.tar.gz'
Content type 'application/x-gzip' length 14224 bytes (13 Kb)
opened URL
downloaded 13 Kb
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.11.2.tar.gz'
Content type 'application/x-gzip' length 2004313 bytes (1.9 Mb)
opened URL
downloaded 1.9 Mb
install for i386 * installing *source* package 'inline' ... ** package 'inline' successfully unpacked and MD5 sums checked ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** testing if installed package can be loaded install for x64 * installing *source* package 'inline' ... ** package 'inline' successfully unpacked and MD5 sums checked ** testing if installed package can be loaded * DONE (inline) install for i386 * installing *source* package 'Rcpp' ... ** package 'Rcpp' successfully unpacked and MD5 sums checked ** libs Warning: running command 'make -f "Makevars.win" -f "C:/R/R-31~1.1/etc/i386/Makeconf" -f "C:/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="Rcpp.dll" OBJECTS="Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o"' had status 309 ERROR: compilation failed for package 'Rcpp' * removing 'C:/R/R-3.1.1/library/Rcpp' * restoring previous 'C:/R/R-3.1.1/library/Rcpp' Warning: running command 'C:/R/R-31~1.1/bin/i386/Rcmd.exe INSTALL -l C:\R\R-3.1.1\library C:\Users\adminbsh\AppData\Local\Temp\RtmpmYE5li/downloaded_packages/Rcpp_0.11.2.tar.gz --no-multiarch' had status 1 Warning in install.packages : running command '"C:/R/R-31~1.1/bin/x64/R" CMD INSTALL --merge-multiarch -l "C:\R\R-3.1.1\library" C:\Users\adminbsh\AppData\Local\Temp\RtmpmYE5li/downloaded_packages/Rcpp_0.11.2.tar.gz' had status 1 Warning in install.packages : installation of package ‘Rcpp’ had non-zero exit status The downloaded source packages are in ‘C:\Users\adminbsh\AppData\Local\Temp\RtmpmYE5li\downloaded_packages’ Attaching package: ‘Rcpp’ The following object is masked from ‘package:inline’: registerPlugin Warning message: running command 'make -f "C:/R/R-31~1.1/etc/x64/Makeconf" -f "C:/R/R-31~1.1/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="filee8866097f39.dll" WIN=64 TCLBIN=64 OBJECTS="filee8866097f39.o"' had status 309 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 filee8866097f39( ) ; 24: } 25: 26: // definition 27: 28: SEXP filee8866097f39( ){ 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: In addition: Warning message: running command 'C:/R/R-31~1.1/bin/x64/R CMD SHLIB filee8866097f39.cpp 2> filee8866097f39.cpp.err.txt' had status 1> library(rstan) Error in library(rstan) : there is no package called ‘rstan’
Is it a problem with Rcpp (status 309)? My expertise with Rcpp is limited to having installed rstan a few times on Windows and Linux, but I never did anything that required me to interact directly with it. On the Rtools page (https://github.com/stan-dev/rstan/wiki/Install-Rtools-for-Windows), I see two checks, and they seem to work:
> Sys.getenv("PATH") [1] "C:\\R\\R-3.1.1\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;C:\\Program Files (x86)\\Common Files\\Pervasive Software Shared\\pvswcore;C:\\PVSW\\bin;C:\\Oracle\\product\\11.2.0\\client64\\bin;C:\\Oracle\\product\\11.2.0\\client32\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\eDNA\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Bazaar;C:\\Program Files\\ggobi" > system('g++ -v') Using built-in specs. COLLECT_GCC=c:\Rtools\GCC-46~1.3\bin\G__~1.EXE COLLECT_LTO_WRAPPER=c:/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64-mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS= Thread model: win32 gcc version 4.6.3 20111208 (prerelease) (GCC)
Any more ideas?
Bill
--
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.
Thanks for trying, but that didn't work either. Here's the trace without running with debug:
> Sys.getenv('PATH') [1] "C:\\R\\R-3.1.1\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;C:\\cygwin64\\bin;C:\\Program Files (x86)\\Common Files\\Pervasive Software Shared\\pvswcore;C:\\PVSW\\bin;C:\\Oracle\\product\\11.2.0\\client64\\bin;C:\\Oracle\\product\\11.2.0\\client32\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\eDNA\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Bazaar;C:\\Program Files\\ggobi"
and
> system('g++ -v') Using built-in specs. COLLECT_GCC=c:\Rtools\GCC-46~1.3\bin\G__~1.EXE COLLECT_LTO_WRAPPER=c:/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64-mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS= Thread model: win32 gcc version 4.6.3 20111208 (prerelease) (GCC)
?
Bill
Yes, that's how it should look, with Rtools\bin before cyginwin64\bin.
That's been the problem before with users with Cygwin installed
on Windows.
There are instructions for compiling RStan under Cygwin in the
CmdStan manual (those need to move to the RStan doc):
https://github.com/stan-dev/cmdstan/releases/download/v2.3.0/cmdstan-guide-2.3.0.pdf
These are for 64-bit R and 64-bit Cygwin
==================================================================
* Kill all Cygwin bash shells and shut down R.
* After installing R and Rtools, make sure that R and Rtools are in the PATH environment variable. My R installation directory was c:\Program Files\R\R-3.0.1 and my Rtools installation directory was c:\Rtools, so I added the following to the end of my user PATH variable:
* C:\Program Files\R\R-3.0.1\bin\x64
* C:\Rtools\bin
* C:\Rtools\gcc-4.6.3\bin
* Now there could be a conflict between Cygwin and Rtools when running a bash shell under Cygwin, so I added the following lines to my .bash_profile file to remove any PATH directory referencing Rtools:
> TMP=`echo $PATH | /usr/bin/tr ':' '\n' \
| /usr/bin/egrep -iv '^/cygdrive/c/Rtools/' \
| tr '\n' ':'`
> PATH=${TMP%:}
(Note that the backslash characters signal that the line continues after a return.) This was only necessary to allow me to continue using Cygwin.
* Apparently there is something in Rcpp or inline or rstan that doesn't like UNC paths. My home directory was \\server\users\kevinv and apparently this caused my local R library directory to be \server\users\kevinv\R as verified by .libPaths() from the R command prompt.
I fixed this by copying the entire directory tree rooted at \server\users\kevinv\R over to a local directory on my worksta- tion, C:\Users\KevinV\R, then adding the user environment variable R_LIBS_USER=C:\Users\KevinV\R. I shut down R and restarted it.
* At this point the instructions given for installing Rstan finally worked.