mapbox / mapnik-vector-tile

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

Cannot install on Ubuntu 16.04 #215

Closed jareyes closed 6 years ago

jareyes commented 8 years ago

It looks like libprotobuf7 mentioned in the Ubuntu installation instructions is no more. On Xenial Xerus:

$ sudo apt-get install -y libprotobuf7 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libprotobuf7

So I built protobuf from source.

$ protoc --version
libprotoc 3.0.0

But then when I try to install mapnik-vector-tile (with Mapnik version 3.0.12, also built from source):

deps/gyp/gyp gyp/build.gyp --depth=. -DMAPNIK_PLUGINDIR=\"/usr/local/lib/mapnik/input\" -Goutput_dir=. --generator-output=./build -f make
make[1]: Entering directory '/home/joshua/src/mapnik-vector-tile/build'
  ACTION gyp_build_gyp_make_vector_tile_target_run_protoc Release/obj/gen/vector_tile.pb.cc
[libprotobuf WARNING google/protobuf/compiler/parser.cc:547] No syntax specified for the proto file: vector_tile.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
  TOUCH Release/obj.target/gyp/make_vector_tile.stamp
  CXX(target) Release/obj.target/vector_tile/gen/vector_tile.pb.o
In file included from Release/obj/gen/vector_tile.pb.cc:5:
./Release/obj/gen/vector_tile.pb.h:12:2: error: This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
 ^
./Release/obj/gen/vector_tile.pb.h:13:2: error: incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers.  Please update
 ^
./Release/obj/gen/vector_tile.pb.h:14:2: error: your headers.
#error your headers.

I'd appreciate any hints.

jareyes commented 8 years ago

I didn't realize that Protocol Buffer 3.0 wasn't the latest stable release. Dropping back to libprotoc 2.6.1 did the trick.

springmeyer commented 6 years ago

error This file was generated by a newer version of protoc which is

This indicates you might have had both libprotobuf 3.0 and 2.6 on your system. Either should work with mapnik-vector-tile.