Open jbeich opened 5 years ago
@jbeich - yep, thanks for reporting.
Sorry to bring forth an old thread but, any activity on this issue? I am also similar having issues compiling mapnik using boost 1.70.0.
In file included from include/mapnik/json/json_grammar_config.hpp:36,
from src/json/unicode_string_grammar_x3.cpp:24:
include/mapnik/boost_spirit_instantiate.hpp:30:19: error: template-id ‘parse_rule<mapnik::json::grammar::iterator_type, mapnik::json::grammar::phrase_parse_context_type, const boost::spirit::x3::unused_type>’ for ‘bool mapnik::json::grammar::parse_rule(mapnik::json::grammar::unicode_string_grammar_type, const char*&, const char* const&, const phrase_parse_context_type&, const boost::spirit::x3::unused_type&)’ does not match any template declaration
30 | template bool parse_rule<Iterator, Context, boost::spirit::x3::unused_type const>( \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/mapnik/boost_spirit_instantiate.hpp:30:19: note: in definition of macro ‘BOOST_SPIRIT_INSTANTIATE_UNUSED’
30 | template bool parse_rule<Iterator, Context, boost::spirit::x3::unused_type const>( \
|
googling has not helped so far. (that is what brought me here) Thank you and 73
I'm aware of this issue @r1de @jbeich. x3
based grammars rely on ability to reuse rules with or without input attribute defined explicitly. This has been broken in 1.70 see relevant discussion : https://github.com/boostorg/spirit/issues/511
@artemp Thank you!
I (hopefully) await a fix from upstream.
Thanks again
does this error still exist?
yes, @am2222 same make error here
Yes, this issue persists with boost >= 1_70. I have tried to fix but ran into issues that need fixing in boost.spirit.x3 . I just posted an issue with a minimal use-case: https://github.com/boostorg/spirit/issues/548
Thanks. The reason that I am asking is that there might be a chance that the vcpkg team adds mapnik to their ports and it might solve many issue for mapnik compile on windows which can be great.
https://github.com/mapnik/mapnik/pull/4094 <-- this branch works with the latest boost.spirit.x3 (https://github.com/boostorg/spirit/pull/549/commits/10d027fd5cfd573471e80e2e3c2d0cb0616a6d65).
@artemp thanks so much. is there any possibility to merge it into main branch in future?
@am2222 - yes, this is the plan^. To summarise: this PR supports BOOST<1.70
and > 1.71
BOOST 1.71
also works with https://github.com/boostorg/spirit/commit/10d027fd5cfd573471e80e2e3c2d0cb0616a6d65 applied but . BOOST 1.70
is still broken
@artemp awo. thanks so much
An update : boost_1_70 works also when patched ^.
@artemp wow thanks, But one question, I have to update boost.spirit to the latest version, right? because I wanted to use vcpkg version of boost and it seems it is not updated yet.
@am2222 - you can use latest boost.spirit which is not released yet or you can apply https://github.com/boostorg/spirit/commit/10d027fd5cfd573471e80e2e3c2d0cb0616a6d65 (one line change in rule.hpp) to BOOST 1_70 or 1_71
@artemp I got it. Thanks so much
@artemp, do you plan to backport #4094 to v3.0.x
branch?
@jbeich - Have you tried building v3.0.x
with BOOST 1_70 and 1_71? If there are issues related to #4094 then, yes. Thanks!
I get the following error when building v3.0.x
with boost 1_70
include/mapnik/json/geometry_generator_grammar_impl.hpp:109:25: required from 'mapnik::json::geometry_generator_grammar<OutputIterator, Geometry>::geometry_generator_grammar() [with OutputIterator = std::back_insert_iterator<std::basic_string<char> >; Geometry = mapnik::geometry::geometry<double>]'
src/json/mapnik_json_generator_grammar.cpp:35:31: required from here
/home/cpa/.pyenv/versions/miniconda2-4.3.30/conda-bld/mapnik_1572601251166/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include/boost/static_assert.hpp:31:45: error: static assertion failed: Transformed cannot be a reference type
# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
^
/home/cpa/.pyenv/versions/miniconda2-4.3.30/conda-bld/mapnik_1572601251166/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/include/boost/spirit/home/support/attributes.hpp:963:9: note: in expansion of macro 'BOOST_STATIC_ASSERT_MSG'
BOOST_STATIC_ASSERT_MSG(!is_reference<Transformed>::value,
^
scons: *** [src/json/mapnik_json_generator_grammar.o] Error 1
v3.0.x
with Boost 1.71 fails in the same way, see error log.
Same here. v1.69 works.
Subscribing to this issue because I have a project which also uses Spirit X3 and would like any updates from you. I have 60+ grammar objects but no build problems with boost 1.70 and 1.71. I have 0 semantic actions though. If semantic actions cause you build problems you can try replacing them with annotations (I have no issues with them).
On the other hand, my project uncovered a GCC bug which was fixed in GCC 9.0. Before 9.0, it requires non-intrusive workaround but with different versions of Spirit non-workarounded code may either result in compile errors or degradation of all moves to deep copies during parsing.
Mapnik@3.0.23 compiles with all boost versions except the latest: 1.73.
Regressed by boostorg/spirit@d4c0179fa6c6:
Regressed by boostorg/spirit@a3cf3f2c3ebe: