Open jpat34721 opened 8 years ago
You may have to specify
CXX=E:\Rtools\gcc-4.6.3\bin\g++
or something in the file output by
normalizePath("~/.R/Makevars")
Well that helps but now: Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! C:/Users/jpat/Documents/R/win-library/3.3/StanHeaders/include/stan/math/rev/core/set_zero_all_adjoints.hpp:14:17: warning: 'void stan::math::set_zero_all_adjoints()' defined but not used [-Wunused-function] c:/Rtools/mingw_64/bin/nm: not found
On Thu, Oct 13, 2016 at 3:30 PM, Jeffery Patterson <notifications@github.com
wrote:
c:/Rtools/mingw_64/bin/nm: not found
You need to get nm on the path? Does a non-Stan example work, such as the one listed on the wiki:
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , ' return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;' ) fx( 2L, 5 ) # should be 10
If not, try executing once
cat('Sys.setenv(BINPREF = "E:/Rtools/mingw_$(WIN)/bin/")', file = file.path(Sys.getenv("HOME"), ".Rprofile"), sep = "\n", append = TRUE)
Did you set your path correctly? It looks like you haven't and it's trying to find it on the C drive instead of E.
On Thu, Oct 13, 2016 at 3:38 PM, bgoodri notifications@github.com wrote:
On Thu, Oct 13, 2016 at 3:30 PM, Jeffery Patterson < notifications@github.com
wrote:
c:/Rtools/mingw_64/bin/nm: not found
You need to get nm on the path? Does a non-Stan example work, such as the one listed on the wiki:
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , ' return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;' ) fx( 2L, 5 ) # should be 10
If not, try executing once
cat('Sys.setenv(BINPREF = "E:/Rtools/mingw_$(WIN)/bin/")', file = file.path(Sys.getenv("HOME"), ".Rprofile"), sep = "\n", append = TRUE)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/340#issuecomment-253616373, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_FzylNbSr-lSlKv2jri10Y1zfAwmGks5qzoiogaJpZM4KWBhY .
"Did you set your path correctly? "
Sys.getenv("PATH") [1] "C:\Program Files\R\R-3.3.1\bin\x64;E:\Rtools\bin;E:\Rtools\gcc-4.6.3\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Insightful\splus70\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Agilent\IO Libraries Suite\bin;C:\Program Files\IVI Foundation\VISA\Win64\agvisa;C:\Program Files\IVI Foundation\VISA\Win64\bin;C:\Program Files (x86)\Agilent\IO Libraries Suite\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\agvisa;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\bin;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin\;C:\Program Files\IVI Foundation\VISA\Win64\Bin\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MATLAB\R2015b\runtime\win64;C:\Program Files\MATLAB\R2015b\bin;E:\Matlab\runtime\win64;C:\Program Files\MATLAB\R2015b\bin\win64;C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v710\runtime\win32;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v716\runtime\win32;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Sennheiser\SoftphoneSDK\;C:\Users\jpat.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin;C:\Users\jpat.dnx\bin;E:\Users\jpat\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\;C:\questasim64_10.5\win64;C:\Users\jpat\AppData\Roaming\Dashlane\4.2.0.13076\bin\Firefox_Extension{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\jpat\AppData\Roaming\npm;C:\Users\jpat\bin"
After setting .Rprofile per above:
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) , ' return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;' )
e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-33~1.1/bin/x64/R.dll when searching for -lR e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-33~1.1/bin/x64/R.dll when searching for -lR e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lR collect2: ld returned 1 exit status
Definitely looks like it's on the path. Damn. I was hoping that solved it.
Quick question: did you restart R after installing RTools? R doesn't pick up the changes to the path until you restart the session.
Those are the most common installation issues. If it's not that, then... do you have a full install of RTools on your E drive? I don't really see a problem with how it's being called.
What version of Windows? What version of R? Is it possible that there are permissions issues with using the E drive from R?
On Thu, Oct 13, 2016 at 4:02 PM, Jeffery Patterson <notifications@github.com
wrote:
After setting .Rprofile per above:
fx <- inline::cxxfunction( signature(x = "integer", y = "numeric" ) ,
- ' return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;' ) e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6. 3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-33~1.1/bin/x64/R.dll when searching for -lR e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6. 3/../../../../i686-w64-mingw32/bin/ld.exe: skipping incompatible C:/PROGRA~1/R/R-33~1.1/bin/x64/R.dll when searching for -lR e:/rtools/gcc-4.6.3/bin/../lib/gcc/i686-w64-mingw32/4.6. 3/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lR collect2: ld returned 1 exit status
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/340#issuecomment-253622735, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_FzcRKWfIs2xlxQsT1JCCmZEkAd4aks5qzo5IgaJpZM4KWBhY .
Im having this problem as well. PATH is set correctly and everything. Tried restarting and everything. Rstudio itself is installed on that drive, as well as the files I'm trying to run. Tried executing as admin to be really sure, that didn't help either. It seems to look for the tools in the default installation directory.
EEDIT: I think I fixed this - the quick install tutorial at https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows#toolchain tells you to Sys.setenv the rtools in .Rprofile - it uses the default installation path! So -10 points to hufflepuff for not reading through that code snippet attentively, I guess. The guide probably might do with a sentence saying to adapt it.
I'm still getting a syntax error for an unexpected "(" which I don't get if I use the default path. I suspect this is due to the parentheses in "Program Files (x86)", but escaping them doesn't work, and neither does changing the folder to X:/Program Files/Rtools/mingw_64, because then it can't find "X/Program:" and I have less than no cue where that colon comes from, so I'm just gonna give in and put Rtools on the default path until I find a goat I can sacrifice to someone.
Can you write out your PATH environment variable?
Does your Rtools version match R's version?
On Wed, Jan 11, 2017 at 12:52 PM, Chevron9 notifications@github.com wrote:
Im having this problem as well. PATH is set correctly and everything. Tried restarting and everything. Rstudio itself is installed on that drive, as well as the files I'm trying to run. Tried executing as admin to be really sure, that didn't help either. It seems to look for the tools in the default installation directory.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stan-dev/rstan/issues/340#issuecomment-271940679, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZ_F8pOOlgD0ur5x-o477cQeZIa_gnbks5rRRbdgaJpZM4KWBhY .
Running R 3.3.2 and rtools 34
my path is
X:\Program Files (x86)\Rtools\bin;X:\Program Files (x86)\Rtools\mingw_64\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\;X:\Program Files\Calibre2\;X:\Program Files (x86)\MiKTeX\miktex\bin\
Your path doesn't look right. And the rtools version doesn't match the R version. Can you go through the instructions on the RStan page for installation carefully?
On Jan 12, 2017, at 4:32 AM, Chevron9 notifications@github.com wrote:
Running R 3.3.2 and rtools 34
my path is X:\Program Files (x86)\Rtools\bin;X:\Program Files (x86)\Rtools\mingw_64\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Skype\Phone\;X:\Program Files\Calibre2\;X:\Program Files (x86)\MiKTeX\miktex\bin\
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
https://cran.r-project.org/bin/windows/Rtools/ says that the version of Rtools to use for R 3.3.x is 34.
the path is also the same the installer provided with only the 32 changed to a 64.
Summary:
I have Rtools installed on my e drive. executing the stan(..) method from RStudio fails
Description:
executing the following line at the Rsudio prompt
gives
c:/Rtools/mingw_64/bin/g++: not found
Please report steps to reproduce the issue. If it's not possible to reproduce, please include a description of how you discovered the issue.
If you have a reproducible example, please include it.
Current Output:
If applicable, any relevant output from RStan.
Expected Output:
If applicable, the output you expected from RStan.
RStan Version:
version.string R version 3.3.1 (2016-06-21) nickname Bug in Your Hair
Operating System:
Windows 7