-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fdLock invalid argument error on WSL Ubuntu Bionic #6551
Comments
Looks like cabal is trying to use It seems clear that Microsoft will not fix this. They are focusing on WSL 2, which won't be generally released for at least a few more months. Is there any way to teach cabal not to use that kind of locking on this platform? Perhaps a flag that lets you override autodetection of what kind of locking to use? |
Disable `ofd-locking` flag of lukko:
Enable open file descriptor locking. Available on Linux (kernel 3.15, released Jun 8, 2014).
Then `flock` looks will be used. I don’t know how well they are supported, though.
… On 20. Feb 2020, at 19.26, ygale ***@***.***> wrote:
Looks like cabal is trying to use fcntl(F_SETLK) or similar for locking, via the lukko library. That won't work on WSL 1, see microsoft/WSL#1927.
It seems clear that Microsoft will not fix this. They are focusing on WSL 2, which won't be generally released for at least a few more months.
Is there any way to teach cabal not to use that kind of locking on this platform? Perhaps a flag that let's you override autodetection of what kind of locking to use?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Thanks @phadej . I'll give it a try. |
@ygale any updates? |
Closing this. Turning off |
To confirm that @phadej's fix works: I added constraints:
lukko -ofd-locking to |
For what it's worth: I had exactly this issue on my WSL 1 system, while building almost any project with Cabal. I just upgraded today to Windows 2004 and WSL 2, and now it seems to work. In case anybody else wonders if WSL 2 does solve this problem 😄 |
I met the same problem and have no solution yet:( |
It works after I updated wsl1 to wsl2 :) |
Thank you, this seems to fix the issue for me. I was running Ubuntu-18.04 on WSL 1. To upgrade it I first got the name of the image: wsl -l -v which showed me wsl --set-version Ubuntu-18.04 2 That took some time, but after that I restarted the Ubuntu shell and everything worked fine. Thank you for the solution, that saved me some time 👍 |
@leftaroundabout: How to reproduce your findings? |
Fresh Debian i386 install, fresh GHC-8.6.5, Cabal HEAD version (5b4258), after running the Ok, I think I got it: the
to
in the JSON file, the |
Congratulations! Indeed |
Describe the bug
On Ubuntu Bionic running under WSL on Windows 10, after installing cabal-install-3.2 from the hvr PPA:
Every cabal command fails with the following error:
To Reproduce
Run
cabal init
, orcabal update
or any other cabal command exceptcabal --version
.I deleted the entire
~/.cabal
directory and rancabal update
. Same issue.System information
cabal
versions:cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library
ghc
version: 8.8.2The text was updated successfully, but these errors were encountered: