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

"recursive" Dependency Causes "section too large" Error When Compiling for wasm #13513

Open
berkaysynnada opened this issue Nov 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@berkaysynnada
Copy link
Contributor

berkaysynnada commented Nov 21, 2024

Describe the bug

I am encountering a problem when trying to compile wasmtest with the following command:

RUSTFLAGS="-C link-arg=--max-memory=4294967296" cargo build --release --target wasm32-unknown-unknown

The build fails with the following error:

error: failed to build archive at `.../target/wasm32-unknown-unknown/release/deps/libpsm-cc498cff4b514c30.rlib`: LLVM error: section too large

The following warnings were emitted during compilation:

warning: [email protected]: warning: ...

I suspect the issue is related to the psm dependency, and it is coming with recursive crate, which was introduced in #13310. I am unsure if this error can be resolved without removing or replacing this dependency.

To Reproduce

Go in datafusion/wasmtest and run cargo build --target wasm32-unknown-unknown

Expected behavior

It needs to compile

Additional context

I tried again after removing recursive dep, and it works successfully

@berkaysynnada berkaysynnada added the bug Something isn't working label Nov 21, 2024
@berkaysynnada berkaysynnada changed the title recursive Dependency Causes "section too large" Error When Compiling for wasm32-unknown-unknown "recursive" Dependency Causes "section too large" Error When Compiling for wasm32-unknown-unknown Nov 21, 2024
@berkaysynnada berkaysynnada changed the title "recursive" Dependency Causes "section too large" Error When Compiling for wasm32-unknown-unknown "recursive" Dependency Causes "section too large" Error When Compiling for wasm Nov 21, 2024
@Eason0729
Copy link
Contributor

I have try to reproduce the bug by either build wasmtest or build stacker with wasm32-unknown-unknown, but was unable to reproduce the issue.

Can you provide more information? (cargo and rustc version...)

@blaginin
Copy link
Contributor

This obviously doesn't resolve the issue, but rustwasm/wasm-pack#1381 (comment) fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants