python-mapnik
python-mapnik copied to clipboard
Mapnik4.0.0 build erro
I am trying to build the Python bindings for Mapnik 4.0.0 but encountered some issues. Here are the details: NAME="Debian GNU/Linux"/VERSION_ID="11"/Mapnik version: 4.0.0/Python 3.9.2/gcc (Debian 10.2.1-6) 10.2.1 20210110
log:
root@62597b7940d4:/home/python-mapnik# python setup.py install
/usr/lib/python3/dist-packages/setuptools/dist.py:461: UserWarning: Normalizing '4.0.0.dev' to '4.0.0.dev0'
warnings.warn(tmpl.format(**locals()))
running install
running bdist_egg
running egg_info
creating packaging/mapnik.egg-info
writing packaging/mapnik.egg-info/PKG-INFO
writing dependency_links to packaging/mapnik.egg-info/dependency_links.txt
writing top-level names to packaging/mapnik.egg-info/top_level.txt
writing manifest file 'packaging/mapnik.egg-info/SOURCES.txt'
reading manifest file 'packaging/mapnik.egg-info/SOURCES.txt'
writing manifest file 'packaging/mapnik.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/mapnik
copying packaging/mapnik/mapnik_settings.py -> build/lib.linux-x86_64-3.9/mapnik
copying packaging/mapnik/paths.py -> build/lib.linux-x86_64-3.9/mapnik
copying packaging/mapnik/init.py -> build/lib.linux-x86_64-3.9/mapnik
creating build/lib.linux-x86_64-3.9/mapnik/printing
copying packaging/mapnik/printing/conversions.py -> build/lib.linux-x86_64-3.9/mapnik/printing
copying packaging/mapnik/printing/formats.py -> build/lib.linux-x86_64-3.9/mapnik/printing
copying packaging/mapnik/printing/scales.py -> build/lib.linux-x86_64-3.9/mapnik/printing
copying packaging/mapnik/printing/init.py -> build/lib.linux-x86_64-3.9/mapnik/printing
running build_ext
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c flagcheck.cpp -o flagcheck.o -std=c++17
building 'mapnik._mapnik' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/src
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/pybind11/include -I/usr/include/python3.9 -c src/mapnik_building_symbolizer.cpp -o build/temp.linux-x86_64-3.9/src/mapnik_building_symbolizer.o -std=c++17 -fvisibility=hidden -g0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=90400 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -std=c++17 -DU_USING_ICU_NAMESPACE=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/pybind11/include -I/usr/include/python3.9 -c src/mapnik_color.cpp -o build/temp.linux-x86_64-3.9/src/mapnik_color.o -std=c++17 -fvisibility=hidden -g0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=90400 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -std=c++17 -DU_USING_ICU_NAMESPACE=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/pybind11/include -I/usr/include/python3.9 -c src/mapnik_composite_modes.cpp -o build/temp.linux-x86_64-3.9/src/mapnik_composite_modes.o -std=c++17 -fvisibility=hidden -g0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=90400 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -std=c++17 -DU_USING_ICU_NAMESPACE=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/pybind11/include -I/usr/include/python3.9 -c src/mapnik_coord.cpp -o build/temp.linux-x86_64-3.9/src/mapnik_coord.o -std=c++17 -fvisibility=hidden -g0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=90400 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -std=c++17 -DU_USING_ICU_NAMESPACE=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3
c++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/pybind11/include -I/usr/include/python3.9 -c src/mapnik_datasource.cpp -o build/temp.linux-x86_64-3.9/src/mapnik_datasource.o -std=c++17 -fvisibility=hidden -g0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik/deps -I/usr/local/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/postgresql -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ -DMAPNIK_PROJ_VERSION=90400 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -std=c++17 -DU_USING_ICU_NAMESPACE=0 -fvisibility-inlines-hidden -pthread -ftemplate-depth-300 -O3
In file included from /usr/local/include/mapnik/datasource.hpp:28,
from src/mapnik_datasource.cpp:26:
/usr/local/include/mapnik/params.hpp: In instantiation of ‘mapnik::value_holder::value_holder(T&&) [with T = long long int]’:
src/mapnik_value_converter.hpp:183:42: required from here
/usr/local/include/mapnik/params.hpp:58:49: error: no matching function for call to ‘mapbox::util::variant<mapnik::value_null, long int, double, std::__cxx11::basic_string<char, std::char_traits
| ^~~~~~~~~~~~
/usr/local/lib/python3.9/dist-packages/pybind11/include/pybind11/operators.h:163:1: note: in expansion of macro ‘PYBIND11_BINARY_OPERATOR’
163 | PYBIND11_BINARY_OPERATOR(eq, eq, operator==, l == r)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/mapnik_datasource.cpp:26:
/usr/local/include/mapnik/datasource.hpp:60:19: note: because the following virtual functions are pure within ‘mapnik::datasource’:
60 | class MAPNIK_DECL datasource : private util::noncopyable
| ^~~~~~~~~~
/usr/local/include/mapnik/datasource.hpp:88:26: note: ‘virtual mapnik::datasource::datasource_t mapnik::datasource::type() const’
88 | virtual datasource_t type() const = 0;
| ^~~~
/usr/local/include/mapnik/datasource.hpp:95:50: note: ‘virtual std::optionalmapnik::datasource_geometry_t mapnik::datasource::get_geometry_type() const’
95 | virtual std::optional<datasource_geometry_t> get_geometry_type() const = 0;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/mapnik/datasource.hpp:96:28: note: ‘virtual mapnik::featureset_ptr mapnik::datasource::features(const mapnik::query&) const’
96 | virtual featureset_ptr features(query const& q) const = 0;
| ^~~~~~~~
/usr/local/include/mapnik/datasource.hpp:97:28: note: ‘virtual mapnik::featureset_ptr mapnik::datasource::features_at_point(const coord2d&, double) const’
97 | virtual featureset_ptr features_at_point(coord2d const& pt, double tol = 0) const = 0;
| ^~~~~~~~~~~~~~~~~
/usr/local/include/mapnik/datasource.hpp:98:27: note: ‘virtual mapnik::box2d