bytecodealliance / javy

JS to WebAssembly toolchain
Apache License 2.0
2.15k stars 102 forks source link

Can't build javy main branch on Ubuntu 23.10 #594

Closed ieugen closed 7 months ago

ieugen commented 7 months ago

Operating system: Debian Trixie - Testing Processor architecture: amd64 - AMD Rust version: rustc 1.75.0 (82e1608df 2023-12-21) Javy version:

commit 0f3627f19ddaf933a0a31782d83ec7b627e8978a (grafted, HEAD -> main, origin/main, origin/HEAD)
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Tue Jan 23 15:29:54 2024 +0000
    Bump shlex from 1.1.0 to 1.3.0 (#591)

Problem

I followed the instructions in the readme and I faild to compile. I also installed all the things mentioned https://github.com/bytecodealliance/javy#how-to-build

cc @jeffcharles #592

Error Message and Context

 [ 85%] Building CXX object src/passes/CMakeFiles/passes.dir/WasmIntrinsics.cpp.o
  [ 85%] Built target passes

  --- stderr
  fatal: No names found, cannot describe anything.
  CMake Warning at CMakeLists.txt:54 (message):
    Error running git describe to determine version

  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS

  gmake: warning: -j8 forced in submake: resetting jobserver mode.
  In file included from /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:25:
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:62:3: error: ‘uint64_t’ does not name a type
     62 |   uint64_t n;
        |   ^~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:20:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
     19 | #include <iterator>
    +++ |+#include <cstdint>
     20 | #include <optional>
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:75:17: error: ‘uint64_t’ was not declared in this scope
     75 |   std::optional<uint64_t> nanPayload;
        |                 ^~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:75:17: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:75:25: error: template argument 1 is invalid
     75 |   std::optional<uint64_t> nanPayload;
        |                         ^
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:127:17: error: ‘uint64_t’ was not declared in this scope
    127 |   std::optional<uint64_t> getU64() const;
        |                 ^~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:127:17: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:127:25: error: template argument 1 is invalid
    127 |   std::optional<uint64_t> getU64() const;
        |                         ^
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:129:17: error: ‘uint64_t’ was not declared in this scope
    129 |   std::optional<uint64_t> getI64() const;
        |                 ^~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:129:17: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:129:25: error: template argument 1 is invalid
    129 |   std::optional<uint64_t> getI64() const;

REDACTED

const IntTok&)’:
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:1002:76: error: ‘const struct wasm::WATParser::IntTok’ has no member named ‘n’
   1002 |   return os << (tok.sign == Pos ? "+" : tok.sign == Neg ? "-" : "") << tok.n;
        |                                                                            ^
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp: In function ‘std::ostream& wasm::WATParser::operator<<(std::ostream&, const FloatTok&)’:
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:1009:44: error: invalid type argument of unary ‘*’ (have ‘int’)
   1009 |       return os << "nan:0x" << std::hex << *tok.nanPayload << std::dec;
        |                                            ^~~~~~~~~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp: At global scope:
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:110:20: warning: ‘std::optional<int> wasm::WATParser::{anonymous}::getHexDigit(char)’ defined but not used [-Wunused-function]
    110 | std::optional<int> getHexDigit(char c) {
        |                    ^~~~~~~~~~~
  /home/ieugen/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:103:20: warning: ‘std::optional<int> wasm::WATParser::{anonymous}::getDigit(char)’ defined but not used [-Wunused-function]
    103 | std::optional<int> getDigit(char c) {
        |                    ^~~~~~~~
  cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics
  cc1plus: note: unrecognized command-line option ‘-Wno-implicit-int-float-conversion’ may have been intended to silence earlier diagnostics
  gmake[2]: *** [src/wasm/CMakeFiles/wasm.dir/build.make:244: src/wasm/CMakeFiles/wasm.dir/wat-lexer.cpp.o] Error 1
  gmake[2]: *** Waiting for unfinished jobs....
  gmake[1]: *** [CMakeFiles/Makefile2:523: src/wasm/CMakeFiles/wasm.dir/all] Error 2
  gmake[1]: *** Waiting for unfinished jobs....
  gmake: *** [Makefile:136: all] Error 2
  thread 'main' panicked at /home/ieugen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.48/src/lib.rs:975:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
jeffcharles commented 7 months ago

If it's any help, our CI uses Ubuntu 22.04 to build.

Can you confirm if it's the cargo build -p javy-cli -r step failing? That is, did the cargo build -p javy-core --target=wasm32-wasi -r step succeed?

Based on a cursory scan of the output, it looks like the binaryen-sys dependency (required by binaryen-rs) is failing to build on your system. I don't know why it would fail though. Other than maybe there's some sort of issue with that version of binaryen or binaryen-sys and the version of GCC being used or some kind of incompatibility with Trixie's version of the C++ standard library. Unfortunately we're using the latest commit for binaryen-rs so we can't update it further.

ieugen commented 7 months ago

I followed the steps to build again. I ran the install build deps and it was fine. However I was missing the development dependencies - wasmtime-cli. cargo-wasi and cargo-hack .

However, even after that, running cargo build -p javy-cli -r fails.

I also ran the build commands into a container with Ubuntu 22.004 and and it still did not work.

docker run --name javy_build -ti ubuntu:22.04 bash 

# in another shell, copy javy files
# or use git clone inside container 
docker cp . javy_build:/root/javy/

And

$ cargo build -p javy-core --target=wasm32-wasi -r
   Finished release [optimized] target(s) in 0.18s
$ sudo apt-get install curl pkg-config libssl-dev clang
curl este deja la cea mai nouă versiune (8.5.0-2).
pkg-config este deja la cea mai nouă versiune (1.8.1-1+b2).
libssl-dev este deja la cea mai nouă versiune (3.1.4-2).
clang este deja la cea mai nouă versiune (1:16.0-57).
0 înnoit(e), 0 nou instalat(e), 0 de eliminat și 0 neactualizat(e).

$ rustup install stable && rustup default stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.75.0 (82e1608df 2023-12-21)

info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.75.0 (82e1608df 2023-12-21)

info: note that the toolchain 'stable-x86_64-unknown-linux-gnu' is currently in use (overridden by '/home/ieugen/proiecte/rust/javy/rust-toolchain.toml')
ieugen @ daos-495 in ~/.../rust/javy |12:40:46  |main ✓| 
$ rustup target add wasm32-wasi
info: component 'rust-std' for target 'wasm32-wasi' is up to date
ieugen @ daos-495 in ~/.../rust/javy |12:41:06  |main ✓| 
$ cmake --version
cmake version 3.28.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
ieugen commented 7 months ago

@jeffcharles : I think I found the cause but not sure how to fix it.

I believe the issue is related to a change in standard cpp library. I believe on your CI you might have an older version still installed (not sure how your CI is set up).

Like I mentioned in the comment above, regular Ubuntu 22.04 will also fail .

Adding an include the binaryen-sys/binaryen/src/wat-lexer.h fixed the build for binaryen-rs and also for javy. I added the include under ~/.cargo/git/checkouts/...

#include <cstdint>

cstdint.h seems to be in package libstdc++-xxxxxxxx .

$ cargo build -p javy-cli -r
   Compiling binaryen-sys v0.12.1 (https://github.com/pepyakin/binaryen-rs?rev=00c98174843f957681ba0bc5cdcc9d15f5d0cb23#00c98174)
   Compiling binaryen v0.12.1 (https://github.com/pepyakin/binaryen-rs?rev=00c98174843f957681ba0bc5cdcc9d15f5d0cb23#00c98174)
   Compiling javy-cli v1.4.0 (/home/ieugen/proiecte/rust/javy/crates/cli)
    Finished release [optimized] target(s) in 5m 45s

image

jeffcharles commented 7 months ago

I also ran the build commands into a container with Ubuntu 22.004 and and it still did not work.

Sorry I'm having trouble following what the exact error you ran into was when you tried this 🙂. I was able to build Javy successfully in Ubuntu 22.04.

I tried this locally in a new ubuntu:22.04 docker container with the following commands:

➜  javy git:(main) ✗ podman run --platform linux/amd64 -it ubuntu:22.04 /bin/bash
root@6d14386e3e10:/# apt-get update
[...]
root@6d14386e3e10:/# apt-get install curl pkg-config libssl-dev clang cmake git
[...]
1 upgraded, 157 newly installed, 0 to remove and 8 not upgraded.
Need to get 234 MB of archives.
After this operation, 1102 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
[...]
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Processing triggers for ca-certificates (20230311ubuntu0.22.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
root@6d14386e3e10:/# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
[...]
Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>

info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
[...]
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu installed - rustc 1.75.0 (82e1608df 2023-12-21)

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source "$HOME/.cargo/env"
root@6d14386e3e10:/# source "$HOME/.cargo/env"
root@6d14386e3e10:/# git clone https://github.com/bytecodealliance/javy.git
[...]
root@6d14386e3e10:/# rustup target add wasm32-wasi
[...]
root@6d14386e3e10:/# cd javy
root@6d14386e3e10:/javy# cargo build -p javy-core --target=wasm32-wasi -r
    Updating crates.io index
    Updating git repository `https://github.com/pepyakin/binaryen-rs`
    Updating git submodule `https://github.com/WebAssembly/binaryen.git`
    Updating git submodule `https://github.com/google/googletest.git`
  Downloaded foreign-types v0.3.2
  Downloaded futures-core v0.3.30
  Downloaded peeking_take_while v0.1.2
  Downloaded openssl-probe v0.1.5
  Downloaded foreign-types-shared v0.1.1
  Downloaded http-body v1.0.0
  Downloaded want v0.3.0
  Downloaded tower-service v0.3.2
  Downloaded try-lock v0.2.4
  Downloaded openssl-macros v0.1.1
  Downloaded tower-layer v0.3.2
  Downloaded fnv v1.0.7
  Downloaded walkdir v2.4.0
  Downloaded prettyplease v0.2.15
  Downloaded libloading v0.7.3
  Downloaded lazycell v1.3.0
  Downloaded tracing v0.1.37
  Downloaded same-file v1.0.6
  Downloaded memchr v2.6.4
  Downloaded fastrand v2.0.1
  Downloaded clang-sys v1.3.1
  Downloaded wasi v0.11.0+wasi-snapshot-preview1
  Downloaded vcpkg v0.2.15
  Downloaded cfg-if v1.0.0
  Downloaded socket2 v0.5.5
  Downloaded tokio-native-tls v0.3.1
  Downloaded serde_derive v1.0.194
  Downloaded once_cell v1.19.0
  Downloaded openssl-sys v0.9.96
  Downloaded native-tls v0.2.11
  Downloaded version_check v0.9.4
  Downloaded tracing-core v0.1.31
  Downloaded mio v0.8.9
  Downloaded regex v1.5.6
  Downloaded pin-utils v0.1.0
  Downloaded proc-macro2 v1.0.74
  Downloaded serde v1.0.194
  Downloaded http-body-util v0.1.0
  Downloaded cc v1.0.83
  Downloaded cexpr v0.6.0
  Downloaded quote v1.0.35
  Downloaded bitflags v2.4.1
  Downloaded lazy_static v1.4.0
  Downloaded minimal-lexical v0.2.1
  Downloaded http v1.0.0
  Downloaded tokio-macros v2.2.0
  Downloaded glob v0.3.0
  Downloaded regex-syntax v0.6.26
  Downloaded pkg-config v0.3.26
  Downloaded pin-project-internal v1.1.3
  Downloaded itoa v1.0.4
  Downloaded bindgen v0.69.1
  Downloaded pin-project-lite v0.2.13
  Downloaded hyper-util v0.1.2
  Downloaded pin-project v1.1.3
  Downloaded httparse v1.8.0
  Downloaded nom v7.1.0
  Downloaded tower v0.4.13
  Downloaded libc v0.2.151
  Downloaded either v1.6.1
  Downloaded log v0.4.17
  Downloaded futures-util v0.3.30
  Downloaded futures-channel v0.3.30
  Downloaded hyper v1.1.0
  Downloaded bytes v1.5.0
  Downloaded shlex v1.3.0
  Downloaded futures-task v0.3.30
  Downloaded unicode-ident v1.0.6
  Downloaded rustc-hash v1.1.0
  Downloaded openssl v0.10.60
  Downloaded tokio v1.35.1
  Downloaded syn v2.0.46
  Downloaded hyper-tls v0.6.0
  Downloaded anyhow v1.0.79
  Downloaded which v4.2.4
  Downloaded 75 crates (5.5 MB) in 2.34s
   Compiling libc v0.2.151
   Compiling proc-macro2 v1.0.74
   Compiling unicode-ident v1.0.6
   Compiling quote v1.0.35
   Compiling syn v2.0.46
   Compiling cfg-if v1.0.0
   Compiling log v0.4.17
   Compiling cc v1.0.83
   Compiling pin-project-lite v0.2.13
   Compiling vcpkg v0.2.15
   Compiling pkg-config v0.3.26
   Compiling openssl-sys v0.9.96
   Compiling once_cell v1.19.0
   Compiling futures-core v0.3.30
   Compiling tokio-macros v2.2.0
   Compiling socket2 v0.5.5
   Compiling mio v0.8.9
   Compiling futures-task v0.3.30
   Compiling itoa v1.0.4
   Compiling pin-utils v0.1.0
   Compiling fnv v1.0.7
   Compiling bytes v1.5.0
   Compiling http v1.0.0
   Compiling futures-util v0.3.30
   Compiling tokio v1.35.1
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.60
   Compiling httparse v1.8.0
   Compiling bitflags v2.4.1
   Compiling glob v0.3.0
   Compiling version_check v0.9.4
   Compiling nom v7.1.0
   Compiling clang-sys v1.3.1
   Compiling foreign-types v0.3.2
   Compiling http-body v1.0.0
   Compiling tracing-core v0.1.31
   Compiling openssl-macros v0.1.1
   Compiling pin-project-internal v1.1.3
   Compiling native-tls v0.2.11
   Compiling try-lock v0.2.4
   Compiling anyhow v1.0.79
   Compiling prettyplease v0.2.15
   Compiling want v0.3.0
   Compiling pin-project v1.1.3
   Compiling tracing v0.1.37
   Compiling futures-channel v0.3.30
   Compiling memchr v2.6.4
   Compiling tower-service v0.3.2
   Compiling minimal-lexical v0.2.1
   Compiling tower-layer v0.3.2
   Compiling openssl-probe v0.1.5
   Compiling tower v0.4.13
   Compiling hyper v1.1.0
   Compiling libloading v0.7.3
   Compiling either v1.6.1
   Compiling regex-syntax v0.6.26
   Compiling bindgen v0.69.1
   Compiling regex v1.5.6
   Compiling which v4.2.4
   Compiling hyper-util v0.1.2
   Compiling cexpr v0.6.0
   Compiling tokio-native-tls v0.3.1
   Compiling http-body-util v0.1.0
   Compiling peeking_take_while v0.1.2
   Compiling shlex v1.3.0
   Compiling rustc-hash v1.1.0
   Compiling lazy_static v1.4.0
   Compiling lazycell v1.3.0
   Compiling same-file v1.0.6
   Compiling walkdir v2.4.0
   Compiling hyper-tls v0.6.0
   Compiling quickjs-wasm-sys v1.2.0-alpha.1 (/javy/crates/quickjs-wasm-sys)
   Compiling serde v1.0.194
   Compiling serde_derive v1.0.194
   Compiling quickjs-wasm-rs v3.0.0-alpha.1 (/javy/crates/quickjs-wasm-rs)
   Compiling javy v2.2.0-alpha.1 (/javy/crates/javy)
   Compiling fastrand v2.0.1
   Compiling javy-apis v2.2.0-alpha.1 (/javy/crates/apis)
   Compiling javy-core v0.2.0 (/javy/crates/core)
    Finished release [optimized] target(s) in 12m 16s
root@6d14386e3e10:/javy# cargo build -p javy-cli -r
  Downloaded wasmtime-component-macro v16.0.0
  Downloaded unicode-id v0.3.3
  Downloaded ahash v0.8.3
  Downloaded swc_ecma_utils v0.125.4
  Downloaded swc_ecma_parser v0.141.37
  Downloaded addr2line v0.21.0
  Downloaded memoffset v0.9.0
  Downloaded memoffset v0.6.5
  Downloaded memfd v0.6.3
  Downloaded maybe-owned v0.3.4
  Downloaded linux-raw-sys v0.4.12
  Downloaded wizer v4.0.0
  Downloaded linux-raw-sys v0.3.8
  Downloaded leb128 v0.2.5
  Downloaded ryu v1.0.9
  Downloaded rustversion v1.0.14
  Downloaded wasmtime-asm-macros v16.0.0
  Downloaded vergen v8.2.6
  Downloaded rustc_version v0.2.3
  Downloaded swc_macros_common v0.3.9
  Downloaded rustc-demangle v0.1.21
  Downloaded wasmtime-cranelift-shared v16.0.0
  Downloaded rayon-core v1.9.1
  Downloaded wasmparser v0.80.2
  Downloaded rayon v1.5.1
  Downloaded wiggle v16.0.0
  Downloaded rand_core v0.6.3
  Downloaded rand_chacha v0.3.1
  Downloaded rand v0.8.5
  Downloaded wasmtime-cache v16.0.0
  Downloaded wast v69.0.1
  Downloaded phf_generator v0.11.2
  Downloaded phf v0.11.2
  Downloaded percent-encoding v2.3.0
  Downloaded num-integer v0.1.45
  Downloaded num-bigint v0.4.3
  Downloaded zstd-sys v2.0.8+zstd.1.5.5
  Downloaded zstd-safe v5.0.2+zstd.1.5.2
  Downloaded wat v1.0.82
  Downloaded wasmtime-types v16.0.0
  Downloaded wasmtime-jit-debug v16.0.0
  Downloaded wasmtime v16.0.0
  Downloaded wasmprinter v0.2.75
  Downloaded wasmparser v0.118.1
  Downloaded wasmparser v0.106.0
  Downloaded wasm-encoder v0.30.0
  Downloaded wasi-common v16.0.0
  Downloaded walrus-macro v0.19.0
  Downloaded swc_ecma_visit v0.96.17
  Downloaded wasmtime-versioned-export-macros v16.0.0
  Downloaded wasmtime-jit-icache-coherence v16.0.0
  Downloaded wasmtime-fiber v16.0.0
  Downloaded cranelift-codegen-meta v0.103.0
  Downloaded zstd v0.11.2+zstd.1.5.2
  Downloaded cranelift-codegen v0.103.0
  Downloaded witx v0.9.1
  Downloaded cranelift-bforest v0.103.0
  Downloaded getrandom v0.2.5
  Downloaded cpufeatures v0.2.1
  Downloaded cpp_demangle v0.3.5
  Downloaded convert_case v0.6.0
  Downloaded cmake v0.1.48
  Downloaded clap v2.34.0
  Downloaded cap-time-ext v2.0.1
  Downloaded cap-std v2.0.1
  Downloaded cap-rand v2.0.1
  Downloaded cap-primitives v2.0.1
  Downloaded cap-net-ext v2.0.1
  Downloaded cap-fs-ext v2.0.1
  Downloaded byteorder v1.4.3
  Downloaded bumpalo v3.11.1
  Downloaded brotli-decompressor v2.5.0
  Downloaded brotli v3.4.0
  Downloaded block-buffer v0.10.4
  Downloaded bitflags v1.3.2
  Downloaded bincode v1.3.3
  Downloaded better_scoped_tls v0.1.1
  Downloaded base64 v0.21.0
  Downloaded autocfg v1.1.0
  Downloaded atty v0.2.14
  Downloaded async-trait v0.1.77
  Downloaded arbitrary v1.3.2
  Downloaded ansi_term v0.12.1
  Downloaded ambient-authority v0.0.2
  Downloaded alloc-stdlib v0.2.2
  Downloaded alloc-no-stdlib v2.0.4
  Downloaded wasm-encoder v0.38.1
  Downloaded wasm-encoder v0.29.0
  Downloaded walrus v0.20.3
  Downloaded system-interface v0.26.1
  Downloaded swc_visit_macros v0.5.9
  Downloaded swc_visit v0.5.8
  Downloaded swc_ecma_ast v0.110.17
  Downloaded sourcemap v6.2.3
  Downloaded slice-group-by v0.3.0
  Downloaded shellexpand v2.1.0
  Downloaded sha2 v0.10.6
  Downloaded scopeguard v1.1.0
  Downloaded rustix v0.37.26
  Downloaded regalloc2 v0.9.3
  Downloaded psm v0.1.17
  Downloaded pmutil v0.6.1
  Downloaded phf_shared v0.11.2
  Downloaded paste v1.0.6
  Downloaded object v0.32.1
  Downloaded num_cpus v1.13.1
  Downloaded num-traits v0.2.16
  Downloaded wit-parser v0.13.0
  Downloaded winch-codegen v0.14.0
  Downloaded wiggle-macro v16.0.0
  Downloaded wiggle-generate v16.0.0
  Downloaded wast v35.0.2
  Downloaded wasmtime-wmemcheck v16.0.0
  Downloaded wasmtime-wit-bindgen v16.0.0
  Downloaded wasmtime-winch v16.0.0
  Downloaded wasmtime-wasi v16.0.0
  Downloaded wasmtime-runtime v16.0.0
  Downloaded wasmtime-jit v16.0.0
  Downloaded aho-corasick v0.7.18
  Downloaded jobserver v0.1.24
  Downloaded hstr v0.2.6
  Downloaded swc_ecma_transforms_base v0.135.11
  Downloaded swc_common v0.33.12
  Downloaded crossbeam-utils v0.8.7
  Downloaded proc-macro-error-attr v1.0.4
  Downloaded proc-macro-error v1.0.4
  Downloaded ppv-lite86 v0.2.16
  Downloaded phf_macros v0.11.2
  Downloaded wasmtime-environ v16.0.0
  Downloaded wasmtime-cranelift v16.0.0
  Downloaded wasmtime-component-util v16.0.0
  Downloaded ittapi-sys v0.4.0
  Downloaded ittapi v0.4.0
  Downloaded itertools v0.10.3
  Downloaded is-macro v0.3.0
  Downloaded ipnet v2.9.0
  Downloaded io-lifetimes v2.0.3
  Downloaded io-lifetimes v1.0.11
  Downloaded io-extras v0.18.1
  Downloaded indexmap v2.0.2
  Downloaded indexmap v1.9.3
  Downloaded if_chain v1.0.2
  Downloaded idna v0.4.0
  Downloaded id-arena v2.2.1
  Downloaded iana-time-zone v0.1.59
  Downloaded heck v0.4.1
  Downloaded heck v0.3.3
  Downloaded hashbrown v0.14.1
  Downloaded hashbrown v0.13.2
  Downloaded hashbrown v0.12.3
  Downloaded gimli v0.28.0
  Downloaded wasi-cap-std-sync v16.0.0
  Downloaded vec_map v0.8.2
  Downloaded uuid v1.6.1
  Downloaded url v2.4.1
  Downloaded unicode-xid v0.2.4
  Downloaded unicode-width v0.1.9
  Downloaded unicode-segmentation v1.9.0
  Downloaded unicode-normalization v0.1.22
  Downloaded unicode-bidi v0.3.13
  Downloaded typenum v1.15.0
  Downloaded typed-arena v2.0.2
  Downloaded tracing-attributes v0.1.26
  Downloaded toml v0.5.8
  Downloaded syn v1.0.109
  Downloaded swc_eq_ignore_macros v0.1.3
  Downloaded swc_atoms v0.6.5
  Downloaded structopt-derive v0.4.18
  Downloaded string_enum v0.4.2
  Downloaded stacker v0.1.15
  Downloaded stable_deref_trait v1.2.0
  Downloaded sptr v0.3.2
  Downloaded smartstring v1.0.1
  Downloaded smallvec v1.11.2
  Downloaded siphasher v0.3.10
  Downloaded serde_json v1.0.111
  Downloaded semver-parser v0.7.0
  Downloaded semver v1.0.17
  Downloaded semver v0.9.0
  Downloaded rustix v0.38.28
  Downloaded new_debug_unreachable v1.0.4
  Downloaded gimli v0.26.2
  Downloaded ast_node v0.9.6
  Downloaded generic-array v0.14.5
  Downloaded fxprof-processed-profile v0.6.0
  Downloaded fxhash v0.2.1
  Downloaded futures-sink v0.3.30
  Downloaded futures-io v0.3.30
  Downloaded futures v0.3.30
  Downloaded fs-set-times v0.20.1
  Downloaded from_variant v0.1.7
  Downloaded form_urlencoded v1.2.0
  Downloaded fallible-iterator v0.3.0
  Downloaded fallible-iterator v0.2.0
  Downloaded errno v0.3.8
  Downloaded equivalent v1.0.1
  Downloaded encoding_rs v0.8.33
  Downloaded dirs-sys-next v0.1.2
  Downloaded dirs-next v2.0.0
  Downloaded directories-next v2.0.0
  Downloaded digest v0.10.6
  Downloaded debugid v0.8.0
  Downloaded data-encoding v2.4.0
  Downloaded crypto-common v0.1.6
  Downloaded crossbeam-epoch v0.9.7
  Downloaded crossbeam-deque v0.8.1
  Downloaded crossbeam-channel v0.5.2
  Downloaded crc32fast v1.3.2
  Downloaded cranelift-wasm v0.103.0
  Downloaded cranelift-native v0.103.0
  Downloaded cranelift-isle v0.103.0
  Downloaded cranelift-frontend v0.103.0
  Downloaded cranelift-entity v0.103.0
  Downloaded cranelift-control v0.103.0
  Downloaded cranelift-codegen-shared v0.103.0
  Downloaded tinyvec v1.6.0
  Downloaded textwrap v0.11.0
  Downloaded target-lexicon v0.12.13
  Downloaded swc_core v0.87.19
  Downloaded strsim v0.8.0
  Downloaded tinyvec_macros v0.1.0
  Downloaded thiserror-impl v1.0.56
  Downloaded thiserror v1.0.56
  Downloaded structopt v0.3.26
  Downloaded static_assertions v1.1.0
  Downloaded scoped-tls v1.0.1
  Downloaded Inflector v0.11.4
  Downloaded 227 crates (20.1 MB) in 5.18s (largest was `wizer` at 2.2 MB)
   Compiling libc v0.2.151
   Compiling syn v2.0.46
   Compiling serde_derive v1.0.194
   Compiling autocfg v1.1.0
   Compiling ahash v0.8.3
   Compiling jobserver v0.1.24
   Compiling cc v1.0.83
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.19.0
   Compiling serde v1.0.194
   Compiling rustix v0.38.28
   Compiling semver v1.0.17
   Compiling target-lexicon v0.12.13
   Compiling thiserror v1.0.56
   Compiling hashbrown v0.14.1
   Compiling equivalent v1.0.1
   Compiling memchr v2.6.4
   Compiling indexmap v2.0.2
   Compiling thiserror-impl v1.0.56
   Compiling serde_json v1.0.111
   Compiling crc32fast v1.3.2
   Compiling cranelift-isle v0.103.0
   Compiling wasmtime-versioned-export-macros v16.0.0
   Compiling io-lifetimes v2.0.3
   Compiling itoa v1.0.4
   Compiling cranelift-codegen-shared v0.103.0
   Compiling typenum v1.15.0
   Compiling cranelift-codegen-meta v0.103.0
   Compiling log v0.4.17
   Compiling cranelift-codegen v0.103.0
   Compiling generic-array v0.14.5
   Compiling crossbeam-utils v0.8.7
   Compiling zstd-sys v2.0.8+zstd.1.5.5
   Compiling memoffset v0.6.5
   Compiling io-lifetimes v1.0.11
   Compiling bitflags v2.4.1
   Compiling io-extras v0.18.1
   Compiling leb128 v0.2.5
   Compiling cap-primitives v2.0.1
   Compiling rustix v0.37.26
   Compiling crossbeam-epoch v0.9.7
   Compiling smallvec v1.11.2
   Compiling wasmtime-fiber v16.0.0
   Compiling ittapi-sys v0.4.0
   Compiling memoffset v0.9.0
   Compiling getrandom v0.2.5
   Compiling zstd-safe v5.0.2+zstd.1.5.2
   Compiling rayon-core v1.9.1
   Compiling rustc-hash v1.1.0
   Compiling rand_core v0.6.3
   Compiling tracing-attributes v0.1.26
   Compiling ppv-lite86 v0.2.16
   Compiling linux-raw-sys v0.4.12
   Compiling rand_chacha v0.3.1
   Compiling wasmtime-runtime v16.0.0
   Compiling cap-std v2.0.1
   Compiling cpp_demangle v0.3.5
   Compiling wasmtime-component-util v16.0.0
   Compiling rand v0.8.5
   Compiling cranelift-entity v0.103.0
   Compiling dirs-sys-next v0.1.2
   Compiling ryu v1.0.9
   Compiling gimli v0.28.0
   Compiling anyhow v1.0.79
   Compiling rayon v1.5.1
   Compiling either v1.6.1
   Compiling paste v1.0.6
   Compiling unicode-width v0.1.9
   Compiling heck v0.4.1
   Compiling wasmtime-cache v16.0.0
   Compiling id-arena v2.2.1
   Compiling unicode-xid v0.2.4
   Compiling wit-parser v0.13.0
   Compiling wasmparser v0.118.1
   Compiling aho-corasick v0.7.18
   Compiling pin-project-lite v0.2.13
   Compiling async-trait v0.1.77
   Compiling regex-syntax v0.6.26
   Compiling regex v1.5.6
   Compiling wasmtime-wit-bindgen v16.0.0
   Compiling dirs-next v2.0.0
   Compiling wast v35.0.2
   Compiling wasm-encoder v0.38.1
   Compiling hashbrown v0.13.2
   Compiling arbitrary v1.3.2
   Compiling slice-group-by v0.3.0
   Compiling tinyvec_macros v0.1.0
   Compiling regalloc2 v0.9.3
   Compiling tinyvec v1.6.0
   Compiling cranelift-control v0.103.0
   Compiling witx v0.9.1
   Compiling shellexpand v2.1.0
   Compiling wasmtime-component-macro v16.0.0
   Compiling object v0.32.1
   Compiling wasmtime-types v16.0.0
   Compiling cranelift-bforest v0.103.0
   Compiling wasi-common v16.0.0
   Compiling bumpalo v3.11.1
   Compiling wiggle-generate v16.0.0
   Compiling unicode-normalization v0.1.22
   Compiling wasmprinter v0.2.75
   Compiling tracing-core v0.1.31
   Compiling siphasher v0.3.10
   Compiling lazy_static v1.4.0
   Compiling unicode-bidi v0.3.13
   Compiling percent-encoding v2.3.0
   Compiling ambient-authority v0.0.2
   Compiling form_urlencoded v1.2.0
   Compiling idna v0.4.0
   Compiling phf_shared v0.11.2
   Compiling tracing v0.1.37
   Compiling wasmtime-environ v16.0.0
   Compiling wiggle-macro v16.0.0
   Compiling fs-set-times v0.20.1
   Compiling num_cpus v1.13.1
   Compiling indexmap v1.9.3
   Compiling swc_macros_common v0.3.9
   Compiling linux-raw-sys v0.3.8
   Compiling cap-fs-ext v2.0.1
   Compiling bitflags v1.3.2
   Compiling maybe-owned v0.3.4
   Compiling system-interface v0.26.1
   Compiling ipnet v2.9.0
   Compiling scopeguard v1.1.0
   Compiling phf_generator v0.11.2
   Compiling url v2.4.1
   Compiling block-buffer v0.10.4
   Compiling crypto-common v0.1.6
   Compiling num-traits v0.2.16
   Compiling wasmtime-asm-macros v16.0.0
   Compiling digest v0.10.6
   Compiling phf_macros v0.11.2
   Compiling memfd v0.6.3
   Compiling crossbeam-deque v0.8.1
   Compiling itertools v0.10.3
   Compiling crossbeam-channel v0.5.2
   Compiling cranelift-native v0.103.0
   Compiling cranelift-frontend v0.103.0
   Compiling wasmtime-jit-debug v16.0.0
   Compiling Inflector v0.11.4
   Compiling bincode v1.3.3
   Compiling num-integer v0.1.45
   Compiling encoding_rs v0.8.33
   Compiling pmutil v0.6.1
   Compiling wasmtime-wmemcheck v16.0.0
   Compiling byteorder v1.4.3
   Compiling sptr v0.3.2
   Compiling uuid v1.6.1
   Compiling cpufeatures v0.2.1
   Compiling sha2 v0.10.6
   Compiling debugid v0.8.0
   Compiling wast v69.0.1
   Compiling fxhash v0.2.1
   Compiling cranelift-wasm v0.103.0
   Compiling wasmtime-cranelift-shared v16.0.0
   Compiling phf v0.11.2
   Compiling addr2line v0.21.0
   Compiling directories-next v2.0.0
   Compiling toml v0.5.8
   Compiling num-bigint v0.4.3
   Compiling wasmtime-jit-icache-coherence v16.0.0
   Compiling unicode-segmentation v1.9.0
   Compiling rustc-demangle v0.1.21
   Compiling base64 v0.21.0
   Compiling new_debug_unreachable v1.0.4
   Compiling hstr v0.2.6
   Compiling heck v0.3.3
   Compiling wasmtime-cranelift v16.0.0
   Compiling fxprof-processed-profile v0.6.0
   Compiling wat v1.0.82
   Compiling swc_visit_macros v0.5.9
   Compiling if_chain v1.0.2
   Compiling rustversion v1.0.14
   Compiling wasmtime-wasi v16.0.0
   Compiling unicode-id v0.3.3
   Compiling scoped-tls v1.0.1
   Compiling data-encoding v2.4.0
   Compiling sourcemap v6.2.3
   Compiling better_scoped_tls v0.1.1
   Compiling swc_visit v0.5.8
   Compiling swc_atoms v0.6.5
   Compiling ast_node v0.9.6
   Compiling from_variant v0.1.7
   Compiling swc_eq_ignore_macros v0.1.3
   Compiling futures-core v0.3.30
   Compiling syn v1.0.109
   Compiling futures-sink v0.3.30
   Compiling swc_common v0.33.12
   Compiling is-macro v0.3.0
   Compiling string_enum v0.4.2
   Compiling cap-rand v2.0.1
   Compiling psm v0.1.17
   Compiling iana-time-zone v0.1.59
   Compiling futures-task v0.3.30
   Compiling futures-util v0.3.30
   Compiling cap-time-ext v2.0.1
   Compiling swc_ecma_ast v0.110.17
   Compiling vergen v8.2.6
   Compiling futures-channel v0.3.30
   Compiling stacker v0.1.15
   Compiling smartstring v1.0.1
   Compiling socket2 v0.5.5
   Compiling mio v0.8.9
   Compiling proc-macro-error-attr v1.0.4
   Compiling hashbrown v0.12.3
   Compiling futures-io v0.3.30
   Compiling futures v0.3.30
   Compiling tokio v1.35.1
   Compiling cap-net-ext v2.0.1
   Compiling cmake v0.1.48
   Compiling proc-macro-error v1.0.4
   Compiling pin-utils v0.1.0
   Compiling static_assertions v1.1.0
   Compiling binaryen-sys v0.12.1 (https://github.com/pepyakin/binaryen-rs?rev=00c98174843f957681ba0bc5cdcc9d15f5d0cb23#00c98174)
   Compiling wasmparser v0.106.0
   Compiling swc_ecma_visit v0.96.17
   Compiling wasm-encoder v0.30.0
   Compiling alloc-no-stdlib v2.0.4
   Compiling typed-arena v2.0.2
   Compiling bytes v1.5.0
   Compiling swc_ecma_parser v0.141.37
   Compiling alloc-stdlib v0.2.2
   Compiling swc_ecma_utils v0.125.4
   Compiling swc_core v0.87.19
   Compiling textwrap v0.11.0
   Compiling atty v0.2.14
   Compiling fallible-iterator v0.2.0
   Compiling strsim v0.8.0
   Compiling vec_map v0.8.2
   Compiling stable_deref_trait v1.2.0
   Compiling ansi_term v0.12.1
   Compiling clap v2.34.0
   Compiling gimli v0.26.2
   Compiling structopt-derive v0.4.18
   Compiling swc_ecma_transforms_base v0.135.11
   Compiling brotli-decompressor v2.5.0
   Compiling walrus-macro v0.19.0
   Compiling wasm-encoder v0.29.0
   Compiling wasmparser v0.80.2
   Compiling walrus v0.20.3
   Compiling convert_case v0.6.0
   Compiling brotli v3.4.0
   Compiling structopt v0.3.26
   Compiling ittapi v0.4.0
   Compiling wasmtime-jit v16.0.0
   Compiling binaryen v0.12.1 (https://github.com/pepyakin/binaryen-rs?rev=00c98174843f957681ba0bc5cdcc9d15f5d0cb23#00c98174)
   Compiling zstd v0.11.2+zstd.1.5.2
   Compiling wasmtime v16.0.0
   Compiling wiggle v16.0.0
   Compiling wasi-cap-std-sync v16.0.0
   Compiling wizer v4.0.0
   Compiling javy-cli v1.4.0 (/javy/crates/cli)
    Finished release [optimized] target(s) in 148m 24s
root@6d14386e3e10:/javy# echo $?
0
root@6d14386e3e10:/javy# target/release/javy --help
javy 1.4.0
JavaScript to WebAssembly toolchain

USAGE:
    javy <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    compile          Compiles JavaScript to WebAssembly
    emit-provider    Emits the provider binary that is required to run dynamically linked WebAssembly modules
    help             Prints this message or the help of the given subcommand(s)

Our latest CI run including operating system is viewable at https://github.com/bytecodealliance/javy/actions/runs/7702160449/job/20990013509#step:1:4. Granted this runs CARGO_PROFILE_RELEASE_LTO=off cargo test --package=javy-cli --release -- --nocapture instead of cargo build but the test operation does perform a compilation since a number of the tests use the Javy CLI binary.

I can try compiling on Debian Trixie and the latest non-LTS Ubuntu. I can't guarantee support for compiling with Debian testing but at some point in the future we'll want to update to using Ubuntu 24.04 in our CI environment. So if there's an issue with Ubuntu 23.10 because of a C++ standard library change, we can track that as something we'll need to address. We don't have the resources to support compilation in other Linux environments without external contributions. In the meantime, I would recommend using Ubuntu 22.04 to build.

It does sound like there's likely something that needs to be changed in https://github.com/pepyakin/binaryen-rs to get it compiling in your environment.

jeffcharles commented 7 months ago

I ran the same test using Ubuntu 23.10 and confirmed that Javy fails to build in the same way that it fails to build on Debian Trixie:

  [ 83%] Building CXX object src/wasm/CMakeFiles/wasm.dir/wat-lexer.cpp.o

  --- stderr
  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS

  gmake: warning: -j1 forced in submake: resetting jobserver mode.
  In file included from /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:25:
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:62:3: error: unknown type name 'uint64_t'
    uint64_t n;
    ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:75:17: error: use of undeclared identifier 'uint64_t'
    std::optional<uint64_t> nanPayload;
                  ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:127:17: error: use of undeclared identifier 'uint64_t'
    std::optional<uint64_t> getU64() const;
                  ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:129:17: error: use of undeclared identifier 'uint64_t'
    std::optional<uint64_t> getI64() const;
                  ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:130:17: error: use of undeclared identifier 'uint32_t'
    std::optional<uint32_t> getU32() const;
                  ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wat-lexer.h:132:17: error: use of undeclared identifier 'uint32_t'
    std::optional<uint32_t> getI32() const;
                  ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:66:3: error: unknown type name 'uint8_t'
    uint8_t peek() const { return next()[0]; }
    ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:125:3: error: unknown type name 'uint64_t'
    uint64_t n;
    ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:135:3: error: unknown type name 'uint64_t'
    uint64_t n = 0;
    ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:144:30: error: cannot initialize object parameter of type 'const wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      if (auto basic = LexCtx::lexed()) {
                               ^~~~~
  In file included from /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:21:
  /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/optional:749:4: error: type '_Base' (aka '_Optional_base<wasm::WATParser::(anonymous namespace)::LexIntResult>') is not a direct or virtual base of 'std::optional<wasm::WATParser::(anonymous namespace)::LexIntResult>'
          : _Base(std::in_place, std::forward<_Up>(__t)) { }
            ^~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:145:14: note: in instantiation of function template specialization 'std::optional<wasm::WATParser::(anonymous namespace)::LexIntResult>::optional<wasm::WATParser::(anonymous namespace)::LexIntResult, true>' requested here
        return LexIntResult{*basic, 0, NoSign};
               ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:154:30: error: cannot initialize object parameter of type 'const wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      if (auto basic = LexCtx::lexed()) {
                               ^~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:161:9: error: cannot initialize object parameter of type 'wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      if (takePrefix("+"sv)) {
          ^~~~~~~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:163:16: error: cannot initialize object parameter of type 'wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      } else if (takePrefix("-"sv)) {
                 ^~~~~~~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:171:10: error: cannot initialize object parameter of type 'const wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      if (!empty()) {
           ^~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:173:9: error: cannot initialize object parameter of type 'wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
          take(1);
          ^~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:174:9: error: unknown type name 'uint64_t'
          uint64_t newN = n * 10 + *d;
          ^
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:186:10: error: cannot initialize object parameter of type 'const wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
      if (!empty()) {
           ^~~~~
  /root/.cargo/git/checkouts/binaryen-rs-2ef43ee92a3c1c21/00c9817/binaryen-sys/binaryen/src/wasm/wat-lexer.cpp:188:9: error: cannot initialize object parameter of type 'wasm::WATParser::(anonymous namespace)::LexCtx' with an expression of type 'wasm::WATParser::(anonymous namespace)::LexIntCtx'
          take(1);
          ^~~~
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  gmake[2]: *** [src/wasm/CMakeFiles/wasm.dir/build.make:244: src/wasm/CMakeFiles/wasm.dir/wat-lexer.cpp.o] Error 1
  gmake[1]: *** [CMakeFiles/Makefile2:523: src/wasm/CMakeFiles/wasm.dir/all] Error 2
  gmake: *** [Makefile:136: all] Error 2
  thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.48/src/lib.rs:975:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Looks like we'll need to figure out what to do about binaryen-rs not compiling.

jeffcharles commented 7 months ago

Making the change suggested in #315 seems like it could also work

jeffcharles commented 7 months ago

@ieugen if you want to make the change suggested in #315 and see if that fixes the build, I can review and ship it. Otherwise we'll likely address this some time in the late February or March time frame.

jeffcharles commented 7 months ago

Also realized #397 appears to also have the same cause.

ieugen commented 7 months ago

hi @jeffcharles I'll take a look at wasm-otps-rs but it might take some time (not familiar with the stuff). But don't wait on me.

jeffcharles commented 7 months ago

I tested these changes with Ubuntu 23.10 and it looks like it compiles now.