conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
928 stars 1.67k forks source link

[package] pcl/1.13.1: Patch required to fix missing header #24556

Open ebatsin opened 2 weeks ago

ebatsin commented 2 weeks ago

Description

Hi,

I am trying to compile pcl/1.13.1. I am building from source and when I get to io/src/ply/ply_parser.cpp, i get the following error:

In file included from /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/src/ply/ply_parser.cpp:41:
/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:76:43: error: no template named 'function' in namespace 'std'
   76 |           using info_callback_type = std::function<void (std::size_t, const std::string&)>;
      |                                      ~~~~~^

And indeed, there is a missing functional include in this header, that have been fixed on the remote 5 months ago here : https://github.com/PointCloudLibrary/pcl/commit/61b2e8e5336d7d8b0e1ae7c1168035faa083310b

Sadly, this fix shipped in PCL 1.14.1 which is not available in Conan. Could a patch be added to add the missing include or a new package be created?

I can help if necessary but I never contributed here so I don't know how long I would take to fix it properly.

Package and Environment Details

Conan profile

[settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=17 os=Linux

Steps to reproduce

conan install . --output-folder=build # with only PCL in the conanfile.txt

Logs

Click to expand log ``` -- Build files have been written to: /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/build/Release pcl/1.13.1: Running CMake.build() pcl/1.13.1: RUN: cmake --build "/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/build/Release" -- -j24 [67/296] Building CXX object io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o FAILED: io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o /usr/bin/clang++ -DBOOST_ALL_DYN_LINK -DHAVE_PCAP -DPCLAPI_EXPORTS -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/build/Release/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/common/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/octree/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/openni/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/openni2/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/ensenso/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/davidSDK/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/dssdk/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/pcap/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/png/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/vtk/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/libusb/include -I/home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include -isystem /home/user/.conan2/p/eigen3d88c0279cc26/p/include/eigen3 -isystem /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/recognition/include/pcl/recognition/3rdparty -isystem /home/user/.conan2/p/b/libpn96a954f9ba9b5/p/include -isystem /home/user/.conan2/p/b/libpc3000e4572934e/p/include -isystem /home/user/.conan2/p/b/boost46bbb18424978/p/include -m64 -stdlib=libstdc++ -O3 -DNDEBUG -std=c++17 -fPIC -MD -MT io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o -MF io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o.d -o io/CMakeFiles/pcl_io_ply.dir/src/ply/ply_parser.cpp.o -c /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/src/ply/ply_parser.cpp In file included from /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/src/ply/ply_parser.cpp:41: /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:76:43: error: no template named 'function' in namespace 'std' 76 | using info_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:77:46: error: no template named 'function' in namespace 'std' 77 | using warning_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:78:44: error: no template named 'function' in namespace 'std' 78 | using error_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:80:44: error: no template named 'function' in namespace 'std' 80 | using magic_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:81:45: error: no template named 'function' in namespace 'std' 81 | using format_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:82:46: error: no template named 'function' in namespace 'std' 82 | using comment_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:83:47: error: no template named 'function' in namespace 'std' 83 | using obj_info_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:84:49: error: no template named 'function' in namespace 'std' 84 | using end_header_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:86:52: error: no template named 'function' in namespace 'std' 86 | using begin_element_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:87:50: error: no template named 'function' in namespace 'std' 87 | using end_element_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:88:53: error: use of undeclared identifier 'begin_element_callback_type' 88 | using element_callbacks_type = std::tuple; | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:89:57: error: no template named 'function' in namespace 'std' 89 | using element_definition_callback_type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:89:90: error: expected expression 89 | using element_definition_callback_type = std::function; | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:89:121: error: expected '(' for function-style cast or type construction 89 | using element_definition_callback_type = std::function; | ~~~~~~~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:94:31: error: no template named 'function' in namespace 'std' 94 | using type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:101:31: error: no template named 'function' in namespace 'std' 101 | using type = std::function; | ~~~~~^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:100:103: error: no type named 'type' in 'pcl::io::ply::ply_parser::scalar_property_callback_type' 100 | using scalar_property_callback_type = typename scalar_property_callback_type::type; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:114:26: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callback_type' requested here 114 | typename scalar_property_definition_callback_type::type callback; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element' requested here 20 | BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:245:65: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 245 | , boost::mpl::aux::type_wrapper* = 0 \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: while substituting deduced template arguments into function template 'test' [with U = pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element] /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:253:18: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 253 | sizeof(gcc_3_2_wknd::test(static_cast(0))) \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp:36:20: note: in instantiation of template class 'boost::mpl::aux::has_type>' requested here 36 | , aux::has_type< F >::value | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp:38:7: note: in instantiation of template class 'boost::mpl::quote1::apply' requested here 38 | : F::template apply | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp:141:26: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) 141 | typedef typename apply_wrap1< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:109:22: note: in instantiation of template class 'boost::mpl::apply2, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>, boost::mpl::empty_base, signed char>' requested here 109 | typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:142:20: note: in instantiation of template class 'boost::mpl::aux::fold_impl<4, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 142 | , typename chunk_::iterator | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/fold.hpp:33:27: note: in instantiation of template class 'boost::mpl::aux::fold_impl<8, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 33 | typedef typename aux::fold_impl< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/inherit_linearly.hpp:30:7: note: in instantiation of template class 'boost::mpl::fold, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 30 | : fold | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:117:45: note: in instantiation of template class 'boost::mpl::inherit_linearly, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 117 | using callbacks = boost::mpl::inherit_linearly< | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:100:103: error: no type named 'type' in 'pcl::io::ply::ply_parser::scalar_property_callback_type' 100 | using scalar_property_callback_type = typename scalar_property_callback_type::type; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:114:26: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callback_type' requested here 114 | typename scalar_property_definition_callback_type::type callback; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element' requested here 20 | BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:245:65: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 245 | , boost::mpl::aux::type_wrapper* = 0 \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: while substituting deduced template arguments into function template 'test' [with U = pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element] /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:253:18: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 253 | sizeof(gcc_3_2_wknd::test(static_cast(0))) \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp:36:20: note: in instantiation of template class 'boost::mpl::aux::has_type>' requested here 36 | , aux::has_type< F >::value | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp:38:7: note: in instantiation of template class 'boost::mpl::quote1::apply' requested here 38 | : F::template apply | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp:141:26: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) 141 | typedef typename apply_wrap1< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:111:22: note: in instantiation of template class 'boost::mpl::apply2, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element, short>' requested here 111 | typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:142:20: note: in instantiation of template class 'boost::mpl::aux::fold_impl<4, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 142 | , typename chunk_::iterator | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/fold.hpp:33:27: note: in instantiation of template class 'boost::mpl::aux::fold_impl<8, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 33 | typedef typename aux::fold_impl< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/inherit_linearly.hpp:30:7: note: in instantiation of template class 'boost::mpl::fold, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 30 | : fold | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:117:45: note: in instantiation of template class 'boost::mpl::inherit_linearly, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 117 | using callbacks = boost::mpl::inherit_linearly< | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:100:103: error: no type named 'type' in 'pcl::io::ply::ply_parser::scalar_property_callback_type' 100 | using scalar_property_callback_type = typename scalar_property_callback_type::type; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:114:26: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callback_type' requested here 114 | typename scalar_property_definition_callback_type::type callback; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: in instantiation of template class 'pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element' requested here 20 | BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:245:65: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 245 | , boost::mpl::aux::type_wrapper* = 0 \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/has_type.hpp:20:1: note: while substituting deduced template arguments into function template 'test' [with U = pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element] /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/has_xxx.hpp:253:18: note: expanded from macro 'BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF' 253 | sizeof(gcc_3_2_wknd::test(static_cast(0))) \ | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/quote.hpp:36:20: note: in instantiation of template class 'boost::mpl::aux::has_type>' requested here 36 | , aux::has_type< F >::value | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp:38:7: note: in instantiation of template class 'boost::mpl::quote1::apply' requested here 38 | : F::template apply | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp:141:26: note: (skipping 6 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all) 141 | typedef typename apply_wrap1< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:113:22: note: in instantiation of template class 'boost::mpl::apply2, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>, int>' requested here 113 | typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp:142:20: note: in instantiation of template class 'boost::mpl::aux::fold_impl<4, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 142 | , typename chunk_::iterator | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/fold.hpp:33:27: note: in instantiation of template class 'boost::mpl::aux::fold_impl<8, boost::mpl::v_iter, 0>, boost::mpl::v_iter, 8>, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 33 | typedef typename aux::fold_impl< | ^ /home/user/.conan2/p/b/boost46bbb18424978/p/include/boost/mpl/inherit_linearly.hpp:30:7: note: in instantiation of template class 'boost::mpl::fold, boost::mpl::empty_base, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 30 | : fold | ^ /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/src/io/include/pcl/io/ply/ply_parser.h:117:45: note: in instantiation of template class 'boost::mpl::inherit_linearly, boost::mpl::inherit, pcl::io::ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element>>>' requested here 117 | using callbacks = boost::mpl::inherit_linearly< | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. [90/296] Building CXX object filters/CMakeFiles/pcl_filters.dir/src/voxel_grid_covariance.cpp.o ninja: build stopped: subcommand failed. pcl/1.13.1: ERROR: Package '92c99d0d68fb1b0f4387f61f64785c476f02559e' build failed pcl/1.13.1: WARN: Build folder /home/user/.conan2/p/b/pcl2d3f5f1f2de59/b/build/Release ERROR: pcl/1.13.1: Error in build() method, line 509 cmake.build() ConanException: Error 1 while executing ```
SpaceIm commented 2 weeks ago

I've submitted https://github.com/conan-io/conan-center-index/pull/24562