Skip to content

Building from source error Debian GNU/Linux 12 (bookworm) #290

@erwinwolff

Description

@erwinwolff

When I do pip install . -v on Debian 12 Bookworm I get this output.

 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
  reading manifest file 'packaging/mapnik.egg-info/SOURCES.txt'
  adding license file 'COPYING'
  adding license file 'AUTHORS.md'
  writing manifest file 'packaging/mapnik.egg-info/SOURCES.txt'
  running build_ext
  c++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/usr/include/python3.13 -c flagcheck.cpp -o flagcheck.o -std=c++17
  building 'mapnik._mapnik' extension
  c++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include -I/usr/include/python3.13 -c src/mapnik_building_symbolizer.cpp -o build/temp.linux-x86_64-cpython-313/src/mapnik_building_symbolizer.o -std=c++17 -fvisibility=hidden -g0 -I/usr/include -I/usr/include/mapnik/agg -I/usr/include/mapnik -I/usr/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libxml2 -I/usr/include/gdal -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 -DPROJ_VERSION=90101 -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 -DHAVE_LIBXML2 -std=c++14 -DU_USING_ICU_NAMESPACE=0 -g -O2 -ffile-prefix-map=/build/mapnik-hHPy2x/mapnik-3.1.0+ds=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g0 -fvisibility-inlines-hidden -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -O2
  In file included from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/attr.h:13,
                   from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/detail/class.h:12,
                   from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pybind11.h:12,
                   from src/mapnik_symbolizer.hpp:36,
                   from src/mapnik_building_symbolizer.cpp:29:
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/detail/common.h: In constructor ‘pybind11::detail::any_container<T>::any_container(std::vector<T>&&)’:
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/detail/common.h:1199:36: warning: declaration of ‘v’ shadows a member of ‘pybind11::detail::any_container<T>’ [-Wshadow]
   1199 |     any_container(std::vector<T> &&v) : v(std::move(v)) {}
        |                   ~~~~~~~~~~~~~~~~~^
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/detail/common.h:1174:20: note: shadowed declaration is here
   1174 |     std::vector<T> v;
        |                    ^
  In file included from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pytypes.h:13,
                   from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/detail/type_caster_base.h:12,
                   from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/cast.h:15,
                   from /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/attr.h:14:
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/buffer_info.h: In constructor ‘pybind11::buffer_info::buffer_info(void*, pybind11::ssize_t, const std::string&, pybind11::ssize_t, pybind11::detail::any_container<long int>, pybind11::detail::any_container<long int>, bool)’:
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/buffer_info.h:66:22: warning: declaration of ‘readonly’ shadows a member of ‘pybind11::buffer_info’ [-Wshadow]
     66 |                 bool readonly = false)
        |                 ~~~~~^~~~~~~~~~~~~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/buffer_info.h:56:10: note: shadowed declaration is here
     56 |     bool readonly = false;        // flag to indicate if the underlying storage may be written to
        |          ^~~~~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/buffer_info.h:63:25: warning: declaration of ‘ndim’ shadows a member of ‘pybind11::buffer_info’ [-Wshadow]
     63 |                 ssize_t ndim,
        |                 ~~~~~~~~^~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/buffer_info.h:52:13: note: shadowed declaration is here
     52 |     ssize_t ndim = 0;             // Number of dimensions
        |             ^~~~

 .... very long ....

   1296 |     ssize_t index;
        |             ^~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pytypes.h:1188:42: warning: declaration of ‘index’ shadows a member of ‘pybind11::detail::generic_iterator<pybind11::detail::iterator_policies::sequence_slow_readwrite>’ [-Wshadow]
   1188 |     generic_iterator(handle seq, ssize_t index) : Policy(seq, index) {}
        |                                  ~~~~~~~~^~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pytypes.h:1296:13: note: shadowed declaration is here
   1296 |     ssize_t index;
        |             ^~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pytypes.h:1188:42: warning: declaration of ‘index’ shadows a member of ‘pybind11::detail::generic_iterator<pybind11::detail::iterator_policies::sequence_slow_readwrite>’ [-Wshadow]
   1188 |     generic_iterator(handle seq, ssize_t index) : Policy(seq, index) {}
        |                                  ~~~~~~~~^~~~~
  /tmp/pip-build-env-u6cdjxq5/overlay/lib/python3.13/site-packages/pybind11/include/pybind11/pytypes.h:1296:13: note: shadowed declaration is here
   1296 |     ssize_t index;
        |             ^~~~~
  error: command '/usr/bin/c++' failed with exit code 1
  error: subprocess-exited-with-error

  × Building wheel for mapnik (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions