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 build with RUSTFLAGS='-C target-feature=+crt-static' cargo build --features=compile-libheif #9

Open
loyalpartner opened this issue Jan 3, 2025 · 1 comment

Comments

@loyalpartner
Copy link

RUSTFLAGS='-C target-feature=+crt-static'  cargo build --features=compile-libheif
    Updating crates.io index
     Locking 2 packages to latest compatible versions
    Updating bindgen v0.70.1 -> v0.71.1
    Updating rustc-hash v1.1.0 -> v2.1.0
  Downloaded rustc-hash v2.1.0
  Downloaded bindgen v0.71.1
  Downloaded 2 crates (251.1 KB) in 1.47s
   Compiling proc-macro2 v1.0.92
   Compiling bindgen v0.71.1
   Compiling rustc-hash v2.1.0
   Compiling clang-sys v1.8.1
   Compiling quote v1.0.38
   Compiling syn v2.0.94
   Compiling prettyplease v0.2.25
   Compiling libheif-sys v3.1.0+1.18.2 (/tmp/libheif-sys)
error: failed to run custom build command for `libheif-sys v3.1.0+1.18.2 (/tmp/libheif-sys)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/tmp/libheif-sys/target/debug/build/libheif-sys-008709d7608666ba/build-script-build` (signal: 11, SIGSEGV: invalid memory reference)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:rerun-if-changed=include/wrapper.h
@Cykooz
Copy link
Owner

Cykooz commented Jan 4, 2025

I can't reproduce this error. What is your environment?

I have other errors - ld tries to use dynamic (.so) version of libheif dependencies (libraries libjpeg, libpng, libx265) instead of static (.a). But I don't know how to fix it.

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

2 participants