Comments (7)
This is the same as #502 - Google appear to have broken protobuf. If you can install an earlier version of the protobuf library it may work.
Unfortunately I’m away from my development machine for a few weeks and unlikely to be able to address this though someone else may have a solution. But you could try uninstalling the version of protobuf that’s been installed, and then brew install protobuf@21
.
from tilemaker.
I tried the old version protobuf@21, but it seems that there are new issues
% make
Using Lua 5.1 (include path is -I/opt/homebrew/include/lua5.1, library path is -llua5.1)
protoc --proto_path=include --cpp_out=include include/osmformat.proto
make: protoc: No such file or directory
make: *** [include/osmformat.pb.cc] Error 1
from tilemaker.
Maybe it installs protoc under a different name - protoc21 or something. If you type proto into Terminal then press tab, what does it autocomplete with?
from tilemaker.
protoc
% protoc
protoc protoc-23.4.0
from tilemaker.
Running brew install protobuf@21
is keg only. This means it does not symlink into /opt/homebrew/include
so the compiler cannot locate the files. When you run make
the c++
command it runs is printed:
c++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v2.4.0 -o include/osmformat.pb.o -c include/osmformat.pb.cc -I/opt/homebrew/include -isystem ./include -I./src -I/opt/homebrew/include/lua5.1
Notice how it includes from /opt/homebrew/include
but the keg-only version of protobuf@21
specifically says (after installation):
For compilers to find protobuf@21 you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/protobuf@21/lib"
export CPPFLAGS="-I/opt/homebrew/opt/protobuf@21/include"
If you modify line 82 and 83 of the Makefile
you can add the protobuf library and include paths:
LIB := -L$(PLATFORM_PATH)/lib -L/opt/homebrew/opt/protobuf@21/lib -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp -pthread
INC := -I$(PLATFORM_PATH)/include -I/opt/homebrew/opt/protobuf@21/include -isystem ./include -I./src $(LUA_CFLAGS)
Re-run make
and compilation will succeed. @systemed Would it make sense to add $(LDFLAGS)
and $(CPPFLAGS)
to the Makefile? Mac users would just need to export those two directories per the Homebrew installation note and they would be all set. Makefile would look like this:
LIB := -L$(PLATFORM_PATH)/lib $(LDFLAGS) -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp -pthread
INC := -I$(PLATFORM_PATH)/include $(CPPFLAGS) -isystem ./include -I./src $(LUA_CFLAGS)
I'm also willing to submit a PR to do this and a little note in the install docs for Mac users to export those following brew install of protobuf.
from tilemaker.
That’s really helpful - thank you. A PR to do that would be excellent.
from tilemaker.
Thanks for these instructions @glenselle! It was one thing that tripped me up still that others might encounter too. I was running the newer protoc binary with the protobuf@21 headers. To run the old binary as well, simply do:
export PATH="/opt/homebrew/opt/protobuf@21/bin:$PATH
...before running make
from tilemaker.
Related Issues (20)
- Negative values for tile_row HOT 2
- Fedora install/compile instructions
- Add a function to compute start and/or end of a way to write in a way:Layer
- how to set make "CONFIG=-DFLOAT_Z_ORDER" under docker environment?
- Prioritization of citynames HOT 1
- Point of interest not inside the tile. HOT 2
- Issue running premade server HOT 2
- mbtiles from tilemaker not working in Opencpn HOT 2
- v2.4.0:tilemaker-ubuntu-22.04.zip:Could not find node with id HOT 2
- config-example.json - ERROR: LayerAsCentroid(): a layer named as "poi_detail" doesn't exist HOT 1
- Couldn't make .mbtiles output file in Docker HOT 7
- terminate called after throwing an instance of 'kaguya::LuaRuntimeError' HOT 12
- Update Mac OS build instructions HOT 12
- Idea for more flexible access to relations HOT 2
- state boundaries have gaps HOT 6
- Could not find node with id HOT 2
- segmentation fault with large file ( > 4gb ) HOT 13
- Failed to solve process cmake HOT 2
- Generating MBTILE with info over 17z HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tilemaker.