opam
opam copied to clipboard
`opam admin` fails on NFS directory due to lockf missing
We're building Coq's opam index and repository files on an NFS mounted filesystem, and these days opam admin check/make both fail with:
Fatal error:
opam2: "lockf" failed: No locks available
Can the use of locks be avoided?
It's suspicious indeed, opam admin is not supposed to require locks, and should even be read-only in the case of check. Could you precise:
- your opam version (
opam config report) ? - a stacktrace, if you can get one (
OCAMLRUNPARAM=b opam admin check)
Thanks!
Closing this, just as it's two years old with no feedback. Please feel free to re-open if it's still an issue!
Hello, I had the exact same error on machines with the .opam served by an nfs. This prevented me from executing opam env, and thus get the PATH correctly setup.
The backtrace leads to this line: https://github.com/ocaml/opam/blob/fee5861395d6a575c16a7b403012823829946c88/src/format/opamFile.ml#L118.
The reason of this error is that I was using nfsv3, which does not support file locking. Upgrading to nfsv4.2 was enough to get everything working.