Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed wasm build for zstd #12572

Closed
1 task done
emhane opened this issue Nov 15, 2024 · 2 comments
Closed
1 task done

Failed wasm build for zstd #12572

emhane opened this issue Nov 15, 2024 · 2 comments
Labels
A-dependencies Pull requests or issues that are about dependencies C-bug An unexpected or incorrect behavior

Comments

@emhane
Copy link
Member

emhane commented Nov 15, 2024

Describe the bug

Fails to build wasm due to dep zstd-sys v2.0.13+zstd.1.5.6.

Steps to reproduce

cargo +stable build -p reth-evm --target wasm32-wasip1 --no-default-features

Node logs

Compiling clap v4.5.20
The following warnings were emitted during compilation:

warning: [email protected]+zstd.1.5.6: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
warning: [email protected]+zstd.1.5.6: 1 error generated.
warning: [email protected]+zstd.1.5.6: ToolExecError: Command "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fno-exceptions" "-g" "-fno-omit-frame-pointer" "--target=wasm32-wasip1" "-I" "wasm-shim/" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out/8957a4c8b028b07b-debug.o" "-c" "zstd/lib/common/debug.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'

...

error: failed to run custom build command for `zstd-sys v2.0.13+zstd.1.5.6`

Caused by:
  process didn't exit successfully: `/Users/emhane/repos/reth/target/debug/build/zstd-sys-ad0dc1d0f130f1cf/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=ZSTD_SYS_USE_PKG_CONFIG
  cargo:rustc-cfg=feature="std"
  cargo:rerun-if-changed=wasm-shim/stdlib.h
  cargo:rerun-if-changed=wasm-shim/string.h
  OUT_DIR = Some(/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out)
  OPT_LEVEL = Some(0)
  TARGET = Some(wasm32-wasip1)
  HOST = Some(aarch64-apple-darwin)
  cargo:rerun-if-env-changed=CC_wasm32-wasip1
  CC_wasm32-wasip1 = None
  cargo:rerun-if-env-changed=CC_wasm32_wasip1
  CC_wasm32_wasip1 = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  RUSTC_WRAPPER = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=WASI_SYSROOT
  WASI_SYSROOT = None
  DEBUG = Some(true)
  cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
  CFLAGS_wasm32-wasip1 = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
  CFLAGS_wasm32_wasip1 = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  OUT_DIR = Some(/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  TARGET = Some(wasm32-wasip1)
  cargo:rerun-if-env-changed=WASI_SYSROOT
  WASI_SYSROOT = None
  HOST = Some(aarch64-apple-darwin)
  cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
  CFLAGS_wasm32-wasip1 = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
  CFLAGS_wasm32_wasip1 = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  OUT_DIR = Some(/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  TARGET = Some(wasm32-wasip1)
  cargo:rerun-if-env-changed=WASI_SYSROOT
  WASI_SYSROOT = None
  HOST = Some(aarch64-apple-darwin)
  cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
  CFLAGS_wasm32-wasip1 = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
  CFLAGS_wasm32_wasip1 = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  OUT_DIR = Some(/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out)
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  TARGET = Some(wasm32-wasip1)
  cargo:rerun-if-env-changed=WASI_SYSROOT
  WASI_SYSROOT = None
  HOST = Some(aarch64-apple-darwin)
  cargo:rerun-if-env-changed=CFLAGS_wasm32-wasip1
  CFLAGS_wasm32-wasip1 = None
  cargo:rerun-if-env-changed=CFLAGS_wasm32_wasip1
  CFLAGS_wasm32_wasip1 = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
  cargo:warning=1 error generated.
  exit status: 1
  cargo:warning=ToolExecError: Command "clang" "-O0" "-ffunction-sections" "-fdata-sections" "-fno-exceptions" "-g" "-fno-omit-frame-pointer" "--target=wasm32-wasip1" "-I" "wasm-shim/" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/Users/emhane/repos/reth/target/wasm32-wasip1/debug/build/zstd-sys-ea2023644f0031d2/out/8957a4c8b028b07b-debug.o" "-c" "zstd/lib/common/debug.c" with args clang did not execute successfully (status code exit status: 1).cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasip1"'
  cargo:warning=1 error generated.

Platform(s)

Mac (Apple Silicon)

What version/commit are you on?

commit 5f66fa4

What database version are you on?

n.a.

Which chain / network are you on?

n.a.

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@emhane emhane added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Nov 15, 2024
@emhane emhane added A-dependencies Pull requests or issues that are about dependencies and removed S-needs-triage This issue needs to be labelled labels Nov 15, 2024
@emhane
Copy link
Member Author

emhane commented Nov 19, 2024

@fgimenez this can be closed right?

@fgimenez
Copy link
Member

yep i think so

@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Pull requests or issues that are about dependencies C-bug An unexpected or incorrect behavior
Projects
Status: Done
Development

No branches or pull requests

2 participants