Code-server: Binary does not work with WSL

Created on 5 Mar 2019  Â·  12Comments  Â·  Source: cdr/code-server


  • vscode-remote version: 1.31.0-20
  • OS Version: Windows 10 (rel 1809) - WSL Ubuntu 16.04.4 LTS

Steps to Reproduce

  1. Run WSL and try to run the executable
  2. Error: -bash: ./code-server: cannot execute binary file: Exec format error

Most helpful comment

Ah interesting. We compress the node binary prior to packaging, so that
makes sense. Will add the additional target soon.

On Tue, Mar 5, 2019 at 3:26 PM DiegoBM notifications@github.com wrote:

@kylecarbs https://github.com/kylecarbs running the upx -d command on
the binary it says that the binary was not packed by upx

upx -d code-server

                   Ultimate Packer for eXecutables
                      Copyright (C) 1996 - 2013

UPX 3.91 Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013

    File size         Ratio      Format      Name

-------------------- ------ ----------- -----------
upx: code-server: NotPackedException: not packed by UPX

Unpacked 0 files.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/codercom/code-server/issues/11#issuecomment-469901139,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGysxJD1oJ2C1-6gclf4rpkd1qWsPOPRks5vTv0hgaJpZM4bfeKy
.

All 12 comments

Will look into this. Thanks for the report.

can confirm, didn't work for me either, with same error message

Seems like binaries compressed with UPX do not work in WSL.

https://github.com/Microsoft/WSL/issues/2121#issuecomment-302144752

We'll create a version in the CI that isn't compressed. You can try decompressing it, might work.

@kylecarbs running the upx -d command on the binary it says that the binary was not packed by upx

# upx -d code-server
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
upx: code-server: NotPackedException: not packed by UPX

Unpacked 0 files.

Ah interesting. We compress the node binary prior to packaging, so that
makes sense. Will add the additional target soon.

On Tue, Mar 5, 2019 at 3:26 PM DiegoBM notifications@github.com wrote:

@kylecarbs https://github.com/kylecarbs running the upx -d command on
the binary it says that the binary was not packed by upx

upx -d code-server

                   Ultimate Packer for eXecutables
                      Copyright (C) 1996 - 2013

UPX 3.91 Markus Oberhumer, Laszlo Molnar & John Reiser Sep 30th 2013

    File size         Ratio      Format      Name

-------------------- ------ ----------- -----------
upx: code-server: NotPackedException: not packed by UPX

Unpacked 0 files.

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/codercom/code-server/issues/11#issuecomment-469901139,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGysxJD1oJ2C1-6gclf4rpkd1qWsPOPRks5vTv0hgaJpZM4bfeKy
.

Running from docker on WSL would be good. Right now I use Cloud9 local install through https://github.com/c9/core for Python development. Wonder if Coder can provide better intellisense.

Any chance to disable that UPX compression in the next release?

Any chance to disable that UPX compression in the next release?

The plan was to add an additional target and not remove an optimization.

The plan was to add an additional target and not remove an optimization.

@SuperSandro2000 who's saying otherwise? It was already mentioned by @kylecarbs that it would be an additional target

We ended up skipping compression altogether (from 1.32.0-245 onward): https://github.com/codercom/code-server/commit/8bab787804912306821e50747699ce25ba1d22e9.

@coderasher, was compression causing other unexpected problems? Out of curiosity

Now it works flawlessly on WSL, thank you! Closing as fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pchecinski picture pchecinski  Â·  3Comments

pchecinski picture pchecinski  Â·  3Comments

korzq picture korzq  Â·  3Comments

Arsaev picture Arsaev  Â·  3Comments

infogulch picture infogulch  Â·  3Comments