Skip to content

unrecognized relocation cargo build failures with latest nightlies #4

Closed
@clux

Description

@clux

from the travis logs:

docker run -v /home/travis/build/clux/muslrust/test/plaincrate:/volume -w /volume -t clux/muslrust cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading rand v0.3.14
 Downloading libc v0.2.14
   Compiling libc v0.2.14
     Running `rustc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.14/src/lib.rs --crate-name libc --crate-type lib -g --cfg feature=\"default\" --cfg feature=\"use_std\" -C metadata=1f3392fe1afd1313 -C extra-filename=-1f3392fe1afd1313 --out-dir /volume/target/x86_64-unknown-linux-musl/debug/deps --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --cap-lints allow`
   Compiling rand v0.3.14
     Running `rustc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs --crate-name rand --crate-type lib -g -C metadata=49a08859d086fffe -C extra-filename=-49a08859d086fffe --out-dir /volume/target/x86_64-unknown-linux-musl/debug/deps --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --extern libc=/volume/target/x86_64-unknown-linux-musl/debug/deps/liblibc-1f3392fe1afd1313.rlib --cap-lints allow`
   Compiling plaincrate v0.1.0 (file:///volume)
     Running `rustc src/main.rs --crate-name plaincrate --crate-type bin -g -C metadata=0ac13fd092ed66e9 --out-dir /volume/target/x86_64-unknown-linux-musl/debug --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --extern rand=/volume/target/x86_64-unknown-linux-musl/debug/deps/librand-49a08859d086fffe.rlib`
error: linking with `cc` failed: exit code: 1 
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-nostdlib" "-static" "-Wl,--eh-frame-hdr" "-Wl,-(" "-m64" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib" "/volume/target/x86_64-unknown-linux-musl/debug/plaincrate.0.o" "-o" "/volume/target/x86_64-unknown-linux-musl/debug/plaincrate" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/volume/target/x86_64-unknown-linux-musl/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/volume/target/x86_64-unknown-linux-musl/debug/deps/librand-49a08859d086fffe.rlib" "/volume/target/x86_64-unknown-linux-musl/debug/deps/liblibc-1f3392fe1afd1313.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/librand-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libcollections-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_unicode-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc_jemalloc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-c8005792.rlib" "-l" "compiler-rt" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o" "-Wl,-)" 
note: /usr/bin/ld: /usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc_jemalloc-c8005792.rlib(jemalloc.pic.o): unrecognized relocation (0x2a) in section `.text.malloc_conf_init'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

and

docker run -v /home/travis/build/clux/muslrust/test/plaincrate:/volume -w /volume -t clux/muslrust cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading rand v0.3.14
 Downloading libc v0.2.15
   Compiling libc v0.2.15
     Running `rustc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.15/src/lib.rs --crate-name libc --crate-type lib -g --cfg feature=\"use_std\" --cfg feature=\"default\" -C metadata=1bd8847afb79f283 -C extra-filename=-1bd8847afb79f283 --out-dir /volume/target/x86_64-unknown-linux-musl/debug/deps --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --cap-lints allow`
   Compiling rand v0.3.14
     Running `rustc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.3.14/src/lib.rs --crate-name rand --crate-type lib -g -C metadata=49a08859d086fffe -C extra-filename=-49a08859d086fffe --out-dir /volume/target/x86_64-unknown-linux-musl/debug/deps --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --extern libc=/volume/target/x86_64-unknown-linux-musl/debug/deps/liblibc-1bd8847afb79f283.rlib --cap-lints allow`
   Compiling plaincrate v0.1.0 (file:///volume)
     Running `rustc src/main.rs --crate-name plaincrate --crate-type bin -g -C metadata=0ac13fd092ed66e9 --out-dir /volume/target/x86_64-unknown-linux-musl/debug --emit=dep-info,link --target x86_64-unknown-linux-musl -L dependency=/volume/target/x86_64-unknown-linux-musl/debug/deps --extern rand=/volume/target/x86_64-unknown-linux-musl/debug/deps/librand-49a08859d086fffe.rlib`
error: linking with `cc` failed: exit code: 1 
note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-nostdlib" "-static" "-Wl,--eh-frame-hdr" "-Wl,-(" "-m64" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crt1.o" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crti.o" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib" "/volume/target/x86_64-unknown-linux-musl/debug/plaincrate.0.o" "-o" "/volume/target/x86_64-unknown-linux-musl/debug/plaincrate" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/volume/target/x86_64-unknown-linux-musl/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/volume/target/x86_64-unknown-linux-musl/debug/deps/librand-49a08859d086fffe.rlib" "/volume/target/x86_64-unknown-linux-musl/debug/deps/liblibc-1bd8847afb79f283.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libstd-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libpanic_unwind-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/librand-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libcollections-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/librustc_unicode-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liballoc_jemalloc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/liblibc-c8005792.rlib" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libcore-c8005792.rlib" "-l" "compiler-rt" "/usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/crtn.o" "-Wl,-)" 
note: /usr/bin/ld: /usr/local/lib/rustlib/x86_64-unknown-linux-musl/lib/libunwind-c8005792.rlib(libunwind.cpp.o): unrecognized relocation (0x2a) in section `.text._ZL10assert_rtnPKcS0_iS0_'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

not sure what's going on here - nothing's changed on this end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions