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

build error: 'failed to build archive: wasm32.o: section too large' #1381

Open
baoyachi opened this issue Apr 15, 2024 · 0 comments
Open

build error: 'failed to build archive: wasm32.o: section too large' #1381

baoyachi opened this issue Apr 15, 2024 · 0 comments

Comments

@baoyachi
Copy link

build log:

➜  rust-demo git:(master) wasm-pack build --target bundler                           
[INFO]: 🎯  Checking for the Wasm target...
[INFO]: πŸŒ€  Compiling to Wasm...
   Compiling cc v1.0.90
   Compiling version_check v0.9.4
   Compiling libc v0.2.153
   Compiling cfg-if v1.0.0
   Compiling once_cell v1.19.0
   Compiling zerocopy v0.7.32
   Compiling chumsky v1.0.0-alpha.7
   Compiling allocator-api2 v0.2.16
   Compiling unicode-ident v1.0.12
   Compiling demo v0.1.0 (~/rust-demo)
   Compiling ahash v0.8.11
   Compiling psm v0.1.21
   Compiling stacker v0.1.15
   Compiling hashbrown v0.14.3
error: failed to build archive: 'wasm32.o': section too large

The following warnings were emitted during compilation:

warning: psm@0.1.21: warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: ~/rust-demo/target/wasm32-unknown-unknown/release/build/psm-e7819be911e6050d/out/libpsm_s.a the table of contents is empty (no object file members in the library define global symbols)

error: could not compile `psm` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
Error: Compiling your crate to WebAssembly failed
Caused by: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit status: 101
  full command: cd "~/rust-demo" && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
➜  rust-demo git:(master)
  • Cargo.toml file
[package]
name = "demo"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
chumsky = "1.0.0-alpha.6"

ref:zesterer/chumsky#622

@baoyachi baoyachi changed the title build error: 'failed to build archive: 'wasm32.o': section too large' build error: 'failed to build archive: wasm32.o: section too large' Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant