Skip to content

[r] Resolve interaction between ccache and package build #1807

@johnkerl

Description

@johnkerl

Follow-on from chanzuckerberg/cellxgene-census#809.

Repro:

docker run --rm -ti eddelbuettel/r2u:jammy
apt-get update
apt-get install -y cmake git ccache

Rscript -e 'install.packages("tiledbsoma", repos = c("https://tiledb-inc.r-universe.dev", "https://cloud.r-project.org"))'
Rscript -e 'update.packages(ask=FALSE)'
Rscript -e 'remotes::install_github(repo="TileDB-Inc/[email protected]")'
Rscript -e 'tiledbsoma::show_package_versions()'

If ~/.R/Makevars does not exist, or lacks ccache lines, this works as intended. However, in the following scenario

$ cat ~/.R/Makevars
#VER=-13
CCACHE=ccache
CC=$(CCACHE) gcc$(VER)
CXX=$(CCACHE) g++$(VER)
CXX11=$(CCACHE) g++$(VER) #-std=c++11
CXX14=$(CCACHE) g++$(VER) #-std=c++14
CXX17=$(CCACHE) g++$(VER) #-std=c++17

then

Rscript -e 'install.packages("tiledbsoma", repos = c("https://tiledb-inc.r-universe.dev", "https://cloud.r-project.org"))'

results in a compile error at the spdlog step which includes

  The C compiler

    "/usr/bin/ccache"

  is not able to compile a simple test program.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions