Stream: t-compiler/help

Topic: compilation-error


Alex Gaynor (Feb 14 2019 at 23:07, on Zulip):

Hi all, I'm trying to get started with some rustc development. I've made a few small changes and I'm building with ./x.py build --stage=1 -j2, I'm getting this unfortunately very low information error -- does anyone recognize this?

  process didn't exit successfully: `/home/alexgaynor/projects/rust/build/bootstrap/debug/rustc --edition=2018 --crate-name rustc src/librustc/lib.rs --color always --error-format json --crate-type dylib --emit=dep-info,link -C prefer-dynamic -C opt-level=2 -C metadata=e763b9ff4de009fe -C extra-filename=-e763b9ff4de009fe --out-dir /home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps -L dependency=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps --extern arena=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libarena-d602fd5c8880690d.so --extern backtrace=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbacktrace-f24460d1d9f770c5.rlib --extern bitflags=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbitflags-4c2de21d268c008c.rlib --extern byteorder=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libbyteorder-30832ede6d591af0.rlib --extern chalk_engine=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libchalk_engine-8fb5110fb325d07f.rlib --extern flate2=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libflate2-27d0c0ad5960aabe.rlib --extern fmt_macros=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libfmt_macros-30d2f47158af19eb.so --extern graphviz=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libgraphviz-7da7ae75a821da30.so --extern jobserver=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libjobserver-b10159dd494c0a5c.rlib --extern lazy_static=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblazy_static-4155fc8da75169bc.rlib --extern log=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/liblog-1e6344eb8a8981d9.rlib --extern num_cpus=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libnum_cpus-ea6ce44ebe3d0e70.rlib --extern parking_lot=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libparking_lot-7a34e65277b2b783.rlib --extern polonius_engine=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libpolonius_engine-2cb9ee681d65c3ee.rlib --extern rustc_rayon=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_rayon-0ea1d45e1d11e99d.rlib --extern rustc_rayon_core=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_rayon_core-7ced7de6e5818d84.rlib --extern rustc_apfloat=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_apfloat-5855adb1fc60a1d9.rlib --extern rustc_data_structures=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_data_structures-faf2d7142976a771.so --extern errors=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_errors-fd3528ebaf506407.so --extern rustc_fs_util=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_fs_util-8cbf1de2098aa842.so --extern rustc_target=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_target-76bfff8ee99a8e8d.so --extern scoped_tls=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libscoped_tls-8b086884dc83fa65.rlib --extern serialize=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-6abb0bc01ea3f842.so --extern serialize=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libserialize-6abb0bc01ea3f842.rlib --extern smallvec=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsmallvec-537222b2a851de2a.rlib --extern syntax=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax-d629c594ada33a8e.so --extern syntax_pos=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libsyntax_pos-3ba19fab128da0c4.so --extern tempfile=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/libtempfile-28b766703a229b76.rlib -L native=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/backtrace-sys-62c47bac4c1cbc2a/out -L native=/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/build/miniz-sys-c0141332c2ba0fca/out` (signal: 11, SIGSEGV: invalid memory reference)
command did not execute successfully: "/home/alexgaynor/projects/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "2" "--release" "--features" "" "--manifest-path" "/home/alexgaynor/projects/rust/src/rustc/Cargo.toml" "--message-format" "json"
expected success, got: exit code: 101
failed to run: /home/alexgaynor/projects/rust/build/bootstrap/debug/bootstrap build --stage=1 -j2
Build completed unsuccessfully in 0:07:43
Jake Goulding (Feb 15 2019 at 03:28, on Zulip):

signal: 11, SIGSEGV: invalid memory reference

That's not encouraging

Jake Goulding (Feb 15 2019 at 03:28, on Zulip):

You may wish to try and run that command inside of gdb/lldb

Alex Gaynor (Feb 15 2019 at 03:29, on Zulip):

The answer it turns out is that I am dumb :-) dmesg made clear it was a crash in the llvm codegen .so, and then... I was making changes to the code gen, and those changes were wrong. When I made the changes correct, it stopped crashing.

Alex Gaynor (Feb 15 2019 at 03:29, on Zulip):

Why did I think it might be someone else's fault? Who knows!

Last update: Nov 11 2019 at 23:05UTC