r-hub / containers

Docker containers for R-hub
https://r-hub.github.io/containers/
15 stars 4 forks source link

Errors installing packages on clang17 #38

Closed rogerssam closed 1 year ago

rogerssam commented 1 year ago

Hi, not sure if this is the correct place to direct this issue to, but hopefully you can point me in the right direction at least? I'm attempting to debug clang17 issues raised by CRAN on a colleague's package. I can't manage to get a working build image though, because a dependency spam doesn't compile successfully under the clang17 image. The CRAN page doesn't seem to list any problems with the spam package under clang17 so presumably it compiles and installs properly on their system?

Attached is the error output from running:

docker run -v `pwd`/check:/check ghcr.io/r-hub/containers/clang17:latest r-check

Any help is much appreciated and thank you so much for the work you do in providing these images!

spam_install_errors.txt

gaborcsardi commented 1 year ago

I think they probably compile spam with another, older compiler, and you can do the same as a workaround. I had the same issue with another package (rgl) where they reported errors for rgl but not for a dependency.

Another, actually more likely, possibility is that spam is a soft dependency, so it is not actually needed for you for this fix, but r-check is trying to run a full R CMD check, which also means installing soft dependencies.

So I would run the container interactively, download the package you are trying to fix, install the hard dependencies with pak::local_install_deps() and then install and fix your package.

rogerssam commented 1 year ago

Great, thank you. I'll give that a try.

rogerssam commented 1 year ago

Thanks again for your help! Managed to sort it out by mounting a host-installed spam package and getting through the check 👍