Skip to content

Hadrian: Symlink Breaks Cached Builds

Recreation

$ ./hadrian/build.sh --share=_cache -j --flavour=quickest
...
Error when running Shake build system:
  at action, called at src/Rules.hs:68:19 in main:Rules
  at need, called at src/Rules.hs:90:5 in main:Rules
* Depends on: _build/stage1/lib/package.conf.d/rts-1.0.conf
  at need, called at src/Rules/Register.hs:101:5 in main:Rules.Register
* Depends on: _build/stage1/rts/build/libCffi_thr.a
* Raised the exception:
_cache/.shake.cache/5029bef81b20dfbd/0xF03C561F: getPermissions:getFileStatus: does not exist (No such file or directory)

$ ls -l _cache/.shake.cache/5029bef81b20dfbd/0xF03C561F
lrwxrwxrwx 2 david david 9 Jun 11 16:54 _cache/.shake.cache/5029bef81b20dfbd/0xF03C561F -> libCffi.a

_cache/.shake.cache/5029bef81b20dfbd/0xF03C561F is a broken link, but is "correct" in the sense that we want to copy the symlink as is so that _build/stage1/rts/build/libCffi_thr.a is a symlink to _build/stage1/rts/build/libCffi.a. This seems like a bug in Shake: it manages to correctly copy the symlink into the cache, but fails on the way back out.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information