tmontaigu / CloudCompare-PythonRuntime

Python plugin for CloudCompare
54 stars 15 forks source link

CloudCompare Python Plugin compilation fail #78

Closed Loris-L closed 11 months ago

Loris-L commented 11 months ago

I tried to compile python plugin with CloudCompare in my Ubuntu 22.04.3, but cmake failed to build it with this error code:

In file included from /home/loris/Scaricati/CloudCompare/plugins/private/CloudCompare-PythonPlugin/wrapper/pycc/src/qcc_db/ccRasterGrid.cpp:17:
/usr/local/lib/python3.10/dist-packages/pybind11/include/pybind11/pybind11.h: In instantiation of ‘void pybind11::cpp_function::initialize(Func&&, Return (*)(Args ...), const Extra& ...) [with Func = pybind11::cpp_function::cpp_function<ccPointCloud*, ccRasterGrid, bool, bool, const std::vector<ccRasterGrid::ExportableFields, std::allocator<ccRasterGrid::ExportableFields> >&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v>(ccPointCloud* (ccRasterGrid::*)(bool, bool, const std::vector<ccRasterGrid::ExportableFields>&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*) const, const pybind11::name&, const pybind11::is_method&, const pybind11::sibling&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg&, const pybind11::arg_v&)::<lambda(const ccRasterGrid*, bool, bool, const std::vector<ccRasterGrid::ExportableFields>&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*)>; Return = ccPointCloud*; Args = {const ccRasterGrid*, bool, bool, const std::vector<ccRasterGrid::ExportableFields, std::allocator<ccRasterGrid::ExportableFields> >&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*}; Extra = {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v}]’:
/usr/local/lib/python3.10/dist-packages/pybind11/include/pybind11/pybind11.h:132:19:   required from ‘pybind11::cpp_function::cpp_function(Return (Class::*)(Arg ...) const, const Extra& ...) [with Return = ccPointCloud*; Class = ccRasterGrid; Arg = {bool, bool, const std::vector<ccRasterGrid::ExportableFields, std::allocator<ccRasterGrid::ExportableFields> >&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*}; Extra = {pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v}]’
/usr/local/lib/python3.10/dist-packages/pybind11/include/pybind11/pybind11.h:1575:22:   required from ‘pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const char*, Func&&, const Extra& ...) [with Func = ccPointCloud* (ccRasterGrid::*)(bool, bool, const std::vector<ccRasterGrid::ExportableFields>&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*) const; Extra = {pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v}; type_ = ccRasterGrid; options = {}]’
/home/loris/Scaricati/CloudCompare/plugins/private/CloudCompare-PythonPlugin/wrapper/pycc/src/qcc_db/ccRasterGrid.cpp:89:13:   required from here
/usr/local/lib/python3.10/dist-packages/pybind11/include/pybind11/pybind11.h:219:40: error: static assertion failed: The number of argument annotations does not match the number of function arguments
  219 |             expected_num_args<Extra...>(
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^
  220 |                 sizeof...(Args), cast_in::args_pos >= 0, cast_in::has_kwargs),
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/python3.10/dist-packages/pybind11/include/pybind11/pybind11.h:219:40: note: ‘pybind11::detail::expected_num_args<pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v>(15, (((int)pybind11::detail::argument_loader<const ccRasterGrid*, bool, bool, const std::vector<ccRasterGrid::ExportableFields, std::allocator<ccRasterGrid::ExportableFields> >&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*>::args_pos) >= 0), ((int)((bool)pybind11::detail::argument_loader<const ccRasterGrid*, bool, bool, const std::vector<ccRasterGrid::ExportableFields, std::allocator<ccRasterGrid::ExportableFields> >&, bool, bool, bool, bool, ccGenericPointCloud*, unsigned char, const ccBBox&, double, bool, bool, ccProgressDialog*>::has_kwargs)))’ evaluates to false

How can i solve this error?