You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"recursive" Dependency Causes "section too large" Error When Compiling for wasm #13513
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: psm@0.1.24: 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
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[/+]on Nov 21, 2024
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[/+]on Nov 21, 2024
When I build with: cargo build --target wasm32-unknown-unknown ,
it successfully compiles and generates the binary.
However, in the release mode: cargo build --release --target wasm32-unknown-unknown,
Compiling psm v0.1.24
Compiling arrow-ipc v53.3.0
Compiling arrow-json v53.3.0
Compiling arrow-csv v53.3.0
Compiling stacker v0.1.17
Compiling recursive v0.1.1
error: failed to build archive at `/Users/berkaysahin/Desktop/datafusion-upstream/target/wasm32-unknown-unknown/release/deps/libpsm-cc498cff4b514c30.rlib`: LLVM error: section too large
The following warnings were emitted during compilation:
warning: psm@0.1.24: warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: /Users/berkaysahin/Desktop/datafusion-upstream/target/wasm32-unknown-unknown/release/build/psm-d273ebae732f9287/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...
I don't know why this still refers to Xcode path.
Since wasm-pack build goes with release flag, we need to solve this (assuming I am not the only one)
error: failed to build archive at `[cut]/wasm32-unknown-unknown/release/deps/libpsm-5686a1fe6f354cae.rlib`: LLVM error: section too large
warning: psm@0.1.24: warning: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: [cut]wasm32-unknown-unknown/release/build/psm-2da2e2ac984ce6da/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
Activity
[-]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[/+][-]"recursive" Dependency Causes "section too large" Error When Compiling for wasm32-unknown-unknown[/-][+]"recursive" Dependency Causes "section too large" Error When Compiling for wasm[/+]Eason0729 commentedon Nov 26, 2024
I have try to reproduce the bug by either build wasmtest or build
stackerwith wasm32-unknown-unknown, but was unable to reproduce the issue.Can you provide more information? (cargo and rustc version...)
blaginin commentedon Nov 26, 2024
This obviously doesn't resolve the issue, but wasm-bindgen/wasm-pack#1381 (comment) fixed it for me
berkaysynnada commentedon Nov 29, 2024
I have applied the @blaginin suggestion:
@Eason0729 these are my cargo and rust versions
When I build with:
cargo build --target wasm32-unknown-unknown,it successfully compiles and generates the binary.
However, in the release mode:
cargo build --release --target wasm32-unknown-unknown,I don't know why this still refers to Xcode path.
Since wasm-pack build goes with release flag, we need to solve this (assuming I am not the only one)
Eason0729 commentedon Dec 1, 2024
It compiles under 1.82.0 and 1.83.0(didn't use LLVM 15), I think it's LLVM version related.
In addition, I may need some help on how to use specific version of LLVM?
peter-toth commentedon Dec 14, 2024
@berkaysynnada, is this sill an issue? wasm-bindgen/wasm-pack#1381 (comment) seems to work for me too.
berkaysynnada commentedon Dec 14, 2024
That worked for me now (and passed the tests). Perhaps I should have tried with cargo clean 😞
robtaylor commentedon Jan 22, 2025
I'm still getting this issue. Mac M4 with Sequoia 15.2.
Eason0729 commentedon Jan 24, 2025
This should works on Mac, but I didn't have one to test.
We should try figuring out the reason. If we couldn't, maybe just make
recursivearch-dependant dependencies(which will be another issue to open).