Skip to content
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

Unable to run compiled binary #1884

Closed
spoiledsport opened this issue Apr 11, 2017 · 9 comments
Closed

Unable to run compiled binary #1884

spoiledsport opened this issue Apr 11, 2017 · 9 comments
Assignees
Labels

Comments

@spoiledsport
Copy link

I am having a problem running UML(user mode Linux). I successfully compile the executable but when I try running it, I am getting the following error

./linux: cannot execute binary file: Exec format error

I already verified that the executable is correctly formatted.

file linux
linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, not stripped

So the questions are : What is missing to make this happen? If I run strace, but I get the same error. This is very simple to reproduce.
1.- Download latest Linux source code
2.- apt-get install ncurses-devel
3.- Run make ARCH=um menuconfig
4.- Select exit and save configuration
5.- Run make ARCH=um
6.- when compilation completes, run ./Linux

@benhillis
Copy link
Member

benhillis commented Apr 12, 2017

@spoiledsport - Can you please confirm what Windows build you are running? Also if you could share one of the compiled binaries that would be great so I don't have to set up the entire dev environment.

@spoiledsport
Copy link
Author

This happens in every version, but I currently running creators edition

Microsoft Windows [Version 10.0.15063]

Included zipped binary

linux.zip

@spoiledsport
Copy link
Author

Any idea on the issue is? Anything you may need from me?

@therealkenc
Copy link
Collaborator

UML does compile and "run" on WSL per some discussion in #1692. Scary quotes because well it doesn't run, but for other reasons. Can't say why you are getting the Exec format error - it does build and execute for myself and others.

@benhillis - it is probably worth taking a look at this binary, because however it was created, it does launch on Real Linux but not WSL as of 17046. Meaning it isn't #330.

@benhillis benhillis self-assigned this Jan 5, 2018
@benhillis benhillis added the bug label Jan 5, 2018
@benhillis
Copy link
Member

benhillis commented Jan 5, 2018

I've identified an issue with the way our driver validates ELF headers. I'm working on a fix now.

@therealkenc
Copy link
Collaborator

Heads up #2736 is floating out there as well, if you are poking around ELF. There is a reasonable enough repro over there if you squint.

@benhillis
Copy link
Member

Fixed in 17093.

@jmbouffa
Copy link

Running into this issue and corporate likely won't let me upgrade to that build for a while. Is there any way to fix this myself without upgrading everything?

@sunilmut
Copy link
Member

@jmbouffa - Unfortunately, no. This fix is in WSL and WSL is built into the Windows OS. Can't think of any workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants