-
Notifications
You must be signed in to change notification settings - Fork 867
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
[WSL2] Gradle build on Windows fail for project located on WSL filesystem due to filesystem lock issue. #4309
Comments
IIRC Microsoft advises using shared files on a Windows drive. You can create a case-sensitive directory as per here. There are caveats to this tho, such as aux.c file naming issue. I'd like to ask what path are you using to try access to WSL1/2 FS? |
I'm getting the same errors using a mapped drive to access WSL2 \wsl$ |
Any solution on this? I was trying to use gradle from windows side (in intellij ide) and I have the same result, I have tried to create a link with mklink and it also didn't worked. Looking the java stacktrace it tried to lock the file, but inside a linux filesystem you don't have a lock on files, that's why the exception is occurring I guess.. I am on Windows 1909 and using Ubuntu 20.04.. So still on WSL1 but the problem also occur here.. Any ideas apart from using the %localappdata% unadvised solution? |
Caused by #5762 ? |
Exactly same here also with WSL2 |
@marcelofrau as mentioned in the opening post, you can work around it by moving your project to (some folder inside) |
Originally I described the problem here: https://stackoverflow.com/questions/47143864/running-gradle-to-start-a-docker-container-that-will-mount-the-current-directory/72602415#72602415 I tried to share Windows & WSL 1 Removal of the simlink solved the problem for me. Another approach could be with the option:
to move to the FS with full lock capabilities. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.18936.1000]
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
A Gradle based Java project is located on WSL2 filesystem as I needed to share it between some Windows and Linux tools. WSL2 filesystem is mapped as a network drive on Windows and I use project with IntelliJ idea for Windows. The Gradle build fails due to a filesystem lock issue both inside IntelliJ and also from PowerShell command line. As a workaround, I had to move project to /mnt/c/
Gradle version is 4.10.1
Java version: Tried with Java8 and Java12. Build fails with both.
What's wrong / what should be happening instead:
The Gradle build should succeed. Basic error stacktrace is shown here. I am attaching detailed gradle logs as file.
gradlelogs.txt
The text was updated successfully, but these errors were encountered: