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

SIGSEGV: invalid memory reference while cargo build --release #14

Closed
Quix0r opened this issue Mar 30, 2019 · 8 comments
Closed

SIGSEGV: invalid memory reference while cargo build --release #14

Quix0r opened this issue Mar 30, 2019 · 8 comments
Labels
wontfix This will not be worked on

Comments

@Quix0r
Copy link

Quix0r commented Mar 30, 2019

I'm completely new to rust language and sorry for my weak English, so here is the last output:

$ cargo build --release
   Compiling hpk v0.3.4 (/opt/git/hpk)
error: Could not compile `hpk`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name hpk src/main.rs
  --color always --crate-type bin --emit=dep-info,link -C opt-level=3 -C lto -C
  metadata=efda9f278588f912 -C extra-filename=-efda9f278588f912 --out-dir
  /opt/git/hpk/target/release/deps -L dependency=/opt/git/hpk/target/release/deps --extern
  byteorder=/opt/git/hpk/target/release/deps/libbyteorder-8396a9ff3ced34b0.rlib --extern
  clap=/opt/git/hpk/target/release/deps/libclap-6282fbebe1e3647f.rlib --extern
  filetime=/opt/git/hpk/target/release/deps/libfiletime-0206700f28040b46.rlib --extern
  flate2=/opt/git/hpk/target/release/deps/libflate2-cc230f0d2bf00371.rlib --extern
  glob=/opt/git/hpk/target/release/deps/libglob-e086e0d80c192087.rlib --extern
  hpk=/opt/git/hpk/target/release/deps/libhpk-edf78b3620d574a2.rlib --extern
  lz4_compress=/opt/git/hpk/target/release/deps/liblz4_compress-cb84362fc1ac9e99.rlib
  --extern nom=/opt/git/hpk/target/release/deps/libnom-2fb83814f174885f.rlib --extern
  tempfile=/opt/git/hpk/target/release/deps/libtempfile-97e1e08034b9fee1.rlib --extern
  walkdir=/opt/git/hpk/target/release/deps/libwalkdir-f5079254e823656c.rlib --extern
  zstd=/opt/git/hpk/target/release/deps/libzstd-782b431503605148.rlib -L
  native=/opt/git/hpk/target/release/build/miniz-sys-71c32bff269ebcb6/out -L
  native=/opt/git/hpk/target/release/build/zstd-sys-ab6ec32720866ff2/out`
  (signal: 11, SIGSEGV: invalid memory reference)
$ 

rustc --version: 1.32.0
Linux AMD64 under Debian 7.3.0

@nickelc
Copy link
Owner

nickelc commented Mar 30, 2019

what's your system specs (os, 32bit/64bit) and rust version?

@Quix0r
Copy link
Author

Quix0r commented Apr 1, 2019

Updated post

@nickelc
Copy link
Owner

nickelc commented Apr 1, 2019

hmmm, travis-ci has built it on ubuntu 14.04 and rustc 1.33.0 without problems.

can you apply this patch to remove the zstd support and try again with RUST_BACKTRACE=1 cargo build?
no_zstd.patch.txt

Next try with flate2 using its rust backend.
Cargo.toml

- flate2 = "1"
+ flate2 = { version = "1", default-features = false, features = ["rust_backend"] }

@Quix0r
Copy link
Author

Quix0r commented Apr 2, 2019

I have tried all 3 possibilities:

  • 1st patch (no_zstd.patch.txt) alone
  • 2nd change alone
  • both together

... and all 3 give same error message. I guess Debian has maybe out-dated libraries? It was the case with yaml-cpp (0.5.2 is known for having bugs but now with 0.6.0 I can build a game again).

@Quix0r
Copy link
Author

Quix0r commented Apr 2, 2019

Lucky guess: maybe optimization level is to high? with GCC sometimes -O3 is to much, you have to go back to -O2.

@Quix0r
Copy link
Author

Quix0r commented Apr 2, 2019

No, not even opt-level=2 did it (in [profile.release] category). But I was able to compile a debug build.

@nickelc
Copy link
Owner

nickelc commented Apr 2, 2019

yeah, Debian 7.3 seems way too outdated. but at least the debug build is working for you.

@nickelc nickelc added the wontfix This will not be worked on label Apr 6, 2019
@nickelc nickelc closed this as completed Apr 6, 2019
@Quix0r
Copy link
Author

Quix0r commented May 21, 2019

At least it is documented here. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants