mapnik / python-mapnik

Python bindings for mapnik
GNU Lesser General Public License v2.1
160 stars 91 forks source link

Fails to build with Boost 1.74 (error: static assertion failed: Const/reference qualifiers on Karma rule attribute are meaningless) #236

Closed sebastic closed 3 years ago

sebastic commented 3 years ago

As reported by Anton Gladky in Debian Bug #975593:

it was discovered that your package failed to build against boost_1.74. Logs can be found here [1]. Most relevant part is probably this:

/usr/include/boost/spirit/home/karma/nonterminal/rule.hpp:140:9: error: static assertion failed: Const/reference qualifiers on Karma rule attribute are meaningless
  140 |         BOOST_STATIC_ASSERT_MSG(
      |         ^~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/c++' failed with exit code 1

It is planned to push boost_1.74 as the default version in Debian/Bullseye.

[1] http://qa-logs.debian.net/2020/10/27-boost/boost/python-mapnik_0.0~20200224-7da019cf9-2_unstable_boost.log

A bit more context from the log:

In file included from /usr/include/boost/type_traits/type_with_alignment.hpp:13,
                 from /usr/include/boost/type_traits/alignment_traits.hpp:13,
                 from /usr/include/boost/python/detail/type_traits.hpp:32,
                 from /usr/include/boost/python/cast.hpp:9,
                 from /usr/include/boost/python/handle.hpp:10,
                 from /usr/include/boost/python/args_fwd.hpp:10,
                 from /usr/include/boost/python/args.hpp:10,
                 from /usr/include/boost/python.hpp:11,
                 from src/mapnik_feature.cpp:28:
/usr/include/boost/spirit/home/karma/nonterminal/rule.hpp: In instantiation of ‘struct boost::spirit::karma::rule<std::back_insert_iterator<std::__cxx11::basic_string<char> >, const mapnik::feature_impl&(), boost::spirit::unused_type, boost::spirit::unused_type, boost::spirit::unused_type>’:
/usr/include/boost/spirit/home/karma/nonterminal/grammar.hpp:43:49:   required from ‘struct boost::spirit::karma::grammar<std::back_insert_iterator<std::__cxx11::basic_string<char> >, const mapnik::feature_impl&(), boost::spirit::unused_type, boost::spirit::unused_type, boost::spirit::unused_type>’
/usr/include/mapnik/json/feature_generator_grammar.hpp:106:8:   required from ‘struct mapnik::json::feature_generator_grammar<std::back_insert_iterator<std::__cxx11::basic_string<char> >, mapnik::feature_impl>’
/usr/include/mapnik/util/feature_to_geojson.hpp:35:91:   required from here
/usr/include/boost/spirit/home/karma/nonterminal/rule.hpp:140:9: error: static assertion failed: Const/reference qualifiers on Karma rule attribute are meaningless
  140 |         BOOST_STATIC_ASSERT_MSG(
      |         ^~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/c++' failed with exit code 1
sebastic commented 3 years ago

boost1.74 is now the default in Debian unstable, increasing the severity of this issue.

sebastic commented 3 years ago

This is fixed in Mapnik 3.0.24.