gfx-rs / gfx-ocean

Compute based ocean simulation with gfx_hal :ocean:
116 stars 7 forks source link

Build Fails Mac OS errr E0119 -- conflicting implementations #14

Closed taylorjdawson closed 5 years ago

taylorjdawson commented 5 years ago
error[E0119]: conflicting implementations of trait `std::ops::Mul<&_>` for type `geometry::translation::TranslationBase<_, _, _>`:
   --> /Users/<meee>/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.11.2/src/geometry/isometry_ops.rs:68:9
    |
68  | /         impl<$($lives ,)* N, D: DimName, S, R> $Op<$Rhs> for $Lhs
69  | |             where N: Real,
70  | |                   S: OwnedStorage<N, D, U1>,
71  | |                   R: Rotation<PointBase<N, D, S>>,
...   |
78  | |             }
79  | |         }
    | |         ^
    | |         |
    | |_________first implementation here
    |           conflicting implementation for `geometry::translation::TranslationBase<_, _, _>`
...
286 | / isometry_binop_impl_all!(
287 | |     Mul, mul;
288 | |     self: TranslationBase<N, D, S>, right: R, Output = IsometryBase<N, D, S, R>;
289 | |     [val val] => IsometryBase::from_parts(self, right);
...   |
292 | |     [ref ref] => IsometryBase::from_parts(self.clone(), right.clone());
293 | | );
    | |__- in this macro invocation
    |
    = note: downstream crates may implement trait `alga::linear::Rotation<geometry::point::PointBase<_, _, _>>` for type `&_`

error[E0119]: conflicting implementations of trait `std::ops::Mul<&_>` for type `&geometry::translation::TranslationBase<_, _, _>`:
   --> /Users/<meee>/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.11.2/src/geometry/isometry_ops.rs:68:9
    |
68  | /         impl<$($lives ,)* N, D: DimName, S, R> $Op<$Rhs> for $Lhs
69  | |             where N: Real,
70  | |                   S: OwnedStorage<N, D, U1>,
71  | |                   R: Rotation<PointBase<N, D, S>>,
...   |
78  | |             }
79  | |         }
    | |         ^
    | |         |
    | |_________first implementation here
    |           conflicting implementation for `&geometry::translation::TranslationBase<_, _, _>`
...
286 | / isometry_binop_impl_all!(
287 | |     Mul, mul;
288 | |     self: TranslationBase<N, D, S>, right: R, Output = IsometryBase<N, D, S, R>;
289 | |     [val val] => IsometryBase::from_parts(self, right);
...   |
292 | |     [ref ref] => IsometryBase::from_parts(self.clone(), right.clone());
293 | | );
    | |__- in this macro invocation
    |
    = note: downstream crates may implement trait `alga::linear::Rotation<geometry::point::PointBase<_, _, _>>` for type `&_`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0119`.
error: Could not compile `nalgebra`.
warning: build failed, waiting for other jobs to finish...
error: build failed

command that failed:

cargo run --features metal

I am guessing this is fixed in later version of nalgebra?

msiglreith commented 5 years ago

Thanks for the report, I will update the source and migrate towards gfx-hal 0.2

taylorjdawson commented 5 years ago

Thank you! Let me know if you need anymore information. 👍

msiglreith commented 5 years ago

Updated everything please give it a try again. I hope metal still works as I don't have a Mac for testing.

taylorjdawson commented 5 years ago

Thanks! I think there might be one last thing to do? Specify the binary?

❯ cargo run --features metal
error: `cargo run` could not determine which binary to run. Use the `--bin` option to specify a binary, or 
(on nightly) the `default-run` manifest key.
available binaries: ocean, ocean_generator
msiglreith commented 5 years ago

oops, missed to remove the generator again edit: done

taylorjdawson commented 5 years ago

Thanks! what was the bin file for?

msiglreith commented 5 years ago

For generating the static spectrum and frequency values, which where done at runtime before and now stored as binary data on disk (faster startup times)

taylorjdawson commented 5 years ago

Very interesting, thank you! I'll let you know if it works!

taylorjdawson commented 5 years ago

This is the next error that arose:

error[E0433]: failed to resolve: could not find `AutoreleasePool` in `back`
  --> src/main.rs:91:47
   |
91 |     let mut autorelease_pool = unsafe { back::AutoreleasePool::new() };
   |                                               ^^^^^^^^^^^^^^^ could not find `AutoreleasePool` in `back`
msiglreith commented 5 years ago

Thanks for testing! I assume these are not needed anymore, removed

taylorjdawson commented 5 years ago

Wow that worked, this is impressive and will be a great reference. Thanks!