Closed
Description
I'm currently attempting to compile a library called nalgebra (https://github.com/sebcrozet/nalgebra), but I am met with the following ICE each time I try to compile the project:
Compiling nalgebra v0.2.2 (https://github.com/sebcrozet/nalgebra#39fd7c1a)
/home/abass/.cargo/git/checkouts/nalgebra-38f5c573aa675d18/master/src/lib.rs:612:7: 612:19 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `traits::structure::Mat<N, LV, LV>` for the type `<R as traits::geometry::RotationMatrix<N, LV, AV>>::Output`
/home/abass/.cargo/git/checkouts/nalgebra-38f5c573aa675d18/master/src/lib.rs:612 r.to_rot_mat()
^~~~~~~~~~~~
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'Box<Any>', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129
stack backtrace:
1: 0x7fe43b75ae80 - sys::backtrace::write::h84a1347ec8a3d425Aru
2: 0x7fe43b77e4a0 - failure::on_fail::h1cb2299eb5e255ae9GB
3: 0x7fe43b6e92d0 - rt::unwind::begin_unwind_inner::ha34a1c7f0630f466IlB
4: 0x7fe438aeabf0 - rt::unwind::begin_unwind::h12804436560652988965
5: 0x7fe438aeab80 - diagnostic::SpanHandler::span_bug::h7782d96edbc369daAME
6: 0x7fe439831890 - middle::traits::error_reporting::report_fulfillment_errors::h9d98ce1dd7e3fcdeGnN
7: 0x7fe43ae2ea20 - check::vtable::select_all_fcx_obligations_or_error::hc5e5e8e652f479efRvb
8: 0x7fe43aede680 - check::check_bare_fn::h306f8ecc226858bctAm
9: 0x7fe43aed5e70 - check::check_item::h7d555ba822408851KTm
10: 0x7fe43afa4d10 - check_crate::closure.34569
11: 0x7fe43af9f850 - check_crate::h2469153404b647bauEA
12: 0x7fe43bceb710 - driver::phase_3_run_analysis_passes::h198ed79d6101094dtGa
13: 0x7fe43bcd22b0 - driver::compile_input::h08caf95be513bd6bBba
14: 0x7fe43bd9cdd0 - run_compiler::hf1a36c26381910e09ac
15: 0x7fe43bd9b460 - thunk::F.Invoke<A, R>::invoke::h6996223324138754953
16: 0x7fe43bd9a390 - rt::unwind::try::try_fn::h16059966258548481805
17: 0x7fe43b7e9910 - rust_try_inner
18: 0x7fe43b7e9900 - rust_try
19: 0x7fe43bd9a640 - thunk::F.Invoke<A, R>::invoke::h12998514134271589737
20: 0x7fe43b76aca0 - sys::thread::thread_start::h756cedb2df1b4200Pnx
21: 0x7fe435970460 - start_thread
22: 0x7fe43b379769 - clone
23: 0x0 - <unknown>
Could not compile `nalgebra`.
To learn more, run the command again with --verbose.
Here is the code for the trait definition of RotationMatrix, if it helps:
pub trait RotationMatrix<N, LV, AV> : Rotation<AV> {
type Output: Mat<N, LV, LV> + Rotation<AV>;
/// Gets the rotation matrix represented by `self`.
fn to_rot_mat(&self) -> Self::Output;
149 }
And lastly, here's what rustc gave me when I ran it with --version and --verbose:
rustc 1.0.0-nightly (eaf4c5c78 2015-02-02 15:04:54 +0000)
binary: rustc
commit-hash: eaf4c5c784637f3df8bdebc6ec21dbd4bc69420a
commit-date: 2015-02-02 15:04:54 +0000
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly
I'm pretty new to Rust, so if the issue is with the code and I do not realize it, then I apologize in advance.