I have some issues compiling python bindings for my project involving xtensor.
My CMakeList.txt looks like this
I use gcc 10.2 (system installation) and cmake 3.19.1 (system installation). I also have copied FindNumPy.cmake into cmake/ (Which would have been helpful if documentation would mention this)
include/pybind11/cast.h:921:43: error: ‘std::remove_reference<pybind11::detail::type_caster<xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>, void>&>::type’ {aka ‘class pybind11::detail::type_caster<xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>, void>’} has no member named ‘operator pybind11::detail::xtensor_type_caster_base<xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >::cast_op_type<const xt::xarray_container<xt::uvector<double, std::allocator<double> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>’
920 | return std::move(caster).operator
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
921 | typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>();
...
cast.h:921:43: error: ‘std::remove_reference<pybind11::detail::type_caster<xt::xarray_container<xt::uvector<unsigned int, std::allocator<unsigned int> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>, void>&>::type’ {aka ‘class pybind11::detail::type_caster<xt::xarray_container<xt::uvector<unsigned int, std::allocator<unsigned int> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>, void>’} has no member named ‘operator pybind11::detail::xtensor_type_caster_base<xt::xarray_container<xt::uvector<unsigned int, std::allocator<unsigned int> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag> >::cast_op_type<const xt::xarray_container<xt::uvector<unsigned int, std::allocator<unsigned int> >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator<long unsigned int>, true>, xt::xtensor_expression_tag>&>’
make[2]: *** [CMakeFiles/PyBPE.dir/build.make:82: CMakeFiles/PyBPE.dir/include/Python.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/PyBPE.dir/all] Error 2
I have some issues compiling python bindings for my project involving xtensor.
My CMakeList.txt looks like this
with Python.cpp
My conda environment has installed:
I use gcc 10.2 (system installation) and cmake 3.19.1 (system installation). I also have copied
FindNumPy.cmakeintocmake/(Which would have been helpful if documentation would mention this)Now during compilation I get