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.
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
I was excited about WSL because I thought I'd be able to do my Linux-related development directly on Windows, but as a result of this, I can't use it. I absolutely must be able to cross-compile using a 32-bit toolchain.
I'll go back to using a dedicated Linux VM. Spending 50% of my time in WSL and another 50% in a VM is less productive than using the VM 100% of the time. What a shame.
I hope WSL is a work-in-progress and its experience will be more complete eventually, otherwise what's the point of it all?
Mike M commented
Or to put it another way "you'd have to be an idiot to use WSL".
If you build your infrastructure around it, you run the risk that some major bug will crop up, and just like this one Microsoft will go "Nah, can't be bothered. Tough."
Mykhailo Parfeniuk commented
We have 32 bit toolchain for embedded devices and 32-bit linux testsuits, absence of 32 bit support prevents us from developing on Windows as single platform. I think this decision is really shortsighted and makes WSL usefulness questionable.
Ok thanks. Will have to go back to Linux to cross-compile ARM for work.