dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Failed to build was app. wasm-opt failed with status code 6

Open gavrik opened this issue 2 months ago • 3 comments

Problem

While building release app wasm-opt failed with status code 6.

0.915s DEBUG dx::wasm_opt: Running wasm-opt: /Users/gavrik/.dx/binaryen/bin/wasm-opt /Users/gavrik/Documents/Projects/POC/dioxus_poc/count_live/target/dx/count_live/release/web/public/wasm/count_live_bg.wasm -Oz -o /var/folders/bt/j02lx_x578xbxff6l3_sdnxc0000gn/T/.tmpCkqFXQ --enable-reference-types --enable-bulk-memory --enable-mutable-globals --enable-nontrapping-float-to-int --debuginfo
1.261s ERROR dx::wasm_opt: wasm-opt failed with status code signal: 6 (SIGABRT)
stderr:
stdout: compile unit size was incorrect (this may be an unsupported version of DWARF)
UNREACHABLE executed at /private/tmp/binaryen-20251119-4855-lk9esp/binaryen-version_125/third_party/llvm-project/DWARFEmitter.cpp:201!

if execute build process with --debug-symbols=false everything was builded correct.

dx build --release --web --verbose --debug-symbols=false
0.697s DEBUG dx::wasm_opt: Running wasm-opt: /Users/gavrik/.dx/binaryen/bin/wasm-opt /Users/gavrik/Documents/Projects/POC/dioxus_poc/count_live/target/dx/count_live/release/web/public/wasm/count_live_bg.wasm -Oz -o /var/folders/bt/j02lx_x578xbxff6l3_sdnxc0000gn/T/.tmpO176vv --enable-reference-types --enable-bulk-memory --enable-mutable-globals --enable-nontrapping-float-to-int --strip-debug

Steps To Reproduce

dx build --release --web --verbose

Expected behavior

build with success status code.

Environment:

  • Dioxus version: 0.7.2
  • Rust version: rustc 1.92.0
  • OS info: MacOs 26.1
  • App platform: web
  • wasm-opt: 125

gavrik avatar Dec 19 '25 14:12 gavrik

Hi, I'm getting the same error when I try to upgrade our application to Dioxus 0.7.2:

  29.547s  INFO Compiled [312/314]: dioxus_fullstack
  29.940s  INFO Compiled [313/314]: dioxus
  32.411s  INFO Compiled [314/314]: cockpit
  32.516s  INFO Bundling app...
  32.517s  INFO Running wasm-bindgen...
  33.777s ERROR wasm-opt failed with status code signal: 6 (SIGABRT)
stderr: 
stdout: compile unit size was incorrect (this may be an unsupported version of DWARF)
UNREACHABLE executed at /Users/runner/work/binaryen/binaryen/third_party/llvm-project/DWARFEmitter.cpp:201!

With previous version 0.7.1 of the dx-cli it worked fine.

Our command line is: dx bundle --web --release

My environment:

  • Dioxus: 0.7.2
  • Rust version: 1.92.0
  • OS: MacOS 26.2 and Linux
  • App plattform: web

mofterdinger avatar Dec 19 '25 14:12 mofterdinger

There seems to be something odd going on with the debug symbols emitted by Dioxus 0.7.2. As a workaround for now, you can disable them by passing the --debug-symbols=false argument to your build commands.

Moxinilian avatar Dec 20 '25 17:12 Moxinilian

thanks for the workaround!

does the failure result in any further issues? even after having failed wasm-opt my bundles seem to work just fine, could that be the case?

jarjk avatar Dec 22 '25 12:12 jarjk