mapbox / mapnik-vector-tile

Mapnik implemention of Mapbox Vector Tile specification
BSD 3-Clause "New" or "Revised" License
553 stars 117 forks source link

Make error - mapnik::util::file no member named is_open #210

Closed Synesso closed 6 years ago

Synesso commented 8 years ago

Following the readme instructions:

$ brew info mapnik
mapnik: stable 3.0.9 (bottled), HEAD
Toolkit for developing mapping applications
http://www.mapnik.org/
/usr/local/Cellar/mapnik/3.0.9_1 (484 files, 52.1M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/mapnik.rb
==> Dependencies
Build: pkg-config ✔
Required: freetype ✔, harfbuzz ✔, libpng ✔, libtiff ✔, proj ✔, icu4c ✔, jpeg ✔, webp ✔, boost ✔
Optional: gdal ✔, postgresql ✔, cairo ✔
==> Options
--with-cairo
    Build with cairo support
--with-gdal
    Build with gdal support
--with-postgresql
    Build with postgresql support
--HEAD
    Install HEAD version
$ make
git clone https://github.com/mapnik/clipper.git -b r496-mapnik ./deps/clipper && cd ./deps/clipper && git checkout ac8d6bf2517f46c05647b5c19cac113fb180ffb4 && ./cpp/fix_members.sh
Cloning into './deps/clipper'...
remote: Counting objects: 353, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 353 (delta 0), reused 0 (delta 0), pack-reused 349
Receiving objects: 100% (353/353), 1.92 MiB | 958.00 KiB/s, done.
Resolving deltas: 100% (180/180), done.
Checking connectivity... done.
Note: checking out 'ac8d6bf2517f46c05647b5c19cac113fb180ffb4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ac8d6bf... An update to the way that intersection points are found, hopefully fixing a small bug
git clone https://github.com/mapbox/protozero.git ./deps/protozero && cd ./deps/protozero && git checkout v1.3.0
Cloning into './deps/protozero'...
remote: Counting objects: 2992, done.
remote: Total 2992 (delta 0), reused 0 (delta 0), pack-reused 2992
Receiving objects: 100% (2992/2992), 1.42 MiB | 594.00 KiB/s, done.
Resolving deltas: 100% (2100/2100), done.
Checking connectivity... done.
Note: checking out 'v1.3.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ad3ca5b... Release version 1.3.0.
deps/gyp/gyp gyp/build.gyp --depth=. -DMAPNIK_PLUGINDIR=\"/usr/local/lib/mapnik/input\" -Goutput_dir=. --generator-output=./build -f make
  ACTION gyp_build_gyp_make_vector_tile_target_run_protoc Release/obj/gen/vector_tile.pb.cc
  TOUCH Release/obj.target/gyp/make_vector_tile.stamp
  CXX(target) Release/obj.target/vector_tile/gen/vector_tile.pb.o
  LIBTOOL-STATIC Release/libvector_tile.a
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_compression.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_datasource_pbf.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_featureset_pbf.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_geometry_decoder.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_geometry_encoder_pbf.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_layer.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_processor.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_projection.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_raster_clipper.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/src/vector_tile_tile.o
  CXX(target) Release/obj.target/mapnik_vector_tile_impl/deps/clipper/cpp/clipper.o
  LIBTOOL-STATIC Release/libmapnik_vector_tile_impl.a
  CXX(target) Release/obj.target/tests/test/clipper_test.o
  CXX(target) Release/obj.target/tests/test/geometry_visual_test.o
In file included from ../test/geometry_visual_test.cpp:12:
In file included from /usr/local/include/mapnik/json/geometry_parser.hpp:29:
In file included from /usr/local/include/mapnik/json/geometry_grammar.hpp:29:
In file included from /usr/local/include/mapnik/json/generic_json.hpp:32:
In file included from /usr/local/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi.hpp:30:
In file included from /usr/local/include/boost/spirit/home/qi/stream.hpp:15:
In file included from /usr/local/include/boost/spirit/home/qi/stream/stream.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14:
In file included from /usr/local/include/boost/iostreams/stream.hpp:21:
In file included from /usr/local/include/boost/iostreams/stream_buffer.hpp:22:
In file included from /usr/local/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:31:
In file included from /usr/local/include/boost/iostreams/detail/push.hpp:24:
In file included from /usr/local/include/boost/iostreams/detail/resolve.hpp:26:
In file included from /usr/local/include/boost/iostreams/detail/is_dereferenceable.hpp:12:
/usr/local/include/boost/type_traits/detail/bool_trait_def.hpp:18:10: warning: NOTE: Use of this header (bool_trait_def.hpp) is deprecated [-W#pragma-messages]
# pragma message("NOTE: Use of this header (bool_trait_def.hpp) is deprecated")
         ^
In file included from ../test/geometry_visual_test.cpp:12:
In file included from /usr/local/include/mapnik/json/geometry_parser.hpp:29:
In file included from /usr/local/include/mapnik/json/geometry_grammar.hpp:29:
In file included from /usr/local/include/mapnik/json/generic_json.hpp:32:
In file included from /usr/local/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi.hpp:30:
In file included from /usr/local/include/boost/spirit/home/qi/stream.hpp:15:
In file included from /usr/local/include/boost/spirit/home/qi/stream/stream.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14:
In file included from /usr/local/include/boost/iostreams/stream.hpp:21:
In file included from /usr/local/include/boost/iostreams/stream_buffer.hpp:22:
In file included from /usr/local/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:31:
In file included from /usr/local/include/boost/iostreams/detail/push.hpp:24:
In file included from /usr/local/include/boost/iostreams/detail/resolve.hpp:26:
In file included from /usr/local/include/boost/iostreams/detail/is_dereferenceable.hpp:12:
In file included from /usr/local/include/boost/type_traits/detail/bool_trait_def.hpp:21:
/usr/local/include/boost/type_traits/detail/template_arity_spec.hpp:13:10: warning: NOTE: Use of this header (template_arity_spec.hpp) is deprecated [-W#pragma-messages]
# pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")
         ^
In file included from ../test/geometry_visual_test.cpp:12:
In file included from /usr/local/include/mapnik/json/geometry_parser.hpp:29:
In file included from /usr/local/include/mapnik/json/geometry_grammar.hpp:29:
In file included from /usr/local/include/mapnik/json/generic_json.hpp:32:
In file included from /usr/local/include/boost/spirit/include/qi.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi.hpp:30:
In file included from /usr/local/include/boost/spirit/home/qi/stream.hpp:15:
In file included from /usr/local/include/boost/spirit/home/qi/stream/stream.hpp:16:
In file included from /usr/local/include/boost/spirit/home/qi/stream/detail/iterator_source.hpp:14:
In file included from /usr/local/include/boost/iostreams/stream.hpp:21:
In file included from /usr/local/include/boost/iostreams/stream_buffer.hpp:22:
In file included from /usr/local/include/boost/iostreams/detail/streambuf/indirect_streambuf.hpp:31:
In file included from /usr/local/include/boost/iostreams/detail/push.hpp:24:
In file included from /usr/local/include/boost/iostreams/detail/resolve.hpp:26:
In file included from /usr/local/include/boost/iostreams/detail/is_dereferenceable.hpp:13:
/usr/local/include/boost/type_traits/detail/template_arity_spec.hpp:13:10: warning: NOTE: Use of this header (template_arity_spec.hpp) is deprecated [-W#pragma-messages]
# pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")
         ^
../test/geometry_visual_test.cpp:153:20: error: no member named 'is_open' in 'mapnik::util::file'
        if (!input.is_open())
             ~~~~~ ^
3 warnings and 1 error generated.
make[1]: *** [Release/obj.target/tests/test/geometry_visual_test.o] Error 1
make: *** [libvtile] Error 2
Synesso commented 8 years ago

Additionally, when attempting to compile the example:

$ make
make: *** No rule to make target `../../src/vector_tile.pb.cc', needed by `tileinfo'.  Stop.
flippmoke commented 8 years ago

@Synesso you need a newer version of mapnik, I am updating the README right now and will look into how we can update the brew install here soon.

pnorman commented 8 years ago

@Synesso you need a newer version of mapnik, I am updating the README right now and will look into how we can update the brew install here soon

We should also make sure to build with all supported versions of Mapnik in travis CI.

Synesso commented 8 years ago

Thank you. I have successfully built against mapnik HEAD. However, (cd examples/c++ && make) still fails.

wandergis commented 8 years ago

I also catch this problem,and i comment the error code with //

Synesso commented 8 years ago

Apologies for hijacking this ticket, but I'm still trying to compile the example and can't find a support channel. I've requested help via stackoverflow & hope someone can assist. http://stackoverflow.com/questions/37106013/linking-required-header-file-during-make

springmeyer commented 6 years ago

readme now has updated build instructions: https://github.com/mapbox/mapnik-vector-tile#building-from-source. If anyone is still having issues please re-open a new issue.