Skip to content

Linking with cc gets a spurious return code on ARM #10191

Closed
@chris-morgan

Description

@chris-morgan

Steps to reproduce:

  1. Take a build of rustc for ARM (specifically, gnueabi; gnueabihf is untested and may or may not exhibit this problem). Luqman has one you can use at http://luqman.ca/rust-builds/.
  2. Attempt to compile something, e.g. echo 'fn main(){}' | rustc -.

The binary is created successfully and will run fine (I finally have rust-http running on my Android-with-Ubuntu-inside-it tablet!), but the .o file remains around and rustc also dies with a spurious return code from the linker.

error: linking with `cc` failed with code 1081742352
note: cc arguments: -L/home/chris/opt/rust/lib/rustc/arm-unknown-linux-gnueabi/lib -marm -o /tmp/rust_out /tmp/rust_out.o -L/home/chris/opt/rust/lib/rustc/arm-unknown-linux-gnueabi/lib -lstd-6c65cf4b443341b1-0.9-pre -L/home/chris/opt/rust/lib/rustc/arm-unknown-linux-gnueabi/lib -lrustuv-d4277cd5f62aa99-0.9-pre -lrustrt -lrt -lpthread -L/tmp/.rust -L/tmp -lrt -ldl -lm -lmorestack -lrustrt -Wl,-rpath,$ORIGIN/../home/chris/opt/rust/lib/rustc/arm-unknown-linux-gnueabi/lib -Wl,-rpath,/home/chris/opt/rust/lib/rustc/arm-unknown-linux-gnueabi/lib -Wl,-rpath,/scratch/laden/local/lib/rustc/arm-unknown-linux-gnueabi/lib
note: 
error: aborting due to previous error
task '<unnamed>' failed at 'explicit failure', ../src/libsyntax/diagnostic.rs:101
task '<unnamed>' failed at 'explicit failure', ../src/librustc/rustc.r:396

(I typed that out by hand; it's possible that it may not be entirely correct.)

The claimed return code is well outside what I believe to be the valid range for return codes (I think it's supposed to be an unsigned 8-bit value) and is different each time. I presume that it's not retrieving the return value correctly. If one runs cc manually with the specified arguments, the return code is 0, as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-ArmTarget: 32-bit Arm processors (armv6, armv7, thumb...), including 64-bit Arm in AArch32 state

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions