Please enable WSL to run 32 bit ELF binaries
It seems that executing 32bit ELF binaries results in "Exec format error" - guessing the kernel doesn't have 32 bit emulation support (compilation is fine, but precompiled binaries don't run). A vast number of legacy programs are still 32 bit, please add support if it won't completely destroy everything in the process - thanks!
WSL currently only works on x64 systems, and only runs ELF-64 binaries.
We don’t currently have plans to support running ELF-32 binaries on WSL x64.
Question: Using Docker with "Linux Containers" with 'mirrored WSL setup/container' as delegator for executing x86 binaries ?
Considering the fact that Linux Containers are actually containers that run on top of VM based linux kernel, that should be possible and feasable, with just redirecting only the 32bit ELF to the container.
Pleease pleease add support for this, it would simplify things alot! :)
I would not need the virtual box any more if 32-bit ELF works with WSL. I love WSL and wish to keep using it.
dood we need 32 bit support .. like brah ... woot
https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520 works just fine as a work-around so if you are holding out on WSL because of this, the workaround should sate your appetitie for now. Be sure you start the service created every time you kill your WSL session.
32bit ELF is necessary for me because i need to use gcc and nasm in 32bit mode in my student projects. We study 32bit architecture and supporting ELF 32 is crucial especially for assembler.
When I first came to this issue I wondered that GCC Linker could not link. This was because he did not find the libraries. OK, they were missing. But I thought I have them because I used apt-clone to get all the pakets installed on WSL I previously had on a (L)Ubuntu machine. Unfortunately the i386 version of a library (libusb) did not install.
So linking against a 32 bit library has to be done another way. I guess I have to copy the files somewhere and point the linker to it.
I am pretty aware that I could not *run* 32 bit binaries, but for me it is enough to compile 32 bit binaries (as part of an automated build process).
My conclusion: WSL is fine, Thank You, but not perfect (as nobody is!).
If it is possible to enable WSL for 32 bit binaries you have my thumb up.
My campany gets chance to stop managing LINUX server when 32bit ELF works on WSL.
Robin Frousheger commented
I think I have a general working solution https://github.com/microsoft/wsl/issues/2468#issuecomment-374904520 but haven't heavily tested it. It may work for you, your mileage may vary, etc
I just stumbled across this problem. It brought my research project to a screeching halt. I'll probably find a Mac that no one in the lab is using and build on that.
For what it's worth, I think it would be best to not enable this by default but to allow for multiarch support.
I would really appreciate the possibility to run IA-32 files on the WSL.. :C
Ricky Neff commented
DO WHAT HE SAYS OR ELSE, no seriously. Why the **** is windows a 32/64 but WSL is only a 64. That makes 0 sense.
Stefan Matyba commented
Lack of 32-Bit support is a deal breaker for me, too bad. I was really excited when I first tried WSL and REALLY hope that this will be fixed soon
Not possible to run some toolchains. If there is no plan to support 32 bit elf the only solution it to move back to native Linux system
Was looking forward to using WSL, but without 32-bit support we can't test our embedded systems code. Therefore, there isn't a use case with WSL for us.
ELF-32 is a must for embedded development, for using prebuild toolchains.
And since WSL is for developers, you can not just ignore that.
I agree, this is a major issue with a lot of legacy applications which require major re-work to get them to compile to x64. Be nice to just use the old ELF executables.
Like many others here, ditching WSL and going back to a VM - it was nice but short experiment. I need to be able to run ELF-32 binaries for embedded (NVidia's Jetson TX2 toolchain). Please add support for ELF-32 and I will take another look.
Janusz Gąsior commented