-
Notifications
You must be signed in to change notification settings - Fork 77
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 - and a workaround #559
Comments
why is this an issue? I don't use wsl2 so I don't know what the problem is |
No meson, I respect that - and it is not an issue for anyone who doesn't use WSL2. Having it here makes it easy to search for people who do - it'll keep other people's complaints out of your issues tab :) Long story short, is that anything that's a Windows EXE, when run from the shell under WSL2, will be taken up by the host Windows and run there, outside of WSL2. Meaning, any libraries, paths and other environment which would have been valid in the Linux container, would be gone. This breaks the build under WSL2, but not native Linux, because mwccarm is a Windows program. Using something like It's a very low-priority item, and the workaround does fix it for those who need to use it. |
I mean, how does it break the build? AFAIK triggering the mwccarm exe doesn't rely on any libraries/environment variables set in linux, everything is self-contained |
oh yeah, sorry - I'll run a build from wsl2 and show the errors. one moment |
starting from a make clean, latest git pull, commit aadfe9a
Also, this pops up from Windows: It seems to fail at the first invocation of If you need any further information feel free to ask. |
I see, I'll probably add something to the makefile then like heartgold has, eventually |
The major issue seems to present itself because scripts are launching .exe files directly, rather than prefixing them with
wine
to specify running them through WINE.I think other pret repos have their Makefiles do the latter.
Permanent fix:
Consider the way pokeplatinum does it, if this gets rewritten to use Meson:
https://github.com/pret/pokeplatinum/blob/ade90355b59da7fca362155df413562b678085ff/meson/native_unix.ini#L4
Elsewise, define a variable in the Makefiles to Wine, and condition it in explicitly when building on UNIX/Linux.
Quick Workaround:
For now, you can make this work (on current WSL2, tested under Windows 11) by running the following:
before building the project with
make
.This change only takes hold for as long as the WSL2 session is active, so you will need to rerun it if you close out and return to WSL2.
Note: This change will also disable any use of
.exe
files from Linux, under the host Windows OS, and (assuming you installed Wine as recommended in the setup guide) will run them in WINE instead.(This issue should be closed when such a workaround is no longer required on WSL2.)
The text was updated successfully, but these errors were encountered: