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

Rtools not found #15

Closed
dalonsoa opened this issue Oct 23, 2024 · 1 comment · Fixed by #19
Closed

Rtools not found #15

dalonsoa opened this issue Oct 23, 2024 · 1 comment · Fixed by #19

Comments

@dalonsoa
Copy link

When running devtools::check(), things start well, but then there's an error about Rtools:

══ Building ══════════════════════════════════════════════════════════════════
Setting env vars:
• CFLAGS    : -Wall -pedantic
• CXXFLAGS  : -Wall -pedantic
• CXX11FLAGS: -Wall -pedantic
• CXX14FLAGS: -Wall -pedantic
• CXX17FLAGS: -Wall -pedantic
• CXX20FLAGS: -Wall -pedantic
── R CMD build ───────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\dalonsoa\Projects\csvyr/DESCRIPTION' (960ms)
─  preparing 'csvyr': (933ms)
✔  checking DESCRIPTION meta-information
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted 'LazyData' from DESCRIPTION
─  building 'csvyr_0.1.0.tar.gz'
   
══ Checking ══════════════════════════════════════════════════════════════════
Setting env vars:
• _R_CHECK_CRAN_INCOMING_REMOTE_               : FALSE
• _R_CHECK_CRAN_INCOMING_                      : FALSE
• _R_CHECK_FORCE_SUGGESTS_                     : FALSE
• _R_CHECK_PACKAGES_USED_IGNORE_UNUSED_IMPORTS_: FALSE
• NOT_CRAN                                     : true
trying URL 'https://cran.rstudio.com/bin/windows/Rtools/rtools44/files/rtools44-6104-6039.exe'
Content type 'application/x-msdownload' length 449027200 bytes (428.2 MB)
downloaded 428.2 MB

Error: Could not find tools necessary to compile a package
Call `pkgbuild::check_build_tools(debug = TRUE)` to diagnose the problem.

Then, after a while, it automatically launches the installation of Rtools after asking for user's approval. Installation takes a while but seems to conclude without any issues. Then, I re-run devtools::check() that ends up with the License note, as expected:

── R CMD check results ────────────────────────────────────── csvyr 0.1.0 ────
Duration: 19.4s

❯ checking DESCRIPTION meta-information ... NOTE
  Non-standard licence specification:
    What license is it under?
  Standardisable: FALSE

0 errors ✔ | 0 warnings ✔ | 1 note ✖

I had a fresh installation of R, so probably this is not really an issue for someone who has used R already, but it might be worrying for newbies. I'd suggest an explanation that something like this might happen.

@SaranjeetKaur
Copy link
Collaborator

Oh yes - good spot! This is required when working on a package for the first time. I guess I didn't come across it because I had it installed previously.

Will add the instructions for the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants