python-mapnik icon indicating copy to clipboard operation
python-mapnik copied to clipboard

Master branch missing mapnik/value

Open shawmat opened this issue 9 years ago • 13 comments

The mapnik/value directory is missing in the ZIP download I did from Git earlier today. The expected contents are required by several source files listed below. Result is failed builds.

Search "<mapnik/value/" (9 hits in 9 files) ..\projects\mapnik\python-mapnik-master\src\mapnik_style.cpp (1 hit) Line 33: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_parameters.cpp (1 hit) Line 36: #include <mapnik/value/types.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_symbolizer.cpp (1 hit) Line 43: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_svg.hpp (1 hit) Line 28: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_envelope.cpp (1 hit) Line 34: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\python_grid_utils.cpp (1 hit) Line 39: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_python.cpp (1 hit) Line 103: #include <mapnik/value/error.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_datasource_cache.cpp (1 hit) Line 31: #include <mapnik/value/types.hpp> ..\projects\mapnik\python-mapnik-master\src\mapnik_feature.cpp (1 hit) Line 37: #include <mapnik/value/types.hpp>

shawmat avatar Nov 30 '16 11:11 shawmat

The mapnik/value directory is not missing. It's part of the main dependency - Mapnik itself ( https://github.com/mapnik/mapnik/tree/master/include/mapnik/value) - which is apparently not installed in a directory visible to the build machinery of python-mapnik.

talaj avatar Nov 30 '16 11:11 talaj

Hi talaj

I'm not sure how to proceed. I've downloaded the three files manually and tried putting them in various places the build should be able to see. But no success. What would you do?

shawmat avatar Nov 30 '16 12:11 shawmat

Hi @shawmat, it's not about downloading these files manually. Before building python-mapnik, you must install Mapnik.

talaj avatar Nov 30 '16 12:11 talaj

It looks like some files were updated a couple weeks ago to match the current master Mapnik, these changes broke compatibility with the current 'stable' version the website tells you to install which is Mapnik v3.0.12.

You should be able to fix this by checking out a previous version of python-mapnik like: git clone https://github.com/mapnik/python-mapnik.git git checkout ea5fd11350

This worked for me.

x10Corey avatar Dec 03 '16 20:12 x10Corey

Hi

After doing this git clone https://github.com/mapnik/python-mapnik.git git checkout ea5fd11

I am stuck here. Any help ?

/usr/local/include/boost/python/detail/caller.hpp:240:19: required from 'static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<4u>::impl<F, Policies, Sig>::signature() [with F = std::shared_ptrmapnik::Featureset ()(const mapnik::Map&, int, double, double); Policies = boost::python::default_call_policies; Sig = boost::mpl::vector5<std::shared_ptrmapnik::Featureset, const mapnik::Map&, int, double, double>]' /usr/local/include/boost/python/object/py_function.hpp:48:35: required from 'boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<std::shared_ptrmapnik::Featureset ()(const mapnik::Map&, int, double, double), boost::python::default_call_policies, boost::mpl::vector5<std::shared_ptrmapnik::Featureset, const mapnik::Map&, int, double, double> >]' src/mapnik_map.cpp:538:1: required from here /usr/local/include/boost/python/type_id.hpp:84:9: error: invalid use of incomplete type 'struct mapnik::Featureset' ); ^ In file included from src/mapnik_map.cpp:37:0: /usr/local/include/mapnik/map.hpp:51:8: error: forward declaration of 'struct mapnik::Featureset' struct Featureset; ^ error: command 'c++' failed with exit status 1

Regards, Prasanna K Ram

prkothan avatar Jan 16 '17 12:01 prkothan

I have updated boost to 1.63 in my system and python-mapnik would no longer compile. As I use mapnik branch 3.0.x then I am stuck at python-mapnik git ea5fd11. Is there any chance for fix to that code for new boost version?

x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -fabi-version=0 -fPIC -I/usr/include/python2.7 -c src/mapnik_logger.cpp -o /tmp/portage/sci-geosciences/python-mapnik-0.1.9999/work/python-mapnik-0.1.9999-python2_7/temp.linux-x86_64-2.7/src/mapnik_logger.o -I/usr/include -I/usr/include/mapnik/agg -I/usr/include/mapnik -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/postgresql-9.6 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -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++11 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -march=native -pipe -O3 -ftree-vectorize -findirect-inlining x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -fabi-version=0 -fPIC -I/usr/include/python2.7 -c src/mapnik_map.cpp -o /tmp/portage/sci-geosciences/python-mapnik-0.1.9999/work/python-mapnik-0.1.9999-python2_7/temp.linux-x86_64-2.7/src/mapnik_map.o -I/usr/include -I/usr/include/mapnik/agg -I/usr/include/mapnik -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/gdal -I/usr/include/postgresql-9.6 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -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++11 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -pthread -ftemplate-depth-300 -Wsign-compare -Wshadow -march=native -pipe -O3 -ftree-vectorize -findirect-inlining In file included from /usr/include/boost/python/instance_holder.hpp:11:0, from /usr/include/boost/python/object/pointer_holder.hpp:14, from /usr/include/boost/python/to_python_indirect.hpp:10, from /usr/include/boost/python/converter/arg_to_python.hpp:10, from /usr/include/boost/python/call.hpp:15, from /usr/include/boost/python/object_core.hpp:14, from /usr/include/boost/python/args.hpp:25, from /usr/include/boost/python.hpp:11, from src/mapnik_map.cpp:28: /usr/include/boost/python/type_id.hpp: In instantiation of ‘boost::python::type_info boost::python::type_id() [with T = const volatile mapnik::Featureset&]’: /usr/include/boost/python/converter/registered.hpp:102:42: required from ‘const boost::python::converter::registration& boost::python::converter::detail::registry_lookup2(T& ()()) [with T = const volatile mapnik::Featureset]’ /usr/include/boost/python/converter/registered.hpp:109:30: required from ‘const boost::python::converter::registration& boost::python::converter::detail::registry_lookup1(boost::type<Target>) [with T = const volatile mapnik::Featureset&]’ /usr/include/boost/python/converter/registered.hpp:120:80: required from ‘const boost::python::converter::registration& boost::python::converter::detail::registered_base<const volatile mapnik::Featureset&>::converters’ /usr/include/boost/python/to_python_value.hpp:127:152: required from ‘const PyTypeObject boost::python::detail::shared_ptr_to_python_value<T>::get_pytype(boost::type<const std::shared_ptr<_Tp1>&>) const [with U = mapnik::Featureset; T = const std::shared_ptrmapnik::Featureset&; PyTypeObject = _typeobject]’ /usr/include/boost/python/to_python_value.hpp:111:64: required from ‘const PyTypeObject boost::python::detail::shared_ptr_to_python_value<T>::get_pytype() const [with T = const std::shared_ptrmapnik::Featureset&; PyTypeObject = _typeobject]’ /usr/include/boost/python/detail/caller.hpp:102:109: required from ‘static const PyTypeObject* boost::python::detail::converter_target_type<ResultConverter>::get_pytype() [with ResultConverter = boost::python::to_python_value<const std::shared_ptrmapnik::Featureset&>; PyTypeObject = _typeobject]’ /usr/include/boost/python/detail/caller.hpp:240:19: required from ‘static boost::python::detail::py_func_sig_info boost::python::detail::caller_arity<4u>::impl<F, Policies, Sig>::signature() [with F = std::shared_ptrmapnik::Featureset ()(const mapnik::Map&, int, double, double); Policies = boost::python::default_call_policies; Sig = boost::mpl::vector5<std::shared_ptrmapnik::Featureset, const mapnik::Map&, int, double, double>]’ /usr/include/boost/python/object/py_function.hpp:48:35: required from ‘boost::python::detail::py_func_sig_info boost::python::objects::caller_py_function_impl<Caller>::signature() const [with Caller = boost::python::detail::caller<std::shared_ptrmapnik::Featureset ()(const mapnik::Map&, int, double, double), boost::python::default_call_policies, boost::mpl::vector5<std::shared_ptrmapnik::Featureset, const mapnik::Map&, int, double, double> >]’ src/mapnik_map.cpp:538:1: required from here /usr/include/boost/python/type_id.hpp:84:9: error: invalid use of incomplete type ‘struct mapnik::Featureset’ ); ^ In file included from src/mapnik_map.cpp:37:0: /usr/include/mapnik/map.hpp:51:8: note: forward declaration of ‘struct mapnik::Featureset’ struct Featureset; ^ error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1

wmyrda avatar Jan 23 '17 17:01 wmyrda

+1

I am also seeing both these issues, both with master of mapnik/python-mapnik and with [email protected]/python-mapnik@ea5fd1135 on fresh install of archlinux

kotfic avatar Jan 24 '17 21:01 kotfic

@talaj , how does one make the Mapnik files visible to python-mapnik? Are there environment variables that need be set? The readme somewhat vaguely states:

Set any compiler or linking environment variables as necessary so that your installation of mapnik is found.

But how? This despite that I can make and make install Mapnik itself:

$ mapnik-config -v
3.1.0

clebio avatar Apr 08 '17 13:04 clebio

@clebio Only mapnik-config has to be available in PATH. setup.py fetches needed information through the mapnik-config like here.

talaj avatar Apr 08 '17 15:04 talaj

That definitely doesn't work. mapnik-config -v works in my shell, but python-mapnik's python setup.py develop fails errry time.

clebio avatar Apr 08 '17 15:04 clebio

$ python setup.py develop
running develop
running egg_info
writing mapnik.egg-info/PKG-INFO
writing top-level names to mapnik.egg-info/top_level.txt
writing dependency_links to mapnik.egg-info/dependency_links.txt
reading manifest file 'mapnik.egg-info/SOURCES.txt'
writing manifest file 'mapnik.egg-info/SOURCES.txt'
running build_ext
building 'mapnik._mapnik' extension
c++ -fno-strict-aliasing -fno-common -dynamic -O2 -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/mapnik_color.cpp -o build/temp.macosx-10.12-x86_64-2.7/src/mapnik_color.o -I/usr/local/include -I/usr/local/include/mapnik/agg -I/usr/local/include/mapnik -I/usr/local/Cellar/postgresql/9.6.2/include -I/usr/local/Cellar/gdal/1.11.5_2/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/opt/icu4c/include -I/usr/local/include -I/usr/include -I/usr/local/Cellar/cairo/1.14.8/include/cairo -I/usr/local/Cellar/glib/2.52.0/include/glib-2.0 -I/usr/local/Cellar/glib/2.52.0/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.40/include -I/usr/local/Cellar/pixman/0.34.0/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.12.1_2/include -I/usr/local/Cellar/libpng/1.6.29/include/libpng16 -DMAPNIK_MEMORY_MAPPED_FILE -DMAPNIK_HAS_DLCFN -DBIGINT -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_WEBP -DHAVE_TIFF -DDARWIN -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++11 -stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hidden -Wall -ftemplate-depth-300 -Wsign-compare -Wshadow -O3 -mmacosx-version-min=10.11 -Wno-parentheses-equality
...
^
/usr/local/include/mapnik/util/variant.hpp:42:15: note: in instantiation of function template specialization 'mapbox::util::variant<mapnik::geometry::geometry_empty, mapnik::geometry::point<double>,
      mapnik::geometry::line_string<double>, mapnik::geometry::polygon<double, rings_container>, mapnik::geometry::multi_point<double>, mapnik::geometry::multi_line_string<double>,
      mapnik::geometry::multi_polygon<double>, mapnik::geometry::geometry_collection<double> >::visit<mapnik::geometry::detail::geometry_is_valid, mapnik::geometry::geometry<double>, bool>' requested here
    return V::visit(v, std::forward<F>(f));
              ^
/usr/local/include/mapnik/geometry/is_valid.hpp:250:18: note: in instantiation of function template specialization 'mapnik::util::apply_visitor<mapnik::geometry::detail::geometry_is_valid,
      mapnik::geometry::geometry<double> >' requested here
    return util::apply_visitor(detail::geometry_is_valid(), geom);
                 ^
src/mapnik_geometry.cpp:152:30: note: in instantiation of function template specialization 'mapnik::geometry::is_valid<double>' requested here
    return mapnik::geometry::is_valid(geom);
                             ^
In file included from src/mapnik_geometry.cpp:40:
In file included from /usr/local/include/mapnik/geometry/is_valid.hpp:32:
/usr/local/include/mapnik/geometry/boost_adapters.hpp:59:47: error: no type named 'value_type' in 'mapnik::geometry::polygon<double, rings_container>'
    using value_type = typename polygon_type::value_type;
                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'c++' failed with exit status 1

clebio avatar Apr 08 '17 16:04 clebio

@clebio This is different problem. I'm also not able to compile latest mapnik with latest python-mapnik because of some breaking changes in mapnik.

What is working for me is combination of latest release of mapnik v3.0.13 with v3.0.x branch of python-mapnik.

talaj avatar Apr 08 '17 20:04 talaj

Ok, thanks for the clarification.

clebio avatar Apr 08 '17 22:04 clebio