Comments (12)
Thanks. I don't use Homebrew on my M2 mini so a PR here would be great.
from tilemaker.
Related but taking another path, the CMakeLists.txt are woefully outdated. I have been able to modernize the CMakeLists and build tilemaker with CMake on my mac. I will try to make a PR for that. The trouble for addressing @cmahnke's problem is that I do a lot of development and thus some packages are already installed on my machine and may be different from his. Having someone try my approach on their machine and helping make sure we write complete correct instructions would be helpful. @cmahnke, would you be willing to help?
from tilemaker.
This worked for me on osx Ventura
Start by installing homebrew https://brew.sh/
After homebrew is installed. Install the necessary dependencies. Note that an older version of protobuf is required
brew install brew install protobuf@21 boost [email protected] shapelib rapidjson
Clone Tilemaker
git clone https://github.com/systemed/tilemaker
Checkout tag v2.4.0 (this is the version I've verified these instructions against)
git checkout tags/v2.4.0
Update the Makefile (in the tilemaker directory) to include the specific path to protobuf
First, look for this line
protoc --proto_path=include --cpp_out=include $<
and replace it with to add a full path to protoc and specify the include path for protoc include files
/usr/local/opt/protobuf@21/bin/protoc --proto_path=include -I/usr/local/opt/protobuf@21/include --cpp_out=include $<
Second, look for this line
INC := -I$(PLATFORM_PATH)/include -isystem ./include -I./src $(LUA_CFLAGS)
and ensure the protobuf include folder is added. for example:
INC := -I/usr/local/opt/protobuf@21/include -I$(PLATFORM_PATH)/include -isystem ./include -I./src $(LUA_CFLAGS)
Third, look for this line
LIB := -L$(PLATFORM_PATH)/lib -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp -pthread
and ensure the protobuf lib folder is added. For example:
LIB := -L/usr/local/opt/protobuf@21/lib -L$(PLATFORM_PATH)/lib -lz $(LUA_LIBS) -lboost_program_options -lsqlite3 -lboost_filesystem -lboost_system -lboost_iostreams -lprotobuf -lshp -pthread
Build Tilemaker using the Makefile
cd ./tilemaker && make
from tilemaker.
I think this should work:
https://github.com/systemed/tilemaker/tree/mac_build
It updates the instructions to use cmake and Lua 5.3. The fixes from #555 are now in trunk (slightly adjusted). I don't use Homebrew (too many bad experiences with it breaking everything) so would be interested to hear from anyone who tries it.
from tilemaker.
@systemed I've got the new M3 on order and will try your mac_build branch with a clean install when it arrives.
from tilemaker.
Thank you!
from tilemaker.
CMake Error at /opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find LuaJIT (missing: LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR)
Call Stack (most recent call first):
/opt/homebrew/Cellar/cmake/3.28.0/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/FindLuaJIT.cmake:57 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:49 (find_package)
from tilemaker.
Oh, that's interesting. It should only be looking for LuaJIT if it couldn't find plain vanilla Lua previously. Had brew install [email protected]
installed Lua happily?
from tilemaker.
The default version of lua is 5.4.6. If we explicitly install 5.3 (which I did), then we also have to explicitly add it to our path.
==> [email protected]: stable 5.3.6 (bottled) [keg-only]
Powerful, lightweight programming language
https://www.lua.org/
/opt/homebrew/Cellar/[email protected]/5.3.6 (28 files, 407.2KB)
Poured from bottle using the formulae.brew.sh API on 2023-12-09 at 20:20:36
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/l/[email protected]
License: MIT
==> Caveats
You may also want luarocks:
brew install luarocks
[email protected] is keg-only, which means it was not symlinked into /opt/homebrew,
because this is an alternate version of another formula.
If you need to have [email protected] first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
For compilers to find [email protected] you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/[email protected]/lib"
export CPPFLAGS="-I/opt/homebrew/opt/[email protected]/include"
For pkg-config to find [email protected] you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/[email protected]/lib/pkgconfig"
==> Analytics
install: 292 (30 days), 601 (90 days), 10,636 (365 days)
install-on-request: 282 (30 days), 559 (90 days), 1,101 (365 days)
build-error: 0 (30 days)```
from tilemaker.
Right, got it. Thank you.
I wonder if (for Mac + homebrew) it might be easiest if we just recommend brew install luajit
rather than vanilla Lua. LuaJIT is reliable, fast, and homebrew should be capable of installing it properly without additional steps.
from tilemaker.
I have a brand new Mac M3 and tried the instructions on it with cmake. Here are my observations:
First, there is an issue with compiling streamvbyte_arm_decode.c. It attempts to compile it as C++ and restrict
is disliked. For now I added #define restrict __restrict
to work around it.
brew install luajit
will allow the code to compile but it will not link.
Removing luajit and doing brew install lua
fixed it.
The current CMakeLists.txt
is not looking for luajit but just lua. Did you modify the CMakeLists file, @dougkpowers?
from tilemaker.
v3 now builds and installs fine on an ARM Mac. I need to put my M2 through a deep cleanse after temporarily installing Homebrew to test :|
The manpages don't install because of SIP, but that's not really important because tilemaker --help
serves just as well.
from tilemaker.
Related Issues (20)
- "`Could not find node with id`" despite node presence in PBF HOT 3
- Sample Workflow blog post not reachable HOT 1
- Smaller GeoJSON polygons not showing up HOT 5
- Latest version does not work on windows HOT 9
- Documented workflow for oceans not working HOT 2
- MAC OS issue with types during the make command HOT 10
- Config files aren't installed to a static location HOT 1
- Ubuntu 22.04 tilemaker-server no static folder in share HOT 1
- Attribute(name, value, minzoom) writes attribute on all zoom levels HOT 1
- Lua Runtime Error HOT 2
- Generate tile size statistics HOT 1
- attempt to call global 'Find' (a nil value) HOT 1
- Windows install instructions HOT 5
- Buildings and piers missing at zoom level 13 HOT 3
- Trying to install on Mac HOT 2
- Zoom level simplification HOT 1
- lua error: table is not a function HOT 1
- lua missing, ubuntu 23.04 HOT 1
- STL Vector assertion failed when running maptiles HOT 9
- Assertion failed: (has_wire_type(pbf_wire_type::varint) && "not a varint"), function get_sint64, file pbf_reader.hpp, line 570 HOT 2
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.