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

Error compile repo with publisher.cpp #6

Open
Denlar2 opened this issue Oct 18, 2021 · 0 comments
Open

Error compile repo with publisher.cpp #6

Denlar2 opened this issue Oct 18, 2021 · 0 comments

Comments

@Denlar2
Copy link

Denlar2 commented Oct 18, 2021

Hi RoboStack
Thanks for a cool repo.

Sadly i am not able to compile the example publisher, and either integrate it in my own package.

Getting this error:
In file included from /usr/include/xtensor/xview.hpp:20:0,
from /usr/include/xtensor/xio.hpp:22,
from /home/omen/src/catkin_ws/src/xtensor-ros-master/src/publisher.cpp:4:
/usr/include/xtensor/xcontainer.hpp: In instantiation of ‘void xt::xstrided_container<D, L>::reshape(const S&, const strides_type&) [with S = std::vector; D = xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector >; xt::layout_type L = (xt::layout_type)0; xt::xstrided_container<D, L>::strides_type = std::vector]’:
/usr/include/xtensor/xarray.hpp:466:27: required from ‘xt::xarray_adaptor<EC, L, SC>::xarray_adaptor(xt::xarray_adaptor<EC, L, SC>::container_closure_type, const shape_type&, const strides_type&) [with EC = const std::vector; xt::layout_type L = (xt::layout_type)0; SC = std::vector; xt::xarray_adaptor<EC, L, SC>::container_closure_type = const std::vector&; xt::xarray_adaptor<EC, L, SC>::shape_type = std::vector; xt::xarray_adaptor<EC, L, SC>::strides_type = std::vector]’
/usr/include/xtensor/xadapt.hpp:152:16: required from ‘std::enable_if_t<(! xt::detail::is_array::value), xt::xarray_adaptor<C, (xt::layout_type)0, SC> > xt::xadapt(C&, const SC&, const SC&) [with C = const std::vector; SC = std::vector; std::enable_if_t<(! xt::detail::is_array::value), xt::xarray_adaptor<C, (xt::layout_type)0, SC> > = xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector >]’
/home/omen/src/catkin_ws/src/xtensor-ros-master/src/include/conversions.hpp:45:55: required from here
/usr/include/xtensor/xcontainer.hpp:856:9: error: passing ‘xt::xcontainer<xt::xarray_adaptor<const std::vector, (xt::layout_type)0, std::vector > >::container_type {aka const std::vector}’ as ‘this’ argument discards qualifiers [-fpermissive]
this->data().resize(compute_size(m_shape));
^~~~
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/boost/math/special_functions/math_fwd.hpp:26,
from /usr/include/boost/math/special_functions/round.hpp:15,
from /opt/ros/melodic/include/ros/time.h:58,
from /opt/ros/melodic/include/ros/ros.h:38,
from /home/omen/src/catkin_ws/src/xtensor-ros-master/src/publisher.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:689:7: note: in call to ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = double; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
resize(size_type __new_size)
^~~~~~
xtensor-ros-master/CMakeFiles/publisher.dir/build.make:62: recipe for target 'xtensor-ros-master/CMakeFiles/publisher.dir/src/publisher.cpp.o' failed
make[2]: *** [xtensor-ros-master/CMakeFiles/publisher.dir/src/publisher.cpp.o] Error 1
CMakeFiles/Makefile2:6129: recipe for target 'xtensor-ros-master/CMakeFiles/publisher.dir/all' failed
make[1]: *** [xtensor-ros-master/CMakeFiles/publisher.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed

Hope you are able ti help.

Best regards
DenLar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant