options(repos = c(getOption("repos"),
rstan = "http://rstan.org/repo/"))
install.packages("rstan", type = 'source')Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.0/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.0/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="rstan.dll" ' had status 2
ERROR: compilation failed for package 'rstan'
* removing 'C:/Users/Nadine/Documents/R/win-library/3.2/rstan'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.0/bin/x64/R" CMD INSTALL -l "C:\Users\Nadine\Documents\R\win-library\3.2" C:\Users\Nadine\AppData\Local\Temp\Rtmp8836vh/downloaded_packages/rstan_2.6.0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Nadine\AppData\Local\Temp\Rtmp8836vh\downloaded_packages’> hellofun()
[1] "hello" "world"> find_rtools(TRUE)
Scanning path...
ls : C:\Users\Nadine\DOCUME~1\R\WIN-LI~1\3.2\Rtools\bin\ls.exe
gcc: C:\Users\Nadine\DOCUME~1\R\WIN-LI~1\3.2\Rtools\GCC-46~1.3\bin\gcc.exe
VERSION.txt
Rtools version 3.3.0.1958
Version: 3.3
[1] TRUE
> system('g++ -v')
Using built-in specs.
COLLECT_GCC=C:\Users\Nadine\DOCUME~1\R\WIN-LI~1\3.2\Rtools\GCC-46~1.3\bin\G__~1.EXE
COLLECT_LTO_WRAPPER=c:/users/nadine/docume~1/r/win-li~1/3.2/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)
>
> system('make -v')
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-cygwin
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
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.
Report bugs to <bug-make@gnu.org>.> Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.2.0\\bin\\x64;
C:\\Users\\Nadine\\Documents\\R\\win-library\\3.2\\Rtools\\bin;C:\\Users\\Nadine\\Documents\\R\\win-library\\3.2\\Rtools\\gcc-4.6.3\\bin;
C:\\Users\\Nadine\\Documents\\R\\win-library\\3.1\\Rtools\\bin;
C:\\Users\\Nadine\\Documents\\R\\win-library\\3.1\\Rtools\\gcc-4.6.3\\bin;C:\\Program Files\\R\\R-3.1.0\\Rtools\\bin;
C:\\Program Files\\R\\R-3.1.0\\Rtools\\gcc-4.6.3\\bin;c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;
C:\\ProgramData\\Oracle\\Java\\javapath;
C:\\Program Files\\Common Files\\Microsoft Shared\\Windows Live;
C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\Windows Live;
C:\\Windows\\System32;
C:\\Windows;C:\\Windows\\System32\\wbem;
C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;
C:\\Program Files (x86)\\Windows Live\\Shared"I am at a loss of what to do to get STAN to install. I have tried everything that I can think of. I am not well versed in C++. I have R version 3.2.0 (2015-04-16) -- "Full of Ingredients" and Rtools 3.3 installed. I have a Windows 7 operating system. All packages are also in the most updated form.
devtools::install_url("http://cran.r-project.org/src/contrib/Archive/BH/BH_1.55.0-3.tar.gz")
devtools::install_url("https://github.com/stan-dev/rstan/releases/download/v2.6.0/rstan_2.6.0.tar.gz")
library(rstan)
set_cppo("fast")
devtools::install_url("https://github.com/stan-dev/rstan/releases/download/v2.6.0/rstan_2.6.0.tar.gz",dependencies = FALSE)
library(rstan)
set_cppo("fast")...
Can anybody suggest how to resolve this issue on a Win 7 machine? The devtools workaround didn't work:
devtools::install_url("http://cran.r-project.org/src/contrib/Archive/BH/BH_1.55.0-3.tar.gz")
Downloading package from url: http://cran.r-project.org/src/contrib/Archive/BH/BH_1.55.0-3.tar.gz
Error: Does not appear to be an R package (no DESCRIPTION)
download rstan from https://github.com/stan-dev/rstan/releases/download/v2.6.0/rstan_2.6.0.tar.gz
install.packages ("devtools")
library (devtools)
devtools::install_local ("c:/Tools/BH.zip")
install.packages (inline)
library (inline)
install.packages ("RcppEigen")
library (RcppEigen)
devtools::install_local ("c:/Tools/rstan.zip", dependencies = FALSE)
Thanks,
Linas