Skip to content

can not compile in release mode in raspberry pi zero #69420

Closed
@sk-Prime

Description

@sk-Prime

For testing purpose i created simplest hello world program using, cargo new hello_world, in debug mode cargo build it is compiling without any issue. however in release mode cargo build --release it can not compile the program.

fn main() {
    println!("Hello, world!");
}

rustc main.rs can compile the program too but rustc -O main.rs produces similar error.
I expected to see this happen: compile

Meta

rustc --version --verbose:

rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: arm-unknown-linux-gnueabihf
release: 1.41.0
LLVM version: 9.0
Error

pi@raspberrypi:~/rust/hello_world $ cargo build --release
   Compiling hello_world v0.1.0 (/home/pi/rust/hello_world)
error: could not compile `hello_world`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name hello_world src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=40ad385247a6820a -C extra-filename=-40ad385247a6820a --out-dir /home/pi/rust/hello_world/target/release/deps -L dependency=/home/pi/rust/hello_world/target/release/deps` (signal: 11, SIGSEGV: invalid memory reference)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustcI-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.ICEBreaker-LLVMBugs identified for the LLVM ICE-breaker groupO-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 stateP-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions