Is there a workaround now for those of us on OS X that do not have flock? It seems I cannot build the coq.dev
package...
Good question. The answer is probably no, unless you pin from the Coq git repo, in which case, it's the fully Dunerized build that you get.
I'd be fine with that
Can't we just update the coq.dev package though?
What do you mean?
Well, make the opam
coq.dev package use the full dune build to avoid relying on flock
opam pin add coq-core https://github.com/coq/coq.git
works fine
We can add a workaround for the missing flock , but isn't it quite easy to install from ports brew etc?
can't we fix the legacy build to work on osx ?
@Gaëtan Gilbert it works but you need to do brew install flock
I didn't find a locking primitive that is accessible from shell standard in OSX
Nope, that's not flock on my system
Apparently, to install flock with brew, you need to install a specific tap first.
And with MacPorts, it's not even available.
So that's indeed quite a problem.
I see, ok, let's add a workaround then
Flock is a messaging system on brew by default
@Michael Soegtrop has recommended using shlock
on OS X because the bugs you see in the man for flock
are Linux specific and do not apply to the BSD version.
shlock does not work IIUC
let me cook the PR
Why do we need these file locks in the first-place? Couldn't we just force -j1 if it's not available?
Why do we need these file locks in the first-place? Couldn't we just force -j1 if it's not available?
Good idea.
@Emilio Jesús Gallego Arias : as far as I can tell there is no way to install flock via MacPorts and I prefer it over Homebrew.
Why do you say shlock does not work? The issues discussed doesn't seem to apply to BSD.
@Michael Soegtrop they don't even do the same thing, as far as I can see, how do you implement flock 's blocking mode with shlock?
@Emilio Jesús Gallego Arias : can you describe what exactly you are doing with flock - e.g. what command line you use in dune?
For waiting until a lock becomes free with shlock, one would have to resort to busy waiting, which should not that bad (in the sense of better than -j 1 ). If you tell me how you call flock, I can see if I can come up with a shlock based shell script which works on macOS.
thanks @Michael Soegtrop , we use flock to guard all calls to dune, flock.dune.lock dune ....
so they are serialized
All note the PR https://github.com/coq/coq/pull/14249 which is simple enough to work well too IMO.
The OCaml + C flock wrapper is in my opinion the best solution.
Last updated: Oct 13 2024 at 01:02 UTC