wabt icon indicating copy to clipboard operation
wabt copied to clipboard

Can't run on Ubuntu focal

Open inliquid opened this issue 2 years ago • 7 comments

Just experienced an error when trying to run one of the tools on Ubuntu focal / Mint 20.3 (Una). Is it supported?

$ wasm2wat plugin.wasm
wasm2wat: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by wasm2wat)
wasm2wat: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by wasm2wat)
wasm2wat: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by wasm2wat)
$ uname -a
Linux mint-vm 5.4.0-155-generic #172-Ubuntu SMP Fri Jul 7 16:10:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ apt list --installed libc-*
Listing... Done
libc-ares2/focal-updates,focal-security,now 1.15.0-1ubuntu0.3 amd64 [installed]
libc-bin/focal-updates,now 2.31-0ubuntu9.9 amd64 [installed]
libc-dev-bin/focal-updates,now 2.31-0ubuntu9.9 amd64 [installed,automatic]

inliquid avatar Sep 24 '23 20:09 inliquid

Where is your wasm2wat binary (run which wasm2wat)? This kind of error suggests you're running a binary that didn't come from Ubuntu -- maybe a binary compiled elsewhere or expecting a very different version of GNU libc.

keithw avatar Sep 24 '23 21:09 keithw

I actually downloaded it manually here from github (as I did on Windows), not sure if I have to install it some other way?

inliquid avatar Sep 24 '23 22:09 inliquid

It looks like you can just use apt to install the official Ubuntu version: https://packages.ubuntu.com/focal/wabt

Separately we should probably build the downloadable linux binaries against and older distro version to increase our compatability.

sbc100 avatar Sep 25 '23 03:09 sbc100

I actually downloaded it manually here from github (as I did on Windows), not sure if I have to install it some other way?

Generally speaking, on Linux you typically either want to be getting your binaries from your package manager (which on Ubuntu 20.04 will get you WABT 1.0.13), or building from source (the most recent release is 1.0.33). You generally won't be happy taking a dynamically linked binary that was compiled for a different distribution as it probably won't be compatible with the libraries on your system. We could be building statically linked versions of the WABT tools, or setting up a Launchpad PPA to auto-build for various versions of Ubuntu, but we're not doing this right now. :-/

keithw avatar Sep 25 '23 08:09 keithw

Generally speaking, on Linux you typically either want to be getting your binaries from your package manager (which on Ubuntu 20.04 will get you WABT 1.0.13), or building from source (the most recent release is 1.0.33). You generally won't be happy taking a dynamically linked binary that was compiled for a different distribution as it probably won't be compatible with the libraries on your system. We could be building statically linked versions of the WABT tools, or setting up a Launchpad PPA to auto-build for various versions of Ubuntu, but we're not doing this right now. :-/

  1. The binary in "releases" is labeled as being prepared for "Ubuntu" system. There is nothing pointing on that it won't run on previous version of Ubuntu (it's not so "old" and still supported officially). So this at least should be properly documented. You can also highlight that preferred way to install is using apt. Also if there was "*.deb" package I would install from it, but there is nothing. If recommended way is to compile the tool from sources, then please remove the binary from "releases" and/or provide proper instruction.
  2. "on Linux you typically either want to be getting your binaries from your package manager" - thanks, I'm on Linux since 90s and I know what package manager is, but this is not "typically", as in Wasm ecosystem most of the tooling is not mature enough and you would want to install most recent versions most of the time. All other tools I'm using are installed manually either by picking a binary from "releases" or by picking a "*.deb", or by compiling a binary myself as it's described in README.md.
  3. wasm-dis as well as most of (didn't have time to check all of them) tools from alternative repos still just works.

I disagree with tone of reply and with that you just closed an issue without addressing it, there should be at least proper documentation or a note that will prevent other devs from wasting their time.

inliquid avatar Sep 25 '23 10:09 inliquid

Fair enough. Re-opening the issue. We can keep it open so that we can address this by either:

  1. Building against an older version of ubuntu (and documenting it).
  2. Labeling the binaries with the version of Ubuntu and/or Linux they we build for/with. Perhaps including a "build from source if needed" tip there.

If you (or anyone else) would like to open a PR to do either these things that would be most welcome.

sbc100 avatar Sep 25 '23 22:09 sbc100

BTW, does the version of wabt you get via apt-get install wabt actually not work for your needs, or are is that something you are worried about happening in the future?

sbc100 avatar Sep 25 '23 22:09 sbc100