r-lib / pkgbuild

Find tools needed to build R packages
https://pkgbuild.r-lib.org
Other
65 stars 33 forks source link

Should `has_devel()` check for conflicting build tool installations? #145

Closed Aariq closed 1 year ago

Aariq commented 1 year ago

Recently I was unable to install Rcpp and packages that depended on it (and possibly other packages) from source despite has_devel() saying I was good to go.

https://discuss.ropensci.org/t/build-tools-not-working-despite-what-devtools-has-devel-says/3162?u=leafyericscott

I eventually tracked it down to this solution mentioned in the Rcpp issues: https://github.com/RcppCore/Rcpp/issues/1160#issuecomment-834849802

I think I had installed gfortran with homebrew at some point and it was conflicting with another version? My problem was solved by deleting /usr/local/include. I haven't tried to reproduce this yet because I'd rather not screw up my work machine setup again.

Proposed solution:

Should has_devel() look for potentially conflicting installations of build tools?

Alternatives:

Maybe this is an Rcpp-specific issue? From the tone of the responses to Rcpp installation issues, they don't seem to think that's the case and seem unlikely to take any action.

jennybc commented 1 year ago

I agree with the sentiment that it would be good to check for conflicting build tool installations and yet I have no idea of how to go about doing so in a truly useful and maintainable way. The number of ways that people can bork up their system is nearly infinite :sweat_smile: and I don't see devtools signing up for this. I think once one is using a non-CRAN-built R or not using the recommended compilers, you probably are in a "you break it; you own it" situation.

I'll transfer this to pkgbuild, as that's where all the smarts are, but I expect the outcome is #wontfix.