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

Segfault while compiling unicode-xid on Raspberry Pi 3 #65649

Closed
krumberg opened this issue Oct 21, 2019 · 4 comments
Closed

Segfault while compiling unicode-xid on Raspberry Pi 3 #65649

krumberg opened this issue Oct 21, 2019 · 4 comments

Comments

@krumberg
Copy link

Summary
When I try to install cargo-run-script using the stable (or unstable) toolchain I get a segfault.

The issue occurs on arm v7l (Raspberry Pi 3, Raspbian Stretch), but not on x86_64.

rustc —version
rustc 1.38.0 (625451e 2019-09-23)
binary: rustc
commit-hash: 625451e
commit-date: 2019-09-23
host: armv7-unknown-linux-gnueabihf
release: 1.38.0
LLVM version: 9.0

Stacktrace:
cargo install cargo-run-script
Updating crates.io index
Installing cargo-run-script v0.1.0
Compiling proc-macro2 v1.0.6
Compiling unicode-xid v0.2.0
Compiling syn v1.0.5
Compiling serde v1.0.101
error: Could not compile unicode-xid.

Caused by:
process didn't exit successfully: rustc --crate-name unicode_xid /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' -C metadata=7ba4255d362b475e -C extra-filename=-7ba4255d362b475e --out-dir /tmp/cargo-installzhLsBF/release/deps -L dependency=/tmp/cargo-installzhLsBF/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to prepare thin LTO module: file doesn't start with bitcode header

thread '' panicked at 'src/librustc_codegen_ssa/back/write.rs:1545: worker thread panicked', src/librustc/util/bug.rs:37:26
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.
error: aborting due to previous error

error: Could not compile serde.
warning: build failed, waiting for other jobs to finish...
error: Could not compile syn.

Caused by:
process didn't exit successfully: rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.5/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=7f313fb82653122f -C extra-filename=-7f313fb82653122f --out-dir /tmp/cargo-installzhLsBF/release/build/syn-7f313fb82653122f -L dependency=/tmp/cargo-installzhLsBF/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to compile cargo-run-script v0.1.0, intermediate artifacts can be found at /tmp/cargo-installzhLsBF

Caused by:
Could not compile proc-macro2.

Caused by:
process didn't exit successfully: rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.6/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=7e8798823c7101b3 -C extra-filename=-7e8798823c7101b3 --out-dir /tmp/cargo-installzhLsBF/release/build/proc-macro2-7e8798823c7101b3 -L dependency=/tmp/cargo-installzhLsBF/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
pi@raspberrypi:~ $ cargo install unicode-xic
Updating crates.io index
error: could not find unicode-xic in registry https://github.com/rust-lang/crates.io-index
pi@raspberrypi:~ $ cargo install cargo-run-script
Updating crates.io index
Installing cargo-run-script v0.1.0
Compiling proc-macro2 v1.0.6
Compiling unicode-xid v0.2.0
Compiling syn v1.0.5
Compiling serde v1.0.101
error: Could not compile unicode-xid.

Caused by:
process didn't exit successfully: rustc --crate-name unicode_xid /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-xid-0.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 --cfg 'feature="default"' -C metadata=7ba4255d362b475e -C extra-filename=-7ba4255d362b475e --out-dir /tmp/cargo-installJbryfx/release/deps -L dependency=/tmp/cargo-installJbryfx/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: Could not compile syn.

Caused by:
process didn't exit successfully: rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/syn-1.0.5/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="clone-impls"' --cfg 'feature="default"' --cfg 'feature="derive"' --cfg 'feature="parsing"' --cfg 'feature="printing"' --cfg 'feature="proc-macro"' --cfg 'feature="quote"' --cfg 'feature="visit"' -C metadata=7f313fb82653122f -C extra-filename=-7f313fb82653122f --out-dir /tmp/cargo-installJbryfx/release/build/syn-7f313fb82653122f -L dependency=/tmp/cargo-installJbryfx/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
*** Error in /home/pi/.rustup/toolchains/stable-armv7-unknown-linux-gnueabihf/bin/rustc': double free or corruption (out): 0x6cfbf468 *** error: Could not compile proc-macro2`.

Caused by:
process didn't exit successfully: rustc --edition=2018 --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.6/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=7e8798823c7101b3 -C extra-filename=-7e8798823c7101b3 --out-dir /tmp/cargo-installJbryfx/release/build/proc-macro2-7e8798823c7101b3 -L dependency=/tmp/cargo-installJbryfx/release/deps --cap-lints allow (signal: 6, SIGABRT: process abort signal)
warning: build failed, waiting for other jobs to finish...
error: failed to compile cargo-run-script v0.1.0, intermediate artifacts can be found at /tmp/cargo-installJbryfx

Caused by:
Could not compile serde.

Caused by:
process didn't exit successfully: rustc --crate-name build_script_build /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.101/build.rs --color always --crate-type bin --emit=dep-info,link -C opt-level=3 --cfg 'feature="default"' --cfg 'feature="std"' -C metadata=62086cf108e95a88 -C extra-filename=-62086cf108e95a88 --out-dir /tmp/cargo-installJbryfx/release/build/serde-62086cf108e95a88 -L dependency=/tmp/cargo-installJbryfx/release/deps --cap-lints allow (signal: 11, SIGSEGV: invalid memory reference)

@mati865
Copy link
Contributor

mati865 commented Oct 21, 2019

Probably the same as #62896
It's fixed in nightly builds.

@krumberg
Copy link
Author

I wiped my rust installation and tried to install nightly, but it fails

pi@raspberrypi:~ $ rustup toolchain install nightly
info: syncing channel updates for 'nightly-armv7-unknown-linux-gnueabihf'
info: latest update on 2019-10-21, rust version 1.40.0-nightly (7979016 2019-10-20)
info: skipping nightly which is missing installed component 'clippy-preview'
info: syncing channel updates for 'nightly-2019-10-20-armv7-unknown-linux-gnueabihf'
info: latest update on 2019-10-20, rust version 1.40.0-nightly (c23a7aa 2019-10-19)
info: skipping nightly which is missing installed component 'clippy-preview'
info: syncing channel updates for 'nightly-2019-10-19-armv7-unknown-linux-gnueabihf'
........
error: some components unavailable for download for channel nightly: 'clippy', 'rustfmt'
If you require these components, please install and use the latest successful build version,
which you can find at https://rust-lang.github.io/rustup-components-history.
After determining the correct date, install it with a command such as:
rustup toolchain install nightly-2018-12-27

@mati865
Copy link
Contributor

mati865 commented Oct 22, 2019

@krumberg it's rust-lang/rustup#2074
You can try adding --force to your command until Rustup fix is released.

@krumberg
Copy link
Author

Thanks! It finally worked

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