Skip to content

Rust fails when compiling with --lib #6540

Closed
@peacememories

Description

@peacememories

Crate:

#[link(name = "glm", vers = "", author = "Gabriel Pickl")];
#[crate_type = "lib"]

extern mod std;

mod vec3;

Module:

/******
 * This file is generated with RustyCage
 */
struct Vec3 {
    x: float,
    y: float,
    z: float
}

impl ToStr for Vec3 {
    fn to_str(&self) -> ~str { fmt!("vec3(%f, %f, %f)", self.x, self.y, self.z) }
}

Log:

rust: task failed at 'assertion failed: !ecx.link_meta.vers.is_empty()', /build/src/rust-0.6/src/librustc/metadata/encoder.rs:1168
/usr/lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f536904264b]
/usr/lib/librustrt.so(+0x2a189)[0x7f5369053189]
/usr/lib/librustrt.so(upcall_fail+0x198)[0x7f53690443a8]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x1055db)[0x7f536c24b5db]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x105582)[0x7f536c24b582]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind17_61fe198059b9e3fc3_06E+0x71)[0x7f536c193651]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys11fail_assert17_10b61817f19c764b3_06E+0x228)[0x7f536c19ccc8]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x840969)[0x7f536b198969]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b8d04)[0x7f536b210d04]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN8metadata7encoder15encode_metadata16_8385b7ed921fd0e3_06E+0x5d8)[0x7f536abe69f8]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN6middle5trans4base14write_metadata17_426355cd9989416d3_06E+0x113)[0x7f536abe5f03]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN6middle5trans4base11trans_crate15_aa5d2b86af98143_06E+0x148a)[0x7f536abec03a]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x87a5c0)[0x7f536b1d25c0]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver12compile_rest17_b2b258b84b35f3533_06E+0x331e)[0x7f536b1cf5ce]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b8d04)[0x7f536b210d04]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver12compile_upto17_12335154b455986e3_06E+0x108)[0x7f536b1d27d8]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b8d04)[0x7f536b210d04]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN6driver6driver13compile_input15_bb29edf7a232863_06E+0xca)[0x7f536b1d2c1a]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN12run_compiler17_64d52739a36d169c3_06E+0x20aa)[0x7f536b20219a]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b67d1)[0x7f536b20e7d1]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b2ffc)[0x7f536b20affc]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b8d04)[0x7f536b210d04]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0xce08e)[0x7f536c21408e]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x14dcb4)[0x7f536c293cb4]
/usr/lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f5369042e64]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /build/src/rust-0.6/src/librustc/rustc.rc:357
/usr/lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f536904264b]
/usr/lib/librustrt.so(+0x2a189)[0x7f5369053189]
/usr/lib/librustrt.so(upcall_fail+0x198)[0x7f53690443a8]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x1055db)[0x7f536c24b5db]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x105582)[0x7f536c24b582]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(_ZN3sys12begin_unwind17_61fe198059b9e3fc3_06E+0x71)[0x7f536c193651]
/usr/lib/libcore-c3ca5d77d81b46c1-0.6.so(+0x14dcb4)[0x7f536c293cb4]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN7monitor17_78935df9ff9e1afa3_06E+0x1577)[0x7f536b2047c7]
/usr/lib/librustc-c84825241471686d-0.6.so(+0x8b8d04)[0x7f536b210d04]
/usr/lib/librustc-c84825241471686d-0.6.so(_ZN4main15_c4de63b748e03d3_06E+0x7e)[0x7f536b21091e]
/usr/lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x24)[0x7f5369042e64]
rust: domain main @0x1b3c3c0 root task failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions