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

Rust fails when compiling with --lib #6540

Closed
peacememories opened this issue May 16, 2013 · 3 comments
Closed

Rust fails when compiling with --lib #6540

peacememories opened this issue May 16, 2013 · 3 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@peacememories
Copy link

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

@Thiez
Copy link
Contributor

Thiez commented May 16, 2013

I suppose it should have a nicer error message when you supply an empty version. It should compile if you change vers = "" to vers = "0.1" or some along those lines (I'm not actually sure what input is allowed for versions).

@emberian
Copy link
Member

Still broken.

@peacememories
Copy link
Author

It works if I either fill in a non-empty string for vers or leave it out completely. More useful behaviour would probably be either a more informative error message or the same error correction done for a missing vers attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants