Closed constantinpape closed 4 years ago
We cannot build with the current pybind11 version (2.4.3), see build error below. It works with version 2.3.
In file included from /home/pape/Work/software/src/nifty/src/python/lib/graph/undirected_list_graph.cxx:9:0: [278/1210] /home/pape/Work/software/src/nifty/src/python/lib/graph/export_undirected_graph_class_api.hxx:50:12: error: ‘PYBIND11_DESCR’ does not name a type; did you mean ‘PYBIND11_EVAL’? static PYBIND11_DESCR name() { ^~~~~~~~~~~~~~ PYBIND11_EVAL In file included from /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/attr.h:13:0, from /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:44, from /home/pape/Work/software/src/nifty/src/python/lib/graph/undirected_list_graph.cxx:1: /home/pape/Work/software/src/nifty/include/nifty/python/converter.hxx: In instantiation of ‘constexpr const auto pybind11::detail::array_caster_<nifty::array::ArrayExtender<nifty::array::StaticArrayBase<$ ong int, 3> >, long int, false, 3>::name’: /home/pape/Work/software/src/nifty/include/nifty/python/converter.hxx:76:9: required from ‘struct pybind11::detail::array_caster_<nifty::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> $ , long int, false, 3>’ /home/pape/Work/software/src/nifty/include/nifty/python/converter.hxx:81:12: required from ‘class pybind11::detail::type_caster<nifty::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> >, void>’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/cast.h:1904:56: required from ‘constexpr const auto pybind11::detail::argument_loader<nifty::graph::UndirectedGraph<long int, l$ ng int>&, nifty::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&>::arg_names’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/cast.h:1904:27: required from ‘class pybind11::detail::argument_loader<nifty::graph::UndirectedGraph<long int, long int>&, nift$ ::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&>’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:133:50: required from ‘void pybind11::cpp_function::initialize(Func&&, Return (*)(Args ...), const Extra& ...) [with Func = nifty::graph::exportUndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<f$ oat, 4>&)>; Return = std::pair<xt::pytensor<float, 1>, xt::pytensor<unsigned int, 1> >; Args = {nifty::graph::UndirectedGraph<long int, long int>&, nifty::array::ArrayExtender<nifty::array::StaticArrayBa$ e<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&}; Extra = {pybind11::name, pybind11::scope, pybind11::sibling}]’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:71:9: required from ‘pybind11::cpp_function::cpp_function(Func&&, const Extra& ...) [with Func = nifty::graph::expor$ UndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<float, 4>&)>; Extra = {pybin$ 11::name, pybind11::scope, pybind11::sibling}; <template-parameter-1-3> = void]’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:819:22: required from ‘pybind11::module& pybind11::module::def(const char*, Func&&, const Extra& ...) [with Func = n$ fty::graph::exportUndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<float, 4>&$ >; Extra = {}]’ /home/pape/Work/software/src/nifty/src/python/lib/graph/undirected_list_graph.cxx:160:9: required from here /home/pape/Work/software/src/nifty/include/nifty/python/converter.hxx:76:70: error: no match for call to ‘(const pybind11::detail::descr<3>) ()’ PYBIND11_TYPE_CASTER(ArrayType, _("List[") + value_conv::name() + _<Resizable>(_(""), _("[") + _<Size>() + _("]")) + _("]")); ~~~~~~~~~~~~~~~~^~ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/cast.h:948:38: note: in definition of macro ‘PYBIND11_TYPE_CASTER’ static constexpr auto name = py_name; \ ^~~~~~~ /home/pape/Work/software/src/nifty/include/nifty/python/converter.hxx: In instantiation of ‘constexpr<typeprefixerror> pybind11::detail::array_caster_<nifty::array::ArrayExtender<nifty::array::StaticArra$ Base<long int, 3> >, long int, false, 3>::name’: /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/cast.h:1904:56: required from ‘constexpr const auto pybind11::detail::argument_loader<nifty::graph::UndirectedGraph<long int, l$ ng int>&, nifty::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&>::arg_names’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/cast.h:1904:27: required from ‘class pybind11::detail::argument_loader<nifty::graph::UndirectedGraph<long int, long int>&, nifty ::array::ArrayExtender<nifty::array::StaticArrayBase<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&>’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:133:50: required from ‘void pybind11::cpp_function::initialize(Func&&, Return (*)(Args ...), const Extra& ...) [with Func = nifty::graph::exportUndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<fl oat, 4>&)>; Return = std::pair<xt::pytensor<float, 1>, xt::pytensor<unsigned int, 1> >; Args = {nifty::graph::UndirectedGraph<long int, long int>&, nifty::array::ArrayExtender<nifty::array::StaticArrayBas e<long int, 3> >, const xt::pytensor<long int, 2, (xt::layout_type)0>&, const xt::pytensor<float, 4, (xt::layout_type)0>&}; Extra = {pybind11::name, pybind11::scope, pybind11::sibling}]’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:71:9: required from ‘pybind11::cpp_function::cpp_function(Func&&, const Extra& ...) [with Func = nifty::graph::export UndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<float, 4>&)>; Extra = {pybind 11::name, pybind11::scope, pybind11::sibling}; <template-parameter-1-3> = void]’ /home/pape/Work/software/conda/miniconda3/envs/nifty-dev/include/pybind11/pybind11.h:819:22: required from ‘pybind11::module& pybind11::module::def(const char*, Func&&, const Extra& ...) [with Func = ni fty::graph::exportUndirectedListGraph(pybind11::module&)::<lambda(nifty::graph::UndirectedGraph<>&, nifty::array::StaticArray<long int, 3>, const xt::pytensor<long int, 2>&, const xt::pytensor<float, 4>&) >; Extra = {}]’
We cannot build with the current pybind11 version (2.4.3), see build error below. It works with version 2.3.