ccache 失败且只读

Bra*_*han 4 android ccache

我正在 ubuntu 机器上构建 android 10。来源是自定义的,而不是谷歌专门提供的。源代码是硬编码的,以便预构建 clang 使用 ccache。我已经安装了 ccache 并将这些变量添加到 bashrc 中:

_CCACHE_EXEC=/usr/bin/ccache

_CCACHE_EXEC-M 50G

导出 USE_CCACHE=1

chmod 和 chown the ~/.ccache 在构建过程中具有相同的结果,实际错误是:

ccache:错误:无法创建目录 /home/brandonabandon/.ccache/tmp:只读文件系统。

我无法联系到来源的所有者。我尝试禁用 ccache,这会由于最近的硬编码 ccache 提交而进一步导致错误。我以前可以建造得很好。我被难住了一个星期了。有任何想法吗?

小智 13

看来您的 ccache 与源代码位于同一分区。soong沙箱机制不喜欢它:(你有两个选择:

  1. 开始使用另一个分区/驱动器作为 ccache
  2. 将当前的 ccache 挂载到另一个分区(例如 /mnt)

以下是第二个选项的步骤列表:

sudo mkdir /mnt/ccache
sudo mount --bind /home/<your_current_path>/ccache /mnt/ccache
Run Code Online (Sandbox Code Playgroud)

并需要环境:

sudo mkdir /mnt/ccache
sudo mount --bind /home/<your_current_path>/ccache /mnt/ccache
Run Code Online (Sandbox Code Playgroud)