pkgbuild::has_build_tools() gives different results in interactive vs. non-interactive use on Mac OS 10.15

I would like to install build tools on Mac OS. I believe all of the necessary tools are installed. Xcode, clang, gfortran are all installed. However pkgbuild::has_build_tools() returns FALSE but only when executed in an interactive R session. When executed as a local job or in a non-RStudio R terminal it returns TRUE. Any idea what is causing this strange behavior?


> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

[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] rstudioapi_0.11   knitr_1.30        rematch2_2.1.2    magrittr_1.5      R6_2.4.1         
 [6] rlang_0.4.8       fansi_0.4.1       tools_4.0.3       pkgbuild_1.1.0    xfun_0.18        
[11] cli_2.1.0         withr_2.3.0       htmltools_0.5.0   ellipsis_0.3.1    assertthat_0.2.1 
[16] digest_0.6.27     rprojroot_1.3-2   tibble_3.0.4      lifecycle_0.2.0   pkgdown_1.6.1    
[21] crayon_1.3.4      processx_3.4.4    purrr_0.3.4       callr_3.5.1       vctrs_0.3.4      
[26] fs_1.5.0          ps_1.4.0          evaluate_0.14     memoise_1.1.0     glue_1.4.2       
[31] rmarkdown_2.5     compiler_4.0.3    pillar_1.4.6      desc_1.2.0        backports_1.1.10 
[36] prettyunits_1.1.1 pkgconfig_2.0.3

@jimhester, is this a bug or am I missing something?

It may be a case of

1 Like

This topic was automatically closed after 45 days. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.