#1140668 wasm-tools: upcoming gimli update (FTBFS against gimli 0.32 / backtrace stack transition)

Package:
wasm-tools
Source:
wasm-tools
Description:
low-level manipulation of WebAssembly modules - CLI tool
Submitter:
Greg Lamberson
Date:
2026-06-24 10:53:02 UTC
Severity:
normal
Tags:
#1140668#5
Date:
2026-06-24 10:50:34 UTC
From:
To:
Hi,

This is a heads-up that wasm-tools will FTBFS once the backtrace stack
transition (object 0.37, gimli 0.32, addr2line 0.25, ruzstd 0.8,
backtrace 0.3.76), currently staged in experimental by Peter Green, is
rebuilt against / migrates to unstable. It is the same class of breakage
as the sibling bugs #1140646 (rust-wasmtime), #1140647 (hx) and #1140648
(rust-walrus).

wasm-tools build-depends on the unversioned librust-gimli-dev /
librust-addr2line-dev, so a plain binNMU will not be enough: its Cargo.toml
pins gimli "0.31.1" and addr2line "0.24.0", and its bundled crates/wast uses
the gimli 0.31 form of gimli::write::LineProgram::new, which changed in 0.32.

Building 1.239.0+ds-9 against the experimental stack (sbuild unstable +
the new -dev debs supplied via --extra-package) fails at:

    error[E0061]: this function takes 6 arguments but 5 arguments were supplied
       --> crates/wast/src/core/binary/dwarf.rs:95:35
        |
     95 |         dwarf.unit.line_program = LineProgram::new(
        |                                   ^^^^^^^^^^^^^^^^^
     ...
        | argument #6 of type `Option<FileInfo>` is missing
        |
    note: associated function defined here
       --> gimli-0.32.3/src/write/line.rs:102

gimli 0.32's write::LineProgram::new gained an extra argument (the prior
5-arg form is now 6 args). This is exactly the change Peter Green already
fixed for the standalone wast crate in rust-wast 239.0.0-2 (experimental),
in debian/patches/upstream-dependency-updates.patch: insert `None` after the
comp_dir LineString. wasm-tools carries its own copy of crates/wast, so it
needs the same one-line port plus the dependency relax.

The complete fix is the two-part patch below (a dependency relax to gimli
0.32 / addr2line 0.25, and the one-line dwarf.rs port). With it applied, the
package builds cleanly against the experimental stack (Status: successful,
binary + dbgsym produced, dh_auto_test green). An alternative, if you would
rather not carry a duplicate of the wast port, is to de-vendor crates/wast
onto the system librust-wast-dev, which already carries Peter's fix in
experimental.
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -113,7 +113,7 @@
 clap_complete = "4.4.7"
 comfy-table = { version = "7.1.3", default-features = false }
 env_logger = "0.11"
-gimli = "0.31.1"
+gimli = "0.32"
 hashbrown = { version = ">= 0.15.2, <= 0.16", default-features = false, features = ['default-hasher'] }
 id-arena = "2"
 indexmap = { version = "2.7.0", default-features = false }
@@ -208,7 +208,7 @@
 wit-smith = { workspace = true, features = ["clap"], optional = true }

 # Dependencies of `addr2line`
-addr2line = { version = "0.24.0", optional = true }
+addr2line = { version = "0.25", optional = true }
 gimli = { workspace = true, optional = true }

 # Dependencies of `wast`
--- a/crates/wast/src/core/binary/dwarf.rs
+++ b/crates/wast/src/core/binary/dwarf.rs
@@ -96,6 +96,7 @@ impl<'a> Dwarf<'a> {
             encoding,
             LineEncoding::default(),
             LineString::StringRef(comp_dir_ref),
+            None,
             LineString::StringRef(comp_file_ref),
             None,
         );

Reproduction: sbuild --dist=unstable with object 0.37.3-1, gimli 0.32.3-1,
addr2line 0.25.1-1, ruzstd 0.8.3-1 and backtrace 0.3.76+dfsg-1 from
experimental added via --extra-package; rust-wast 239.0.0-2 (experimental)
is also needed at build-dep resolution time.

Thanks,
Greg Lamberson