mapnik / mapnik

Mapnik is an open source toolkit for developing mapping applications

Home Page:http://mapnik.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Xcode 12.5 and newer version doesn't compile

alexandre-chau opened this issue · comments

I have an issue with newer version of Xcode after Xcode 12.5 release it seems apple clang compiler doesn't compile mapnik anymore. On older version of Xcode 12.4 and before it compile without error but since newer macOS version won't support older version of Xcode I have compatibility issue.

I did some testing and the error come from the compilation of expression_grammar.cpp with more research and testing I found that it come from expression_grammar_impl.hpp line 212 .

regex_replace_expr =
        lit(".replace")
        >> lit('(')
        >> quoted_ustring           [_a = _1]
        >> lit(',')
        >> quoted_ustring           [_b = _1]
        >> lit(')')          [_val = regex_replace(_r1,_a,_b)]

More precisely from this line of code

[_val = regex_replace(_r1,_a,_b)]

if I delete this little part the project compile without error but I don't know how it affect the rest of the Mapnik functionalities.

In file included from /Users/alexandre.chau/Documents/Mapnik-iOS-xcode13/mapnik-ios-sdk/mapnik/mapnik-harfbuzz/mapnik/src/expression_grammar.cpp:25:
/Users/alexandre.chau/Documents/Mapnik-iOS-xcode13/mapnik-ios-sdk/mapnik/mapnik-harfbuzz/mapnik/include/mapnik/expression_grammar_impl.hpp:212:51: note: in instantiation of template class 'boost::phoenix::actor<boost::proto::exprns_::basic_expr<boost::phoenix::detail::tag::function_eval, boost::proto::argsns_::list4<boost::proto::exprns_::basic_expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<mapnik::regex_replace_impl>, 0>, boost::phoenix::actor<boost::spirit::attribute<1>>, boost::phoenix::actor<boost::spirit::local_variable<0>>, boost::phoenix::actor<boost::spirit::local_variable<1>>>, 4>>' requested here
        >> lit(')')          [_val = regex_replace(_r1,_a,_b)]

The issue is pointing to boost template but I don't have enough knowledge to fix this.

The error might be due to stricter check by the apple clang compiler since on older version of Xcode it works.

Is there any fix that you would be able to provide for Xcode 12.5 and newer version ?