Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapnik4.0.4 build error #285

Open
hexiaobai2012 opened this issue Dec 27, 2024 · 0 comments
Open

mapnik4.0.4 build error #285

hexiaobai2012 opened this issue Dec 27, 2024 · 0 comments

Comments

@hexiaobai2012
Copy link

hexiaobai2012 commented Dec 27, 2024

Hello,
I got an error during the pip install phase, Mapnik version: 4.0.4.

log:
src/mapnik_gamma_method.cpp: In function ‘void export_gamma_method()’:
src/mapnik_gamma_method.cpp:39:33: error: ‘GAMMA_POWER’ is not a member of ‘mapnik’; did you mean ‘mapnik::gamma_method_enum::GAMMA_POWER’?
39 | .value("POWER", mapnik::GAMMA_POWER)
| ^~~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:31:
/usr/local/include/mapnik/symbolizer_enumerations.hpp:167:5: note: ‘mapnik::gamma_method_enum::GAMMA_POWER’ declared here
167 | GAMMA_POWER, // agg::gamma_power
| ^~~~~~~~~~~
src/mapnik_gamma_method.cpp:40:33: error: ‘GAMMA_LINEAR’ is not a member of ‘mapnik’; did you mean ‘mapnik::gamma_method_enum::GAMMA_LINEAR’?
40 | .value("LINEAR",mapnik::GAMMA_LINEAR)
| ^~~~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:31:
/usr/local/include/mapnik/symbolizer_enumerations.hpp:168:5: note: ‘mapnik::gamma_method_enum::GAMMA_LINEAR’ declared here
168 | GAMMA_LINEAR, // agg::gamma_linear
| ^~~~~~~~~~~~
src/mapnik_gamma_method.cpp:41:32: error: ‘GAMMA_NONE’ is not a member of ‘mapnik’; did you mean ‘mapnik::gamma_method_enum::GAMMA_NONE’?
41 | .value("NONE", mapnik::GAMMA_NONE)
| ^~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:31:
/usr/local/include/mapnik/symbolizer_enumerations.hpp:169:5: note: ‘mapnik::gamma_method_enum::GAMMA_NONE’ declared here
169 | GAMMA_NONE, // agg::gamma_none
| ^~~~~~~~~~
src/mapnik_gamma_method.cpp:42:37: error: ‘GAMMA_THRESHOLD’ is not a member of ‘mapnik’; did you mean ‘mapnik::gamma_method_enum::GAMMA_THRESHOLD’?
42 | .value("THRESHOLD", mapnik::GAMMA_THRESHOLD)
| ^~~~~~~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:31:
/usr/local/include/mapnik/symbolizer_enumerations.hpp:170:5: note: ‘mapnik::gamma_method_enum::GAMMA_THRESHOLD’ declared here
170 | GAMMA_THRESHOLD, // agg::gamma_threshold
| ^~~~~~~~~~~~~~~
src/mapnik_gamma_method.cpp:43:36: error: ‘GAMMA_MULTIPLY’ is not a member of ‘mapnik’; did you mean ‘mapnik::gamma_method_enum::GAMMA_MULTIPLY’?
43 | .value("MULTIPLY", mapnik::GAMMA_MULTIPLY)
| ^~~~~~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:31:
/usr/local/include/mapnik/symbolizer_enumerations.hpp:171:5: note: ‘mapnik::gamma_method_enum::GAMMA_MULTIPLY’ declared here
171 | GAMMA_MULTIPLY, // agg::gamma_multiply
| ^~~~~~~~~~~~~~
In file included from src/mapnik_gamma_method.cpp:32:
src/mapnik_enumeration.hpp: In instantiation of ‘void mapnik::enumeration_::init() [with EnumWrapper = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>]’:
src/mapnik_enumeration.hpp:51:9: required from ‘mapnik::enumeration_::enumeration_(const char*) [with EnumWrapper = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>]’
src/mapnik_gamma_method.cpp:38:64: required from here
src/mapnik_enumeration.hpp:80:47: error: ‘MAX’ is not a member of ‘mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>’
80 | for (unsigned i = 0; i < EnumWrapper::MAX; ++i)
| ^~~
src/mapnik_enumeration.hpp:83:54: error: ‘get_string’ is not a member of ‘mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>’
83 | base_type::value( EnumWrapper::get_string( i ), native_type( i ) );
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
src/mapnik_enumeration.hpp: In instantiation of ‘static PyObject* mapnik::enumeration_::converter::convert(const EnumWrapper&) [with EnumWrapper = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>; PyObject = object]’:
/usr/local/include/boost/python/converter/as_to_python_function.hpp:27:61: required from ‘static PyObject* boost::python::converter::as_to_python_function<T, ToPython>::convert(const void*) [with T = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>; ToPython = mapnik::enumeration
<mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup> >::converter; PyObject = object]’
/usr/local/include/boost/python/to_python_converter.hpp:83:9: required from ‘boost::python::to_python_converter<T, Conversion, has_get_pytype>::to_python_converter() [with T = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>; Conversion = mapnik::enumeration
<mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup> >::converter; bool has_get_pytype = false]’
src/mapnik_enumeration.hpp:78:24: required from ‘void mapnik::enumeration_::init() [with EnumWrapper = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>]’
src/mapnik_enumeration.hpp:51:9: required from ‘mapnik::enumeration_::enumeration_(const char*) [with EnumWrapper = mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>]’
src/mapnik_gamma_method.cpp:38:64: required from here
src/mapnik_enumeration.hpp:71:20: error: invalid ‘static_cast’ from type ‘const mapnik::enumeration<mapnik::gamma_method_enum, mapnik::gamma_method_e_to_string, mapnik::gamma_method_e_from_string, mapnik::gamma_method_e_lookup>’ to type ‘long int’
71 | , static_cast( v ));
| ^~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/c++' failed with exit code 1

MAX is not a member of mapnik::enumeration.
get_string is not a member of mapnik::enumeration.
Invalid static_cast from type const mapnik::enumeration to type long int.

what should I do, please advise.

@hexiaobai2012 hexiaobai2012 changed the title subprocess-exited-with-error mapnik4.0.4 build error Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant