Opened 13 years ago

Last modified 11 years ago

#3318 new Bugs

boost/python/detail/caller.hpp doesn't compile (no member named 'get_pytype')

Reported by: Ingmar Vanhassel <ingmar@…> Owned by: troy d. straszheim
Milestone: Boost 1.40.0 Component: python USE GITHUB
Version: Boost 1.39.0 Severity: Regression
Keywords: Cc:

Description

When compiling vegastrike-0.5.0 against boost 1.39.0 (./configure --with-boost=system to use the system boost instead of internal copy), the build breaks on errors in the boost/python/detail/caller.hpp header:

In file included from /usr/include/boost/python/object/function_handle.hpp:9,                                                                                                                                  
                 from /usr/include/boost/python/converter/arg_to_python.hpp:20,                                                                                                                                
                 from /usr/include/boost/python/call.hpp:16,                                                                                                                                                   
                 from /usr/include/boost/python/object_core.hpp:13,                                                                                                                                            
                 from /usr/include/boost/python/object.hpp:10,                                                                                                                                                 
                 from src/python/python_class.h:24,                                                                                                                                                            
                 from src/python/briefing_wrapper.cpp:4:                                                                                                                                                       
/usr/include/boost/python/detail/caller.hpp: In static member function 'static const PyTypeObject* boost::python::detail::converter_target_type<ResultConverter>::get_pytype() [with ResultConverter = boost::python::to_python_value<const Vector&>]':                                                                                                                                                                       
/usr/include/boost/python/detail/caller.hpp:242:   instantiated from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<1u>::impl<F, Policies, Sig>::signature() [with F = Vector (*)(int), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector2<Vector, int>]'                                                                                                        
/usr/include/boost/python/object/py_function.hpp:48:   instantiated from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<Vector (*)(int), boost::python::default_call_policies, boost::mpl::vector2<Vector, int> >]'                                                                                         
src/python/briefing_wrapper.cpp:59:   instantiated from here                                                                                                                                                   
/usr/include/boost/python/detail/caller.hpp:102: error: 'struct boost::python::detail::caller_arity<1u>::impl<F, Policies, Sig>::operator()(PyObject*, PyObject*) [with F = Vector (*)(int), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector2<Vector, int>]::result_converter' has no member named 'get_pytype'                                                                                     
make[1]: *** [src/python/briefing_wrapper.o] Error 1                                                                                                                                                           

Labelling this as regression since vegastrike is known to compile with boost 1.36.0.

I'm using GCC 4.4.0, glibc 2.10.1, python 2.6.1 on Exherbo Linux

Change History (10)

comment:2 by troy d. straszheim, 13 years ago

Summary: boost/python/detail/caller.hpp doesn't compile (no member named 'get_pytype')[fix in git] boost/python/detail/caller.hpp doesn't compile (no member named 'get_pytype')

marking [fix in git] as detail/caller.hpp is completely overhauled there.

comment:3 by Dave Abrahams, 13 years ago

Owner: changed from Dave Abrahams to troy d. straszheim

Reassigning, since I don't know what to do with a bug marked "fixed in git."

comment:4 by troy d. straszheim, 13 years ago

Summary: [fix in git] boost/python/detail/caller.hpp doesn't compile (no member named 'get_pytype')boost/python/detail/caller.hpp doesn't compile (no member named 'get_pytype')

The others marked [fix in git] come with urls of commits to my git branch that fix the problem. These [fix in git] tags were notes to self as I attempted to get all bugs fixed on my branch prior to a "merge to trunk".... ugh. I'll just unmark these [fix in git] things.

I'll take the bug. Can anybody verify that this is still broken?

comment:5 by Dave Abrahams, 13 years ago

Leave any marks you want as long as you claim the tickets ;-)

comment:6 by Nicolas Kaiser <nikai@…>, 12 years ago

This is the same one, isn't it?

Vega Strike SVN, Boost 1.41.0

gcc 4.4.3, glibc 2.11.2, python 2.6.5 on Gentoo Linux

In file included from /usr/include/boost-1_41/boost/python/object/function_handle.hpp:8,
                 from /usr/include/boost-1_41/boost/python/converter/arg_to_python.hpp:19,
                 from /usr/include/boost-1_41/boost/python/call.hpp:15,
                 from /usr/include/boost-1_41/boost/python/object_core.hpp:12,
                 from /usr/include/boost-1_41/boost/python/object.hpp:9,
                 from /var/tmp/portage/games-simulation/vegastrike-9999/work/vegastrike/src/python/python_class.h:25,
                 from /var/tmp/portage/games-simulation/vegastrike-9999/work/vegastrike/src/python/unit_exports.h:1,
                 from /var/tmp/portage/games-simulation/vegastrike-9999/work/vegastrike/src/python/unit_exports1.cpp:3:
/usr/include/boost-1_41/boost/python/detail/caller.hpp: In static member function 'static const PyTypeObject* boost::python::detail::converter_target_type<ResultConverter>::get_pytype() [with ResultConverter = boost::python::to_python_value<const QVector&>]':
/usr/include/boost-1_41/boost/python/detail/caller.hpp:242:   instantiated from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<1u>::impl<F, Policies, Sig>::signature() [with F = QVector (UnitWrapper::*)(), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector2<QVector, UnitWrapper&>]'
/usr/include/boost-1_41/boost/python/object/py_function.hpp:48:   instantiated from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<QVector (UnitWrapper::*)(), boost::python::default_call_policies, boost::mpl::vector2<QVector, UnitWrapper&> >]'
/var/tmp/portage/games-simulation/vegastrike-9999/work/vegastrike/src/python/unit_exports.h:91:   instantiated from here
/usr/include/boost-1_41/boost/python/detail/caller.hpp:102: error: 'struct boost::python::detail::caller_arity<1u>::impl<F, Policies, Sig>::operator()(PyObject*, PyObject*) [with F = QVector (UnitWrapper::*)(), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector2<QVector, UnitWrapper&>]::result_converter' has no member named 'get_pytype'
/usr/include/boost-1_41/boost/python/detail/caller.hpp: In static member function 'static const PyTypeObject* boost::python::detail::converter_target_type<ResultConverter>::get_pytype() [with ResultConverter = boost::python::to_python_value<const Vector&>]':
/usr/include/boost-1_41/boost/python/detail/caller.hpp:242:   instantiated from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<2u>::impl<F, Policies, Sig>::signature() [with F = Vector (UnitWrapper::*)(UnitWrapper), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector3<Vector, UnitWrapper&, UnitWrapper>]'
/usr/include/boost-1_41/boost/python/object/py_function.hpp:48:   instantiated from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<Vector (UnitWrapper::*)(UnitWrapper), boost::python::default_call_policies, boost::mpl::vector3<Vector, UnitWrapper&, UnitWrapper> >]'
/var/tmp/portage/games-simulation/vegastrike-9999/work/vegastrike/src/python/unit_exports.h:91:   instantiated from here
/usr/include/boost-1_41/boost/python/detail/caller.hpp:102: error: 'struct boost::python::detail::caller_arity<2u>::impl<F, Policies, Sig>::operator()(PyObject*, PyObject*) [with F = Vector (UnitWrapper::*)(UnitWrapper), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector3<Vector, UnitWrapper&, UnitWrapper>]::result_converter' has no member named 'get_pytype'
make[2]: *** [CMakeFiles/engine_com.dir/src/python/unit_exports1.o] Error 1

comment:7 by Dave Abrahams, 12 years ago

hard to know. A minimal reproducable test case would help a lot

comment:8 by Nicolas Kaiser <nikai@…>, 12 years ago

I tried to build against system Boost 1.35.0, but failed with the same error. I had a look at the differences between 1.35 in-tree and system 1.35, but couldn't find any interesting ones.

Then I noticed that my build system swallowed the below flag:

vegastrike/m4scripts/VS_WITH_BOOST.m4, lines 15 and 29:

BOOST_CPPFLAGS='-I/usr/include -DBOOST_PYTHON_NO_PY_SIGNATURES '
(..)
AC_DEFINE(BOOST_PYTHON_NO_PY_SIGNATURES,1,[needed for get_pytype])

With this one added it's working for me against 1.41.0.

comment:9 by Marshall Clow, 12 years ago

So, what's the status of this bug?

Igmar (if you're still here) - are you still having this problem with a recent boost?

Troy - did your fixes ever get merged into the SVN depot?

Nicolas - sounds like you're building successfully.

Is there still a problem here?

comment:10 by anonymous, 11 years ago

Still having this problem with following software versions:

  • VegaStrike Revision: 13202
  • boost 1.47.0
  • gcc 4.6.1
  • glibc 2.13

vegastrike ./configure allows python only up to 2.5 . tested with python 2.4 and 2.5

Note: See TracTickets for help on using tickets.