Skip to content

fix: disable wasm-opt for ironrdp pkg release build#50178

Closed
chenrui333 wants to merge 1 commit intogravitational:masterfrom
chenrui333:disable-wasi-opt
Closed

fix: disable wasm-opt for ironrdp pkg release build#50178
chenrui333 wants to merge 1 commit intogravitational:masterfrom
chenrui333:disable-wasi-opt

Conversation

@chenrui333
Copy link
Copy Markdown

@chenrui333 chenrui333 commented Dec 12, 2024

👋 seeing some release build issue while building the teleport 17.0.5 wrt wasm-opt

  [INFO]: Optimizing wasm binaries with `wasm-opt`...
  [wasm-validator error in function fastpathprocessor_process\20externref\20shim] unexpected false: table.fill requires bulk-memory [--enable-bulk-memory], on 
  (table.fill $1
   (local.get $8)
   (ref.null noextern)
   (i32.const 4)
  )
  Fatal: error validating input
  Error: failed to execute `wasm-opt`: exited with exit status: 1
    full command: "/tmp/teleport-20241211-7965-9zz4yc/teleport-17.0.5/.brew_home/.cache/.wasm-pack/wasm-opt-1ceaaea8b7b5f7e0/bin/wasm-opt" "src/ironrdp/pkg/ironrdp_bg.wasm" "-o" "src/ironrdp/pkg/ironrdp_bg.wasm-opt.wasm" "-O"
  To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
  Caused by: failed to execute `wasm-opt`: exited with exit status: 1
    full command: "/tmp/teleport-20241211-7965-9zz4yc/teleport-17.0.5/.brew_home/.cache/.wasm-pack/wasm-opt-1ceaaea8b7b5f7e0/bin/wasm-opt" "src/ironrdp/pkg/ironrdp_bg.wasm" "-o" "src/ironrdp/pkg/ironrdp_bg.wasm-opt.wasm" "-O"
  To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
   ELIFECYCLE  Command failed with exit code 1.
  /tmp/teleport-20241211-7965-9zz4yc/teleport-17.0.5/web/packages/teleport:
   ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @gravitational/teleport@1.0.0 build: `pnpm build-wasm && vite build`
  Exit status 1
   ELIFECYCLE  Command failed with exit code 1.
  make[1]: *** [Makefile:1771: build-ui] Error 1

Disabling the opt works for my release build.

build setup:

  • node: 23.4.0
  • go: 1.23.4
  • rust: 1.83.0
  • wasm-pack: 0.13.1

Signed-off-by: Rui Chen <rui@chenrui.dev>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Dec 12, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 12, 2024

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@chenrui333
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@chenrui333
Copy link
Copy Markdown
Author

chenrui333 commented Dec 12, 2024

recheck

@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Dec 13, 2024

I would try with wasm-pack 0.12.1, which is what we use for official releases.

This is probably okay, but I would want to have a better understanding of why the change is necessary before proceeding.

@chenrui333
Copy link
Copy Markdown
Author

I would try with wasm-pack 0.12.1, which is what we use for official releases.

unfortunately, I dont have that option (we always use the latest wasm-pack on the homebrew side, I am happy to let it open until teleport upgrade to use wasm-pack 0.13.1+)

This is probably okay, but I would want to have a better understanding of why the change is necessary before proceeding.

this has been turned off for many projects, not just this one (historically it failed with something like this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants