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
invalid version check by installBuildTools on Mac OS #4175
Comments
|
Clarifying that the bug is visible in an RStudio session: |
|
This works on my Mojave machine: Have you installed the system headers for Mojave? https://stackoverflow.com/questions/53169970/where-are-the-c-headers-in-macos-mojave |
|
(I saw that was recommended on the linked discussion in |
|
As noted in r-lib/pkgbuild#63, the culprit for me was a lingering So now I get: I'll leave this issue open for now, as I still think it is bizarre to be checking |
|
I have full Xcode 12.0 beta installed and this has been happening consistently for me: $ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ sw_vers -productVersion
11.0RStudio.Version()$version
## [1] ‘1.4.687’If in RStudio and I, say, try to do: install_github("r-lib/vctrs")I get: plus: rstudioapi::buildToolsCheck()
## [1] FALSEIf I drop to iTerm and startup R the install works fine: install_github("r-lib/vctrs")
Using github PAT from envvar GITHUB_PAT
Downloading GitHub repo r-lib/vctrs@master
checking for file ‘/private/var/folders/r_/8gkkj9d57739wtr_wn1gv_hm0000gn/T/Rtmp34UCc4/remotes26b54402cc64/r-lib-vctrs-1b3cd7c/DESCRIPTION’ ✔ checking for file ‘/private/var/folders/r_/8gkkj9d57739wtr_wn1gv_hm0000gn/T/Rtmp34UCc4/remotes26b54402cc64/r-lib-vctrs-1b3cd7c/DESCRIPTION’
─ preparing ‘vctrs’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ installing the package to process help pages
…And, cat ~/.R/Makevars
CC=clang
CXX=clang++Of note (and, unsurprisingly?): fails miserably as well (and doesn't debug anything). but (surprisingly?) pkgbuild::has_compiler(debug = TRUE)
## Running /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB \
foo.c
## clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c foo.c -o foo.o
## clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o foo.so foo.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
##
## [1] TRUEso it kinda looks like some sort of "perhaps RStudio should really dig into this and fix it universally" effort might be needed. If I can carve out any time I'll see what |
|
This is where RStudio detects if macOS command line tools are installed: rstudio/src/cpp/session/SessionModuleContext.cpp Lines 2735 to 2742 in ece340b
Does this need to change to accommodate macOS Big Sur? (Maybe we need to be running Does |
|
It should probably check for either the straight command line tools or the ones that come along for the ride with Xcode 12, now (for the first few months of Big Sur there was no separate command line tools install and the ones that come with Xcode, now, are the same, so no need for another installation if one has full Xcode). |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions. |
|
This issue has been automatically closed due to inactivity. |
|
The problem is still here. I am experiencing what @hrbrmstr did. My C++ code has no problems and I can install other packages. For some reason, I cannot build my own package. I have everything installed in terms of both Xcode and Command Line Tools. Can you suggest or hint what is wrong? This is my current R session info. sessionInfo()
#> R version 4.0.4 (2021-02-15)
#> Platform: x86_64-apple-darwin17.0 (64-bit)
#> Running under: macOS Catalina 10.15.7
#>
#> Matrix products: default
#> BLAS: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
#>
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] digest_0.6.27 assertthat_0.2.1 magrittr_2.0.1 reprex_1.0.0
#> [5] evaluate_0.14 highr_0.8 stringi_1.5.3 rlang_0.4.10
#> [9] cli_2.3.1 rstudioapi_0.13 fs_1.5.0 rmarkdown_2.7
#> [13] tools_4.0.4 stringr_1.4.0 glue_1.4.2 xfun_0.22
#> [17] yaml_2.2.1 compiler_4.0.4 htmltools_0.5.1.1 knitr_1.31Created on 2021-03-27 by the reprex package (v1.0.0) UPDATEAlso, everything works just fine from terminal. I can do UPDATE 2For some other reason, I can do |

System details
Steps to reproduce the problem
Describe the problem in detail
I believe that I have build tools installed, with XCode and the command line interface.
However,
rstudioapi::buildToolsCheck()returnsFALSE, and I am unable to use devtools to install a package that needs compiling.checkBuildToolsis testing foridentical(.Platform$pkgType, "mac.binary.mavericks")However,
mac.binary.mavericksis not a value that is ever obtained.My real issue is with
installBuildToolsalways just showing the CNET page. Since this is testingisOSXMavericks(), I suspect the trouble may be related to the bug mentioned above.I have followed the suggestions from @jimhester and @kevinushey here: r-lib/devtools#1879, and still had no luck.
Is there a way to test the values returned by
module_context::isOSXMavericks()andmodule_context::hasOSXMavericksDeveloperTools()?Describe the behavior you expected
I expect to be able to use
devtools::install_github, and install packages that need compiling.The text was updated successfully, but these errors were encountered: