Bug 15981 - Unable to start Rscript
Summary: Unable to start Rscript
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R 3.1.1
Hardware: x86_64/x64/amd64 (64-bit) Windows 64-bit
: P5 normal
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2014-09-17 17:04 UTC by Nikolai
Modified: 2014-09-19 17:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolai 2014-09-17 17:04:50 UTC
When R is installed as 64-bit configuration only (with Russian language chosen), attempt to run Rscript.exe returns error:

C:\Users\dlls>"C:\Program Files\R\3.1.1\bin\Rscript.exe" "P:\Dlls Rsr\p0001.r"
The system cannot find the path specified.

As a work-around, option --arch x64 works fine. 

C:\Users\dlls>"C:\Program Files\R\3.1.1\bin\Rscript.exe" --arch x64 "P:\Dlls Rsr\p0001.r"
...expected output follows

It looks like system architecture cannot be resolved properly and 32 bit version is attempted instead but there is no such version installed. 

Found on Windows 7 Professional, Service Pack1, 64-bit version.

Meanwhile, Rgui.exe runs just fine, when called from Start menu.

The problem is severe because it is not so trivial to find out a reason reading "The system cannot find the path specified" with no details provided.
Comment 1 Duncan Murdoch 2014-09-17 17:32:37 UTC
I don't think we can do much about the message:  that comes from Windows.

We can change the installer so that it installs a 64 bit Rscript at that location (or nothing at all) for a 64 bit-only install.

Another workaround is to get Rscript from bin\x64, rather than the common one in bin.  (That's essentially what happens if you run with --arch x64.)
Comment 2 Duncan Murdoch 2014-09-18 13:26:59 UTC
I've made a change to R-devel (in rev 66325, which is included in today's binary build) and R-patched (in rev 66632, which should make tomorrow's) to include the file Rfe.exe in the bin/i386 and bin/x64 directories.  Copy bin/x64/Rfe.exe to bin/Rscript.exe and also to bin/R.exe and you should run 64 bit versions by default.  (It's exactly the same executable for both programs.  Currently bin/Rscript.exe and bin/R.exe are getting the 32 bit version whether you install the rest of the 32 bit stuff or not.)

I'll be changing the installer to handle this automatically, but that probably won't make tomorrow's builds.
Comment 3 Duncan Murdoch 2014-09-19 17:01:19 UTC
I will shortly be committing fixes to the R-devel and R-patched installers.  They will both also receive a behaviour change:  if a 64 bit version of R is installed, it will be the default chosen version when running bin/R or bin/Rscript.