artemp/mapnik — Issue #252: Building with boost 1.33.1 is broken due to boost::python compile errors
Author: artemp
Created: 2011-10-11 16:07:10+00:00
State: open
Labels: Scons_Build_Scripts

Looks like something with the mapnik_map.cpp boost::python is blowing out when building with an old version of boost.

This is with:
{{{
$ g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

}}}
It would be nice to still support boost 1_33, but I'm not seeing anything wrong in the mapnik code yet...
{{{
g++ -o bindings/python/mapnik_parameters.os -c -DHAVE_LIBXML2 -DHAVE_CAIRO -DHAVE_PYCAIRO -ansi -Wall -pthread -ftemplate-depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DNone -I/usr/include/python2.5 -Iagg/include -Iinclude -I. -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairomm-1.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pycairo bindings/python/mapnik_parameters.cpp
/usr/include/boost/python/converter/pyobject_type.hpp: In static member function ‘static bool boost::python::converter::pyobject_type::check(PyObject*) [with Object = boost::python::tuple, PyTypeObject* pytype = (& PyTuple_Type)]’:
/usr/include/boost/python/converter/obj_mgr_arg_from_python.hpp:69: instantiated from ‘bool boost::python::converter::object_manager_value_arg_from_python::convertible() const [with T = boost::python::tuple]’
/usr/include/boost/preprocessor/iteration/detail/local.hpp:37: instantiated from ‘PyObject* boost::python::detail::caller_arity<2u>::impl::operator()(PyObject*, PyObject*) [with F = void (*)(mapnik::parameters&, boost::python::tuple), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector3]’
/usr/include/boost/python/object/py_function.hpp:38: instantiated from ‘PyObject* boost::python::objects::caller_py_function_impl::operator()(PyObject*, PyObject*) [with Caller = boost::python::detail::caller >]’
bindings/python/mapnik_parameters.cpp:89: instantiated from here
/usr/include/boost/python/converter/pyobject_type.hpp:21: warning: dereferencing type-punned pointer will break strict-aliasing rules
g++ -o bindings/python/python_cairo.os -c -DHAVE_LIBXML2 -DHAVE_CAIRO -DHAVE_PYCAIRO -ansi -Wall -pthread -ftemplate-depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DNone -I/usr/include/python2.5 -Iagg/include -Iinclude -I. -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairomm-1.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pycairo bindings/python/python_cairo.cpp
g++ -o bindings/python/mapnik_map.os -c -DHAVE_LIBXML2 -DHAVE_CAIRO -DHAVE_PYCAIRO -ansi -Wall -pthread -ftemplate-depth-100 -DLINUX -DBOOST_SPIRIT_THREADSAFE -DMAPNIK_THREADSAFE -O2 -finline-functions -Wno-inline -DNDEBUG -fPIC -DNone -I/usr/include/python2.5 -Iagg/include -Iinclude -I. -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairomm-1.0 -I/usr/include/cairo -I/usr/include/libpng12 -I/usr/include/pycairo bindings/python/mapnik_map.cpp
/usr/include/boost/numeric/conversion/detail/converter.hpp:233: error: expected unqualified-id before numeric constant
/usr/include/boost/numeric/conversion/detail/converter.hpp:238: error: type/value mismatch at argument 6 in template parameter list for ‘template struct boost::numeric::convdetail::for_both’
/usr/include/boost/numeric/conversion/detail/converter.hpp:238: error: expected a type, got ‘1’
/usr/include/boost/numeric/conversion/detail/converter.hpp: In static member function ‘static boost::numeric::range_check_result boost::numeric::convdetail::generic_range_checker::out_of_range(typename Traits::argument_type) [with Traits = boost::numeric::conversion_traits, IsNegOverflow = boost::numeric::convdetail::LT_Zero >, IsPosOverflow = boost::numeric::convdetail::non_applicable, OverflowHandler = boost::numeric::def_overflow_handler]’:
/usr/include/boost/numeric/conversion/detail/converter.hpp:294: instantiated from ‘static void boost::numeric::convdetail::generic_range_checker::validate_range(typename Traits::argument_type) [with Traits = boost::numeric::conversion_traits, IsNegOverflow = boost::numeric::convdetail::LT_Zero >, IsPosOverflow = boost::numeric::convdetail::non_applicable, OverflowHandler = boost::numeric::def_overflow_handler]’
/usr/include/boost/numeric/conversion/detail/converter.hpp:523: instantiated from ‘static typename Traits::result_type boost::numeric::convdetail::non_rounding_converter::convert(typename Traits::argument_type) [with Traits = boost::numeric::conversion_traits, RangeChecker = boost::numeric::convdetail::generic_range_checker, boost::numeric::convdetail::LT_Zero >, boost::numeric::convdetail::non_applicable, boost::numeric::def_overflow_handler>, RawConverter = boost::numeric::raw_converter >]’
/usr/include/boost/numeric/conversion/cast.hpp:41: instantiated from ‘Target boost::numeric_cast(Source) [with Target = unsigned int, Source = long int]’
/usr/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp:608: instantiated from ‘static void boost::python::detail::slice_helper::base_get_slice_data(Container&, PySliceObject*, Index&, Index&) [with Container = std::vector >, DerivedPolicies = boost::python::detail::final_vector_derived_policies >, false>, ProxyHandler = boost::python::detail::proxy_helper >, boost::python::detail::final_vector_derived_policies >, false>, boost::python::detail::container_element >, unsigned int, boost::python::detail::final_vector_derived_policies >, false> >, unsigned int>, Data = mapnik::Layer, Index = unsigned int]’
/usr/include/boost/python/suite/indexing/detail/indexing_suite_detail.hpp:632: instantiated from ‘static void boost::python::detail::slice_helper::base_set_slice(Container&, PySliceObject*, PyObject*) [with Container = std::vector >, DerivedPolicies = boost::python::detail::final_vector_derived_policies >, false>, ProxyHandler = boost::python::detail::proxy_helper >, boost::python::detail::final_vector_derived_policies >, false>, boost::python::detail::container_element >, unsigned int, boost::python::detail::final_vector_derived_policies >, false> >, unsigned int>, Data = mapnik::Layer, Index = unsigned int]’
/usr/include/boost/python/suite/indexing/indexing_suite.hpp:215: instantiated from ‘static void boost::python::indexing_suite::base_set_item(Container&, PyObject*, PyObject*) [with Container = std::vector >, DerivedPolicies = boost::python::detail::final_vector_derived_policies >, false>, bool NoProxy = false, bool NoSlice = false, Data = mapnik::Layer, Index = unsigned int, Key = mapnik::Layer]’
/usr/include/boost/python/suite/indexing/indexing_suite.hpp:178: instantiated from ‘void boost::python::indexing_suite::visit(Class&) const [with Class = boost::python::class_ >, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, Container = std::vector >, DerivedPolicies = boost::python::detail::final_vector_derived_policies >, false>, bool NoProxy = false, bool NoSlice = false, Data = mapnik::Layer, Index = unsigned int, Key = mapnik::Layer]’
/usr/include/boost/python/def_visitor.hpp:31: instantiated from ‘static void boost::python::def_visitor_access::visit(const V&, classT&) [with V = boost::python::def_visitor >, boost::python::detail::final_vector_derived_policies >, false>, false, false, mapnik::Layer, unsigned int, mapnik::Layer> >, classT = boost::python::class_ >, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>]’
/usr/include/boost/python/def_visitor.hpp:67: instantiated from ‘void boost::python::def_visitor::visit(classT&) const [with classT = boost::python::class_ >, boost::python::detail::not_specified, boost::python::detail::not_specified, boost::python::detail::not_specified>, DerivedVisitor = boost::python::indexing_suite >, boost::python::detail::final_vector_derived_policies >, false>, false, false, mapnik::Layer, unsigned int, mapnik::Layer>]’
/usr/include/boost/python/class.hpp:225: instantiated from ‘boost::python::class_& boost::python::class_::def(const boost::python::def_visitor&) [with Derived = boost::python::indexing_suite >, boost::python::detail::final_vector_derived_policies >, false>, false, false, mapnik::Layer, unsigned int, mapnik::Layer>, W = std::vector >, X1 = boost::python::detail::not_specified, X2 = boost::python::detail::not_specified, X3 = boost::python::detail::not_specified]’
bindings/python/mapnik_map.cpp:130: instantiated from here
/usr/include/boost/numeric/conversion/detail/converter.hpp:290: error: ‘apply’ is not a member of ‘int’
/usr/include/boost/python/converter/pyobject_type.hpp: In static member function ‘static bool boost::python::converter::pyobject_type::check(PyObject*) [with Object = boost::python::tuple, PyTypeObject* pytype = (& PyTuple_Type)]’:
/usr/include/boost/python/converter/obj_mgr_arg_from_python.hpp:69: instantiated from ‘bool boost::python::converter::object_manager_value_arg_from_python::convertible() const [with T = boost::python::tuple]’
/usr/include/boost/preprocessor/iteration/detail/local.hpp:37: instantiated from ‘PyObject* boost::python::detail::caller_arity<2u>::impl::operator()(PyObject*, PyObject*) [with F = void (*)(mapnik::Map&, boost::python::tuple), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector3]’
/usr/include/boost/python/object/py_function.hpp:38: instantiated from ‘PyObject* boost::python::objects::caller_py_function_impl::operator()(PyObject*, PyObject*) [with Caller = boost::python::detail::caller >]’
bindings/python/mapnik_map.cpp:402: instantiated from here
/usr/include/boost/python/converter/pyobject_type.hpp:21: warning: dereferencing type-punned pointer will break strict-aliasing rules
scons: *** [bindings/python/mapnik_map.os] Error 1
scons: building terminated because of errors.
}}}