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

relese build causes SIGSEGV and SIGBUS while dev build is just fine #2590

Closed
ta3pks opened this issue May 12, 2024 · 3 comments
Closed

relese build causes SIGSEGV and SIGBUS while dev build is just fine #2590

ta3pks opened this issue May 12, 2024 · 3 comments

Comments

@ta3pks
Copy link

ta3pks commented May 12, 2024

Describe the bug
When running release build wasm panics fails to build giving the following output

      Cargo finished cargo build --package=build_fails --lib --target-dir=/Users/nikos/.cargo_build/front --target=wasm32-unknown-unknown --no-default-features --features=hydrate --profile=wasm-release
       Front compiling WASM
   Compiling proc-macro2 v1.0.82
   Compiling serde v1.0.201
   Compiling libc v0.2.154
   Compiling slab v0.4.9
   Compiling wasm-bindgen-shared v0.2.92
   Compiling log v0.4.21
   Compiling futures-io v0.3.30
   Compiling pin-utils v0.1.0
error: failed to run custom build command for `proc-macro2 v1.0.82`

Caused by:
  process didn't exit successfully: `/Users/nikos/.cargo_build/release/build/proc-macro2-4389c0b0b07a440b/build-script-build` (signal: 10, SIGBUS: access to undefined memory)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `serde v1.0.201`

Caused by:
  process didn't exit successfully: `/Users/nikos/.cargo_build/release/build/serde-1636c9b85f2ab134/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
error: failed to run custom build command for `libc v0.2.154`

Caused by:
  process didn't exit successfully: `/Users/nikos/.cargo_build/release/build/libc-32c6dd0460c9484e/build-script-build` (signal: 10, SIGBUS: access to undefined memory)
error: failed to run custom build command for `wasm-bindgen-shared v0.2.92`

Caused by:
  process didn't exit successfully: `/Users/nikos/.cargo_build/release/build/wasm-bindgen-shared-db7003eb6414ef20/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
error: failed to run custom build command for `slab v0.4.9`

Caused by:
  process didn't exit successfully: `/Users/nikos/.cargo_build/release/build/slab-7a33c5c56d61a557/build-script-build` (signal: 10, SIGBUS: access to undefined memory)
Error: Failed to build build_fails

Leptos Dependencies

[dependencies]
axum = { version = "0.7", optional = true }
console_error_panic_hook = "0.1"
leptos = { version = "0.6" }
leptos_axum = { version = "0.6", optional = true }
leptos_meta = { version = "0.6" }
leptos_router = { version = "0.6" }
tokio = { version = "1", features = ["rt-multi-thread"], optional = true }
tower = { version = "0.4", optional = true }
tower-http = { version = "0.5", features = ["fs"], optional = true }
wasm-bindgen = "=0.2.92"
thiserror = "1"
tracing = { version = "0.1", optional = true }
http = "1"

[features]
hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"]
ssr = [
    "dep:axum",
    "dep:tokio",
    "dep:tower",
    "dep:tower-http",
    "dep:leptos_axum",
    "leptos/ssr",
    "leptos_meta/ssr",
    "leptos_router/ssr",
    "dep:tracing",
]

To Reproduce
Steps to reproduce the behavior:

  1. cargo leptos new -g leptos-rs/start-axum -n build_fails
  2. cd build_fails
  3. cargo leptos build -r
  4. See error

Expected behavior
Should build just fine

Screenshots
image

@gbj
Copy link
Collaborator

gbj commented May 12, 2024

I can't reproduce this.

@ta3pks
Copy link
Author

ta3pks commented May 12, 2024

in my case it happens every single time new projects old projects doesnt matter any suggestions?

@ta3pks
Copy link
Author

ta3pks commented May 12, 2024

Okay I figured it out. I was using a different linker than the default ld linker seems it is the issue here

@ta3pks ta3pks closed this as completed May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants