mapbox / windows-builds

DEPRECATED! build scripts for mapnik dependencies, mapnik, node-mapnik, node, libosmiom, osmium-tool
38 stars 22 forks source link

mapnik compilation error using FASTBUILD=0 #76

Closed jc101 closed 8 years ago

jc101 commented 8 years ago

I'm attempting to recompile mapnik with the latest codebase - the last time I did it was in October 2015 without many problems.

I'm finding now (starting with a clean slate) that I can compile all the dependencies but Mapnik itself is failing with the common errors about overriding virtual functions. Eg

d:\documents\github\windows-builds\packages\mapnik-master\plugins\input\gdal\gdal_featureset.hpp(71): error C2694: 'gdal_featureset::~gdal_features
       et(void) noexcept(<expr>)': overriding virtual function has less restrictive exception specification than base class virtual member function 'mapnik:

and

D:\Documents\GitHub\windows-builds\packages\mapnik-master\mapnik-gyp\mapnik-sdk\include\boost/python/object/value_holder.hpp(63): error C2694: 'boost::python::objects::value_holder<T>::~value_holder(void) noexcept(<expr>)': overriding virtual function has less restrictive exception specification base class virtual member function 'boost::python::instance_holder::~instance_holder(void)'

From what I've read this could be caused by compiler flags. Has anybody esle experienced this problem?

springmeyer commented 8 years ago

This should be fixed by updating your mapnik to latest master/pulling the variant submodule (https://github.com/mapnik/mapnik/commit/d59460861e78a219ba1fc6326b565fe05642282e). Sorry about the temporary breakage. Please create a new issue if you are still hitting this problem.

springmeyer commented 8 years ago

Hmm, still broken, maybe just hold off for a few hours: https://github.com/mapbox/variant/pull/87#issuecomment-178160406

lightmare commented 8 years ago

What does FASTBUILD=0 change? I see mapnik appveyor builds have FASTBUILD=1, is that why we're seeing different errors there?

springmeyer commented 8 years ago

FASTBUILD controls whether the mapnik dependencies are compiled freshly or no. So FASTBUILD=1 means (I think): "download pre-built versions of all mapnik deps and build mapnik from source against those". I presume variant gets updated no matter what, but @BergWerkGIS would need to confirm.

lightmare commented 8 years ago

Yes, variant gets pulled as git submodule, I just changed the url in tests to pull from my fork.

wilhelmberg commented 8 years ago

/cc @lightmare @springmeyer

Fresh build with latest master:

c:\mb\windows-builds-64\packages\mapnik-master\deps\mapbox/variant/variant.hpp(94):
     error C2541: 'delete': cannot delete objects that are not pointers 
(compiling source file ..\..\src\agg\process_group_symbolizer.cpp)

Same as on AppVeyor: https://ci.appveyor.com/project/Mapbox/mapnik/build/1.0.562#L604


So FASTBUILD=1 means (I think): "download pre-built versions of all mapnik deps and build mapnik from source against those".

exactly, https://github.com/mapbox/windows-builds/blob/9e6898060c0ba6e5804a5dcc978768a632a82cb1/scripts/build_mapnik.bat#L91-L96

Whereas FASTBUILD=0 also builds these before building mapnik:

    zlib
    libpng
    jpeg
    tiff
    icu
    python
    boost
    webp
    freetype
    proj4
    protobuf
    sparsehash
    osmpbf
    bzip2
    pixman
    cairo
    sqlite
    expat
    gdal
    libpq
    harfbuzz

I presume variant gets updated no matter what

y, https://github.com/mapnik/mapnik/blob/e76a1d9a8184da0d38c601190385faa70a0cc836/scripts/build-appveyor.bat#L32

wilhelmberg commented 8 years ago

@jc101 one possibility to get a build would be to go back to an earlier commit. %MAPNIKBRANCH% could be used for this.

e.g. https://github.com/mapnik/mapnik/commit/c786ff9edf8bb9cfd20aebe5bcdbd5a963f19e3d before the refactoring of https://github.com/mapbox/variant began. I just verified that this commit builds.

Either do it when calling settings.bat:

settings.bat "MAPNIKBRANCH=c786ff9edf8bb9cfd20aebe5bcdbd5a963f19e3d"

or if you've already called settings.bat:

SET MAPNIKBRANCH=c786ff9edf8bb9cfd20aebe5bcdbd5a963f19e3d

and then

scripts\build_mapnik.bat

Beware! this creates a new directory for mapnik (packages\mapnik-c786ff9edf8bb9cfd20aebe5bcdbd5a963f19e3d) and you might need an additional ~8GB disk space.

jc101 commented 8 years ago

Thanks for the suggestion; I did that and I was able to build the application.