Skip to content

Bug in Container methods implementation #527

Description

@lahwaacz

Hi, we are rebuilding Arch Linux packages with boost 1.92.0 and noticed this error when building rdkit:

FAILED: [code=1] Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o 
/usr/bin/c++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CHRONO_DYN_LINK -DBOOST_CHRONO_NO_LIB -DBOOST_CONTAINER_DYN_LINK -DBOOST_CONTAINER_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_DATE_TIME_NO_LIB -DBOOST_GRAPH_DYN_LINK -DBOOST_GRAPH_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_IOSTREAMS_NO_LIB -DBOOST_MATH_TR1_DYN_LINK -DBOOST_MATH_TR1_NO_LIB -DBOOST_NUMPY_DYN_LINK -DBOOST_NUMPY_NO_LIB -DBOOST_PYTHON_DYN_LINK -DBOOST_PYTHON_NO_LIB -DBOOST_RANDOM_DYN_LINK -DBOOST_RANDOM_NO_LIB -DBOOST_SERIALIZATION_DYN_LINK -DBOOST_SERIALIZATION_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DRDKIT_DYN_LINK -DRDK_64BIT_BUILD -DRDK_BUILD_COORDGEN_SUPPORT -DRDK_BUILD_DESCRIPTORS3D -DRDK_BUILD_MAEPARSER_SUPPORT -DRDK_BUILD_THREADSAFE_SSS -DRDK_HAS_EIGEN3 -DRDK_TEST_MULTITHREADED -DRDK_USE_BOOST_IOSTREAMS -DRDK_USE_BOOST_SERIALIZATION -DRDK_USE_STRICT_ROTOR_DEFINITION -DRDK_USE_URF -DrdBase_EXPORTS -I/build/rdkit/src/rdkit-Release_2026_03_5/External -I/build/rdkit/src/rdkit-Release_2026_03_5/External/RingFamilies/RingDecomposerLib/src/RingDecomposerLib -I/usr/include/inchi -I/build/rdkit/src/rdkit-Release_2026_03_5/Code -I/usr/lib/python3.14/site-packages/numpy/_core/include -isystem /usr/include/python3.14 -isystem /usr/include/eigen3 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/build/rdkit/src=/usr/src/debug/rdkit -flto=auto -mpopcnt -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -Wall -Wextra -fPIC -std=gnu++20 -fPIC -MD -MT Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o -MF Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o.d -o Code/RDBoost/Wrap/CMakeFiles/rdBase.dir/RDBase.cpp.o -c /build/rdkit/src/rdkit-Release_2026_03_5/Code/RDBoost/Wrap/RDBase.cpp
In file included from /usr/include/boost/python/suite/indexing/vector_indexing_suite.hpp:9,
                 from /build/rdkit/src/rdkit-Release_2026_03_5/Code/RDBoost/python.h:5,
                 from /build/rdkit/src/rdkit-Release_2026_03_5/Code/RDBoost/Wrap/RDBase.cpp:10:
/usr/include/boost/python/suite/indexing/indexing_suite.hpp: In instantiation of ‘static void boost::python::indexing_suite<Container, DerivedPolicies, NoProxy, NoSlice, Data, Index, Key>::base_clear(Container&) [with Container = std::__cxx11::list<int>; DerivedPolicies = boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>; bool NoProxy = true; bool NoSlice = false; Data = int; Index = long unsigned int; Key = int]’:
/usr/include/boost/python/suite/indexing/indexing_suite.hpp:187:31:   required from ‘void boost::python::indexing_suite<Container, DerivedPolicies, NoProxy, NoSlice, Data, Index, Key>::visit(Class&) const [with Class = boost::python::class_<std::__cxx11::list<int>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>; Container = std::__cxx11::list<int>; DerivedPolicies = boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>; bool NoProxy = true; bool NoSlice = false; Data = int; Index = long unsigned int; Key = int]’
  187 |                 .def("clear", &base_clear)
      |                               ^~~~~~~~~~~
/usr/include/boost/python/def_visitor.hpp:31:34:   required from ‘static void boost::python::def_visitor_access::visit(const V&, classT&) [with V = boost::python::def_visitor<boost::python::indexing_suite<std::__cxx11::list<int>, boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>, true, false, int, long unsigned int, int> >; classT = boost::python::class_<std::__cxx11::list<int>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>]’
   31 |         v.derived_visitor().visit(c);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/boost/python/def_visitor.hpp:67:34:   required from ‘void boost::python::def_visitor<DerivedVisitor>::visit(classT&) const [with classT = boost::python::class_<std::__cxx11::list<int>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>; DerivedVisitor = boost::python::indexing_suite<std::__cxx11::list<int>, boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>, true, false, int, long unsigned int, int>]’
   67 |         def_visitor_access::visit(*this, c);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/boost/python/class.hpp:221:22:   required from ‘boost::python::class_<T, X1, X2, X3>::self& boost::python::class_<T, X1, X2, X3>::def(const boost::python::def_visitor<Derived>&) [with Derived = boost::python::indexing_suite<std::__cxx11::list<int>, boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>, true, false, int, long unsigned int, int>; W = std::__cxx11::list<int>; X1 = boost::python::detail::not_specified; X2 = boost::python::detail::not_specified; X3 = boost::python::detail::not_specified; self = boost::python::class_<std::__cxx11::list<int>, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>]’
  221 |         visitor.visit(*this);
      |         ~~~~~~~~~~~~~^~~~~~~
/build/rdkit/src/rdkit-Release_2026_03_5/Code/RDBoost/Wrap.h:125:13:   required from ‘void RegisterListConverter(bool) [with T = int]’
  124 |     python::class_<std::list<T>>(name.c_str())
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  125 |         .def(python::list_indexing_suite<std::list<T>, 1>());
      |         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/rdkit/src/rdkit-Release_2026_03_5/Code/RDBoost/Wrap/RDBase.cpp:360:29:   required from here
  360 |   RegisterListConverter<int>();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/boost/python/suite/indexing/indexing_suite.hpp:296:42: error: ‘clear’ is not a member of ‘boost::python::detail::final_list_derived_policies<std::__cxx11::list<int>, true>’
  296 |             return DerivedPolicies::clear(container);
      |                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

It looks like a bug in the recent feat: implement Container methods - #513

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions