Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Missing" R-Tools in Windows #426

Closed
dmenne opened this issue Feb 14, 2014 · 14 comments
Closed

"Missing" R-Tools in Windows #426

dmenne opened this issue Feb 14, 2014 · 14 comments

Comments

@dmenne
Copy link

dmenne commented Feb 14, 2014

One one Windows computer, the R-tools where reported missing even if they where there for sure.

install_path <- dirname(dirname(ls_path))
install_path2 <- dirname(dirname(dirname(gcc_path)))
if (install_path2 != install_path) 
  return(NULL)

install_path: D:/Rtools
install_path2: d:/Rtools

These paths (note the D: and d:) are equivalent under Windows, but the test fails. Maybe

http://www.boost.org/doc/libs/1_53_0/libs/filesystem/doc/reference.html#equivalent

@hadley
Copy link
Member

hadley commented Feb 14, 2014

I can fix that with normalizePath(). @jjallaire might also need to the RStudio code.

@dmenne
Copy link
Author

dmenne commented Feb 14, 2014

Nope, I had tried that:

> normalizePath("d:/rtools/bin")
[1] "d:\\Rtools\\bin"
> normalizePath("D:/rtools/bin")
[1] "D:\\Rtools\\bin"

@hadley
Copy link
Member

hadley commented Feb 14, 2014

Grrr, the docs say "It will match paths case-insensitively and return the canonical case."

hadley added a commit that referenced this issue Mar 18, 2014
@hadley
Copy link
Member

hadley commented Mar 18, 2014

Would you mind trying again with this version?

devtools::build_github_devtools()

#### Restart R before continuing ####
install.packages("devtools.zip", repos = NULL)

# Remove the package after installation
unlink("devtools.zip")

@dmenne
Copy link
Author

dmenne commented Mar 18, 2014

Lost in compilation .... Some problem with export of to_lower?
This was run in RStudio for easer copy/paste, but same error in rterm.

> build_github_devtools()
Downloading devtools from https://github.com/hadley/devtools/archive/master.zip
"D:/R/R/bin/i386/R" --vanilla CMD INSTALL "C:\Users\Dieter\AppData\Local\Temp\RtmpCGNnZo\devtools-master" --build 

* installing to library 'D:/R/R/library'
* installing *source* package 'devtools' ...
** libs

*** arch - i386
gcc -m32 -I"D:/R/R/include" -DNDEBUG     -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c devtools.c -o devtools.o
gcc -m32 -shared -s -static-libgcc -o devtools.dll tmp.def devtools.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LD:/R/R/bin/i386 -lR
installing to D:/R/R/library/devtools/libs/i386
Warning in file.copy(files, dest, overwrite = TRUE) :
  problem copying .\devtools.dll to D:\R\R\library\devtools\libs\i386\devtools.dll: Permission denied

*** arch - x64
gcc -m64 -I"D:/R/R/include" -DNDEBUG     -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O2 -Wall  -std=gnu99 -mtune=core2 -c devtools.c -o devtools.o
gcc -m64 -shared -s -static-libgcc -o devtools.dll tmp.def devtools.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LD:/R/R/bin/x64 -lR
installing to D:/R/R/library/devtools/libs/x64
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
*** arch - i386
Error : .onAttach failed in attachNamespace() for 'devtools', details:
  call: scan_path_for_rtools(debug)
  error: could not find function "to_lower"
Error: loading failed
Execution halted
*** arch - x64
Error : .onAttach failed in attachNamespace() for 'devtools', details:
  call: scan_path_for_rtools(debug)
  error: could not find function "to_lower"
Error: loading failed
Execution halted
ERROR: loading failed for 'i386', 'x64'
* removing 'D:/R/R/library/devtools'
* restoring previous 'D:/R/R/library/devtools'
Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE) :
  problem copying D:\R\R\library\00LOCK-devtools-master\devtools\libs\i386\devtools.dll to D:\R\R\library\devtools\libs\i386\devtools.dll: Permission denied

R version 3.0.3 (2014-03-06)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_1.4.1.99

loaded via a namespace (and not attached):
 [1] digest_0.6.4   evaluate_0.5.1 fortunes_1.5-2 httr_0.2       memoise_0.1    parallel_3.0.3 RCurl_1.95-4.1
 [8] stringr_0.6.2  tools_3.0.3    whisker_0.3-2 
>

@dmenne
Copy link
Author

dmenne commented Mar 18, 2014

Same error when installed from Github and built in RStudio

==> Rcmd.exe INSTALL --no-multiarch --with-keep.source devtools

* installing to library 'D:/R/R/library'
* installing *source* package 'devtools' ...
** libs
gcc -m32 -I"D:/R/R/include" -DNDEBUG     -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O3 -Wall  -std=gnu99 -mtune=core2 -c devtools.c -o devtools.o
gcc -m32 -shared -s -static-libgcc -o devtools.dll tmp.def devtools.o -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386 -Ld:/RCompile/CRANpkg/extralibs64/local/lib -LD:/R/R/bin/i386 -lR
installing to D:/R/R/library/devtools/libs/i386
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error : .onAttach failed in attachNamespace() for 'devtools', details:
  call: scan_path_for_rtools(debug)
  error: could not find function "to_lower"
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'D:/R/R/library/devtools'
* restoring previous 'D:/R/R/library/devtools'

Exited with status 1.

@hadley
Copy link
Member

hadley commented Mar 18, 2014

Sorry, try again, that was a dumb thinko.

@dmenne
Copy link
Author

dmenne commented Mar 18, 2014

Are you sure you pushed? Have to go, will try tomorrow.

@hadley
Copy link
Member

hadley commented Mar 18, 2014

Ooops, only fixed problem in one place. Try now.

@dmenne
Copy link
Author

dmenne commented Mar 18, 2014

Compiles, builds fine now, but (warning only):

** testing if installed package can be loaded
*** arch - i386
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
*** arch - x64
WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
* MD5 sums

@hadley
Copy link
Member

hadley commented Mar 18, 2014

That's just during R CMD check?

@dmenne
Copy link
Author

dmenne commented Mar 19, 2014

Sorry, I was on the run and did not check carefully. All good now.

@woodhaha
Copy link

Thanks @hadley @dmenne
I have tried many times intalling the pkg "devtools" from GitHub on my windows10(x+64),and finally successed.
Fllowing the steps

  1. Upgrade the java devlopment enviroment on my win10 ( http://www.oracle.com/technetwork/java/javase/downloads/index.html) install "Java SE 8u131"(Java Platform, Standard Edition)
    and then configuring the developing enviroment on java control panel, setting the java runtime for related Apps

  2. Install "Rtools34" in (Path C:\Rtools),then select components(R toolset,Cygwin DLLs, R3.3.x+64 bit toolchain,Extras to build 64bit R)

  3. Install “cygwin setup-x86_64” comfiguring the linux devlopment enviroment

  4. Install "basic-miktex-2.9.6236-x64"

  5. Restart your windows system, then in RStudio configuring Rtools developing enviroment by using the function:
    normalizePath("C:/Rtools/bin")
    and lastly using
    devtools::build_github_devtools() ## to install the Github devtools pkg"devtools_1.12.0.9000.zip"#

@lock
Copy link

lock bot commented Sep 18, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Sep 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants