Dieter Menne
2011-Jul-24 08:09 UTC
[R] inline/Rcpp: Problem with space in path under Windows
I am trying to run inline/Rcpp under Windows 64. The RTools are installed on a spaceless path D:\rtools. Inlining pure c-code works perfectly. When I try the sample code for cpp in the cxx Documentation, I get: x86_64-w64-mingw32-g++.exe: C:/Program: No such file or directory The path to the compiler is correct. Obviously there is some problem with the space in C:/Program (Files). Any ideas where to look for the settings that caused the failure? Dieter -------- R version 2.13.0 (2011-04-13) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C [5] LC_TIME=German_Germany.1252 attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] Rcpp_0.9.5 inline_0.3.8 loaded via a namespace (and not attached): [1] tools_2.13.0>-- View this message in context: http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3689982.html Sent from the R help mailing list archive at Nabble.com.
Dirk Eddelbuettel
2011-Jul-24 11:14 UTC
[R] inline/Rcpp: Problem with space in path under Windows
Hi Dieter, Thanks for your interest in Rcpp. We generally prefer questions about Rcpp / RInside / ... on the rcpp-devel list. On 24 July 2011 at 01:09, Dieter Menne wrote: | I am trying to run inline/Rcpp under Windows 64. The RTools are installed on | a spaceless path D:\rtools. | | Inlining pure c-code works perfectly. When I try the sample code for cpp in | the cxx Documentation, I get: | | x86_64-w64-mingw32-g++.exe: C:/Program: No such file or directory | | The path to the compiler is correct. Obviously there is some problem with | the space in C:/Program (Files). | | Any ideas where to look for the settings that caused the failure? Rcpp and its related packages expand $(R_HOME) et al to build arguments assigned to PKG_CXXFLAGS and PKG_LIBS, either via environment variables (in the case of the 'inline' package) or via arguments in Makevars and Makevars.win. We need to quote strings etc, and unfortunately it seems to break once you have space in there --- presumably from installing R itself in a path with spaces. As I recall, the R-Windows FAQ recommends against it too. as spaces in filenames are not supported. I know of no other fix than to move your R installation. Or to manually rewrite the installation / build snippets. Things will compile and link, you "just" need to re-build all the Makevars.win etc scripts to use absolute paths, possibly with 8.3 notation. Sorry, Dirk | Dieter | -------- | | R version 2.13.0 (2011-04-13) | Platform: x86_64-pc-mingw32/x64 (64-bit) | | locale: | [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 | [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C | [5] LC_TIME=German_Germany.1252 | | attached base packages: | [1] stats graphics grDevices datasets utils methods base | | other attached packages: | [1] Rcpp_0.9.5 inline_0.3.8 | | loaded via a namespace (and not attached): | [1] tools_2.13.0 | > | | -- | View this message in context: http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3689982.html | Sent from the R help mailing list archive at Nabble.com. | | ______________________________________________ | R-help at r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-help | PLEASE do read the posting guide http://www.R-project.org/posting-guide.html | and provide commented, minimal, self-contained, reproducible code. -- Gauss once played himself in a zero-sum game and won $50. -- #11 at http://www.gaussfacts.com
Dieter Menne
2011-Jul-24 14:12 UTC
[R] inline/Rcpp: Problem with space in path under Windows
Hi, Dirk, Dirk Eddelbuettel wrote:> > > Thanks for your interest in Rcpp. We generally prefer questions about > Rcpp / RInside / ... on the rcpp-devel list. >I know that list, but I was not sure if Path-questions are part of "devel". Dirk Eddelbuettel wrote:> > ... presumably from installing R itself in a path with spaces. As I > recall, the R-Windows FAQ recommends against it too. as spaces in > filenames are not supported. >Rtools and friends must be in spaceless paths, but the installation of R into the String-Path is the default I do not want to change without reason. Dirk Eddelbuettel wrote:> > I know of no other fix than to move your R installation. Or to manually > rewrite the installation / build snippets. Things will compile and link, > you "just" need to re-build all the Makevars.win etc scripts to use > absolute paths, possibly with 8.3 notation. >But things work Ok with vanilla c. I had already started fiddling with Makevars, but I stopped, thinking I had missed something obvious. Thanks, Dirk. Hope to see you in Coventry. Dieter -- View this message in context: http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3690306.html Sent from the R help mailing list archive at Nabble.com.
Richard M. Heiberger
2011-Jul-24 19:26 UTC
[R] inline/Rcpp: Problem with space in path under Windows
All Windows files have an equivalent 8.3 name without spaces. It may differ on different machines and countries. You find them by typing dir/x in the cmd window. In the US English, the equivalences usually are c:\>cd c:/ c:\>dir /x Pr* Volume in drive C is Windows7_OS Volume Serial Number is 1E6B-37CE Directory of c:\ 06/09/2011 02:35 PM <DIR> PROGRA~1 Program Files 07/20/2011 08:35 PM <DIR> PROGRA~2 Program Files (x86) 0 File(s) 0 bytes 2 Dir(s) 360,981,925,888 bytes free c:\> Now we know that 64-bit R is located (in forward slash notation as used by R) at c:/Progra~1/R/R-2.13.1/bin/x64/R.exe Rich On Sun, Jul 24, 2011 at 4:09 AM, Dieter Menne <dieter.menne@menne-biomed.de>wrote:> I am trying to run inline/Rcpp under Windows 64. The RTools are installed > on > a spaceless path D:\rtools. > > Inlining pure c-code works perfectly. When I try the sample code for cpp in > the cxx Documentation, I get: > > x86_64-w64-mingw32-g++.exe: C:/Program: No such file or directory > > The path to the compiler is correct. Obviously there is some problem with > the space in C:/Program (Files). > > Any ideas where to look for the settings that caused the failure? > > Dieter > -------- > > R version 2.13.0 (2011-04-13) > Platform: x86_64-pc-mingw32/x64 (64-bit) > > locale: > [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 > [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C > [5] LC_TIME=German_Germany.1252 > > attached base packages: > [1] stats graphics grDevices datasets utils methods base > > other attached packages: > [1] Rcpp_0.9.5 inline_0.3.8 > > loaded via a namespace (and not attached): > [1] tools_2.13.0 > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3689982.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Prof Brian Ripley
2011-Jul-24 20:55 UTC
[R] inline/Rcpp: Problem with space in path under Windows
On Sun, 24 Jul 2011, Richard M. Heiberger wrote:> All Windows files have an equivalent 8.3 name without spaces. It may differ > on different machines > and countries. You find them by typing dir/x in the cmd window.Or by shortPathName() in R. But that does not help if R itself is generating the name (here I guess .Library). R on Windows used almost always to generate 8.3 (aka DOS) names, but since useRs are nowadays confused by them it increasingly quotes canonical names. Spaces in names are not unique to Windows: they are also common on Mac OS X (which has no concept of 8.3 names). The problem (as the rw-FAQ points out) is poorly written packages that fail to use quotes in shell command lines (including those generated from makefiles).> In the US English, the equivalences usually are > > c:\>cd c:/ > c:\>dir /x Pr* > Volume in drive C is Windows7_OS > Volume Serial Number is 1E6B-37CE > Directory of c:\ > 06/09/2011 02:35 PM <DIR> PROGRA~1 Program Files > 07/20/2011 08:35 PM <DIR> PROGRA~2 Program Files (x86) > 0 File(s) 0 bytes > 2 Dir(s) 360,981,925,888 bytes free > c:\> > > Now we know that 64-bit R is located (in forward slash notation as used by > R) at > c:/Progra~1/R/R-2.13.1/bin/x64/R.exe > > Rich > > > On Sun, Jul 24, 2011 at 4:09 AM, Dieter Menne > <dieter.menne at menne-biomed.de>wrote: > >> I am trying to run inline/Rcpp under Windows 64. The RTools are installed >> on >> a spaceless path D:\rtools. >> >> Inlining pure c-code works perfectly. When I try the sample code for cpp in >> the cxx Documentation, I get: >> >> x86_64-w64-mingw32-g++.exe: C:/Program: No such file or directory >> >> The path to the compiler is correct. Obviously there is some problem with >> the space in C:/Program (Files). >> >> Any ideas where to look for the settings that caused the failure? >> >> Dieter >> -------- >> >> R version 2.13.0 (2011-04-13) >> Platform: x86_64-pc-mingw32/x64 (64-bit) >> >> locale: >> [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 >> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C >> [5] LC_TIME=German_Germany.1252 >> >> attached base packages: >> [1] stats graphics grDevices datasets utils methods base >> >> other attached packages: >> [1] Rcpp_0.9.5 inline_0.3.8 >> >> loaded via a namespace (and not attached): >> [1] tools_2.13.0 >>> >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/inline-Rcpp-Problem-with-space-in-path-under-Windows-tp3689982p3689982.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Apparently Analagous Threads
- Setting up a windows system for rcpp
- Crash of latticeExtra graph with Adobe Acro Pro/Reader/Windows/ during print only (display ok).
- Accessing data via url
- + and - in RODBC : no longer considered factors
- How to prevent inclusion of intercept in lme with interaction