Building in docker on M1
kristoferB opened this issue · 0 comments
kristoferB commented
When I build minimal example in docker on my Mac mini M1 I get:
error[E0308]: mismatched types
--> /root/.cargo/git/checkouts/r2r-c48e5652e9219d1b/e4dcb4d/rcl/src/lib.rs:126:62
|
126 | unsafe { std::ptr::copy(values.as_ptr(), self.data, values.len()); }
| ^^^^^^^^^ expected `f64`, found `u128`
...
144 | primitive_sequence!(rosidl_runtime_c__long_double, f64);
| -------------------------------------------------------- in this macro invocation
|
= note: expected raw pointer `*mut f64`
found raw pointer `*mut u128`
= note: this error originates in the macro `primitive_sequence` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> /root/.cargo/git/checkouts/r2r-c48e5652e9219d1b/e4dcb4d/rcl/src/lib.rs:133:21
|
129 | pub fn to_vec(&self) -> Vec<$element_type> {
| ------------------ expected `Vec<f64>` because of return type
...
133 | target
| ^^^^^^ expected `f64`, found `u128`
...
144 | primitive_sequence!(rosidl_runtime_c__long_double, f64);
| -------------------------------------------------------- in this macro invocation
|
= note: expected struct `Vec<f64>`
found struct `Vec<u128>`
= note: this error originates in the macro `primitive_sequence` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0308`.
error: could not compile `rcl`
To replicate on M1 Mac:
docker run -it --rm kristoferb/spbase_ros2:galactic
root@f7ca0c8e3b3d:/# git clone https://github.com/m-dahl/r2r_minimal_node.git
root@f7ca0c8e3b3d:/# cd r2r_minimal_node/
root@f7ca0c8e3b3d:/r2r_minimal_node# colcon build