Win32 full build issues
Here are the problem I encounter when building mapnik win32
Building steps
- Building Mapnik dependencies (VC++ 2010)
- following https://github.com/mapnik/mapnik-packaging/blob/master/windows/building_mapnik_dependencies.md
- with few modifications I posted in https://github.com/mapnik/mapnik-packaging/issues/67
- check mapnik master (hash 2c28219e4c79a93cb9c05c6f788a5fbe266b8a68) under C:\dev2 => directory mapnik is created
c:\dev2>
git clone https://github.com/mapnik/mapnik.git - open a new MS VC++ 2010 command prompt
- (Environment variables declared while building dependencies are then lost)
- change directory to /mapnik-packaging/windows
- execute build_mapnik.bat
Issues found
Here are the errors I had during the build. Unfortunately I could not find how to fix them. I don't post warnings, there are too many of them (macro redefinition, type conversion with data loss, ...) (I translated the error message back to English)
compile-c-c++ build\src\msvc-10.0\release\threading-multi\miniz_png.obj
miniz_png.cpp
c:\dev2\mapnik\include\mapnik/palette.hpp(34) : fatal error C1083: cannot open include file: 'mapnik/sparsehash/dense_hash_map' : No such file or directory
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\src\msvc-10.0\release\threading-multi\miniz_png.obj.rsp"
...failed compile-c-c++ build\src\msvc-10.0\release\threading-multi\miniz_png.obj...
.
compile-c-c++ build\src\msvc-10.0\release\threading-multi\image_util.obj
image_util.cpp
c:\dev2\mapnik\include\mapnik/palette.hpp(34) : fatal error C1083: cannot open include file: 'mapnik/sparsehash/dense_hash_map' : No such file or directory
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\src\msvc-10.0\release\threading-multi\image_util.obj.rsp"
...failed compile-c-c++ build\src\msvc-10.0\release\threading-multi\image_util.obj...
.
compile-c-c++ build\src\msvc-10.0\release\threading-multi\palette.obj
palette.cpp
c:\dev2\mapnik\include\mapnik/palette.hpp(34) : fatal error C1083: cannot open include file: 'mapnik/sparsehash/dense_hash_map' : No such file or directory
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\src\msvc-10.0\release\threading-multi\palette.obj.rsp"
...failed compile-c-c++ build\src\msvc-10.0\release\threading-multi\palette.obj...
.
compile-c-c++ build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_featureset.obj
shape_featureset.cpp
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(38) : error C2039: 'Featureset' : is not a member of 'mapnik'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(38) : error C2873: 'Featureset' : symbol cannot be used in a using-declaration using
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : error C2976: 'std::set' : too few template arguments
c:\dev2\boost-49-vc100\include\boost-1_49\boost/detail/container_fwd.hpp(141) : see declaration of 'std::set'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(68) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : error C2976: 'std::set' : too few template arguments
c:\dev2\boost-49-vc100\include\boost-1_49\boost/detail/container_fwd.hpp(141) : see declaration of 'std::set'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(60) : error C2371: 'shape_featureset<filterT>::shape_featureset' : redefinition ; different base type
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : see declaration of 'shape_featureset<filterT>::shape_featureset'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(46) : error C2504: 'Featureset' : base class undefined
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(168) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_in_box
]
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(46) : error C2504: 'Featureset' : base class undefined
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(169) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_at_point
]
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_featureset.obj.rsp"
...failed compile-c-c++ build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_featureset.obj...
.
compile-c-c++ build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_index_featureset.obj
shape_index_featureset.cpp
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2065: 'shp_index' : undeclared identifier‚
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(48) : during compile of member function 'shape_index_featureset<filterT>::shape_index_featureset(const filterT &,shape_io &,const std::set<_Kty> &,const std::string &,const std::string &,int)' of template class
with
[
filterT=mapnik::filter_in_box,
_Kty=std::string
]
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(177) : see reference to class template instantiation 'shape_index_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_in_box
]
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2275: 'filterT' : illegal use of this type as an expression
e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xmemory(165) : see declaration of 'filterT'
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2665: 'mapnik::query::query' : none of the 4 overloads could convert all the argument types
c:\dev2\mapnik\include\mapnik/query.hpp(55): can be 'mapnik::query::query(const mapnik::box2d<T> &,const mapnik::query::resolution_type &,double)'
with
[
T=double
]
while trying to match the argument list '(const mapnik::filter_in_box, shape_file::file_source_type, std::vector<_Ty>)'
with
[
_Ty=std::streampos
]
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2065: 'shp_index' : undeclared identifier‚
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(48) : during compile of member function 'shape_index_featureset<filterT>::shape_index_featureset(const filterT &,shape_io &,const std::set<_Kty> &,const std::string &,const std::string &,int)' of template class
with
[
filterT=mapnik::filter_at_point,
_Kty=std::string
]
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(178) : see reference to class template instantiation 'shape_index_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_at_point
]
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2275: 'filterT' : illegal use of this type as an expression
e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xmemory(165) : see declaration of 'filterT'
c:\dev2\mapnik\plugins\input\shape\shape_index_featureset.cpp(66) : error C2665: 'mapnik::query::query' : none of the 4 overloads could convert all the argument types
c:\dev2\mapnik\include\mapnik/query.hpp(55): can be 'mapnik::query::query(const mapnik::box2d<T> &,const mapnik::query::resolution_type &,double)'
with
[
T=double
]
while trying to match the argument list '(const mapnik::filter_at_point, shape_file::file_source_type, std::vector<_Ty>)'
with
[
_Ty=std::streampos
]
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_index_featureset.obj.rsp"
...failed compile-c-c++ build\utils\shapeindex\msvc-10.0\release\threading-multi\shape_index_featureset.obj...
.
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(38) : error C2039: 'Featureset' : is not a member of 'mapnik'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(38) : error C2873: 'Featureset' : symbol cannot be used in a using-declaration using
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : error C2976: 'std::set' : too few template arguments
c:\dev2\boost-49-vc100\include\boost-1_49\boost/detail/container_fwd.hpp(141) : see declaration of 'std::set'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(68) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : error C2976: 'std::set' : too few template arguments
c:\dev2\boost-49-vc100\include\boost-1_49\boost/detail/container_fwd.hpp(141) : see declaration of 'std::set'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(60) : error C2371: 'shape_featureset<filterT>::shape_featureset' : redefinition ; different base type
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(48) : see declaration of 'shape_featureset<filterT>::shape_featureset'
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(46) : error C2504: 'Featureset' : base class undefined
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(168) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_in_box
]
c:\dev2\mapnik\plugins\input\shape\shape_featureset.hpp(46) : error C2504: 'Featureset' : base class undefined
c:\dev2\mapnik\plugins\input\shape\shape_featureset.cpp(169) : see reference to class template instantiation 'shape_featureset<filterT>' being compiled
with
[
filterT=mapnik::filter_at_point
]
call "e:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"build\plugins\input\shape\msvc-10.0\release\threading-multi\shape_featureset.obj.rsp"
...failed compile-c-c++ build\plugins\input\shape\msvc-10.0\release\threading-multi\shape_featureset.obj...
. I can provide the full log if needed, but some error message are in French (my locale).
Thanks a lot for the report.
Sparsehash errors should be fixed by updating your mapnik-packaging repo to latest (to get: https://github.com/mapnik/mapnik-packaging/commit/f70a99675cfcb4c4aae43d51f6ce7b1e8d9f49ec)
Other compile errors should be fixed by updating to latest mapnik master (to get https://github.com/mapnik/mapnik/commit/ceb8ffcc6f73720d800b2a224968bfa234e6ca46 and https://github.com/mapnik/mapnik/commit/2aeb0da81337c5b93d880ccb50da2647468a1ca0)