Package Details: tilemaker 3.0.0-1

Git Clone URL: https://aur.archlinux.org/tilemaker.git (read-only, click to copy)
Package Base: tilemaker
Description: Convert OpenStreetMap .pbf files into vector tiles without the stack
Upstream URL: https://github.com/systemed/tilemaker
Licenses: custom
Submitter: simon04
Maintainer: akstrfn
Last Packager: akstrfn
Votes: 3
Popularity: 0.22
First Submitted: 2018-07-06 06:23 (UTC)
Last Updated: 2024-01-16 12:56 (UTC)

Latest Comments

akstrfn commented on 2023-07-17 20:55 (UTC)

My bad, I did a git clone when testing and this is already fixed in master. Fix committed. I've used the patch you've provided to the upstream.

holzgeist commented on 2023-07-17 08:17 (UTC)

Interesting.. When only switching to cmake (i.e. removing the patch line from my changes below), it fails with

In file included from /usr/include/google/protobuf/stubs/common.h:44,
                 from /usr/include/google/protobuf/io/coded_stream.h:130,
                 from /home/tobias/src/aur/tilemaker/src/tilemaker-2.4.0/build/vector_tile.pb.h:24,
                 from /home/tobias/src/aur/tilemaker/src/tilemaker-2.4.0/build/vector_tile.pb.cc:4:
/usr/include/absl/strings/string_view.h:52:26: error: 'string_view' in namespace 'std' does not name a type
   52 | using string_view = std::string_view;
      |                          ^~~~~~~~~~~
/usr/include/absl/strings/string_view.h:52:21: note: 'std::string_view' is only available from C++17 onwards

...

Only switching cmake to 17 results in

In file included from /home/tobias/src/aur/tilemaker/src/tilemaker-2.4.0/src/attribute_store.cpp:1:
/home/tobias/src/aur/tilemaker/src/tilemaker-2.4.0/include/attribute_store.h:103:61: error: 'mutex' is not a member of 'std'
  103 |         using key_value_map_t = std::vector< std::pair<std::mutex, key_value_set_t> >;
      |                                                             ^~~~~
/home/tobias/src/aur/tilemaker/src/tilemaker-2.4.0/include/attribute_store.h:8:1: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    7 | #include <boost/intrusive_ptr.hpp>
  +++ |+#include <mutex>
    8 | #include <atomic>

...

akstrfn commented on 2023-07-16 18:44 (UTC)

Hi build with cmake works out of the box so it seems that just a switch to cmake build is needed. Did you try this before making a switch to c++17 and adding an include of <mutex>?

holzgeist commented on 2023-07-16 11:23 (UTC)

Hi! The latest version fails for me with multiple errors. I submitted a PR upstream to fix it for CMake builds: https://github.com/systemed/tilemaker/pull/503

I'm rather new to contributing to AUR, so I don't know how to submit PRs here. That's why here's the patch to include above changes in a patch and switch the PKGCONFIG to use cmake for building. The patch can be removed as soon as the upstream PR is released

diff --git a/PKGBUILD b/PKGBUILD
index 0a81587..1e2cc31 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,17 +8,26 @@ url="https://github.com/systemed/tilemaker"
 license=('custom')
 install=$pkgname.install
 depends=('boost-libs' 'lua>=5.1' 'protobuf' 'sqlite' 'shapelib' 'rapidjson')
-makedepends=('boost')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/systemed/$pkgname/archive/v$pkgver.tar.gz")
-sha512sums=('3dbcee04db82d9e16779a39f2ee5bcbcd78c39eb3d5873590ca98158c252d85beb2651680ccc59c7367cf24b11f11e967d7f52702752804fce8dde8eaeaa6f4e')
+makedepends=('boost' 'cmake')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/systemed/$pkgname/archive/v$pkgver.tar.gz" "fix_build.patch")
+sha512sums=('3dbcee04db82d9e16779a39f2ee5bcbcd78c39eb3d5873590ca98158c252d85beb2651680ccc59c7367cf24b11f11e967d7f52702752804fce8dde8eaeaa6f4e'
+            '9d7db358a3776ea638a420b1bc903fcfae0df08707090698b90e4fc73b425dc80f4f7a431be1f5c5b9d53dabe744ef0ac4e84a5eccc1ecb80ccef888b0961b58')
+
+prepare() {
+  cd "$pkgname-$pkgver"
+  patch --forward --strip=1 --input="${srcdir}/fix_build.patch"
+}

 build() {
   cd "$pkgname-$pkgver"
-  make
+  cmake -B build  \
+    -DCMAKE_BUILD_TYPE='Release' \
+    -Wno-dev
+  cmake --build build
 }

 package() {
   cd "$pkgname-$pkgver"
-  install -Dm 0755 tilemaker $pkgdir/usr/bin/tilemaker
+  install -Dm 0755 build/tilemaker $pkgdir/usr/bin/tilemaker
   install -Dm 0644 LICENCE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
 }
diff --git a/fix_build.patch b/fix_build.patch
new file mode 100644
index 0000000..7ddbabf
--- /dev/null
+++ b/fix_build.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4be62e5..b0f0140 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -59,7 +59,7 @@ endif()
+ find_package(ZLIB REQUIRED)
+ include_directories(${ZLIB_INCLUDE_DIR})
+ 
+-set(CMAKE_CXX_STANDARD 14)
++set(CMAKE_CXX_STANDARD 17)
+ 
+ if(!TM_VERSION)
+   execute_process(
+diff --git a/include/attribute_store.h b/include/attribute_store.h
+index c18f91f..7d3eafe 100644
+--- a/include/attribute_store.h
++++ b/include/attribute_store.h
+@@ -5,6 +5,7 @@
+ #include "vector_tile.pb.h"
+ #include <boost/functional/hash.hpp>
+ #include <boost/intrusive_ptr.hpp>
++#include <mutex>
+ #include <atomic>
+ 
+ /*    AttributeStore 

akstrfn commented on 2022-07-16 20:27 (UTC)

patch applied and build now works, thx

miblon commented on 2022-06-17 10:12 (UTC)

With boost > 1.79 there are errors when the source is being built. I reported the error and provided a fix. When the source is updated, this package should be renewed. More information at: https://github.com/systemed/tilemaker/pull/413

zegkljan commented on 2022-02-05 10:26 (UTC)

Build fails:

==> Starting build()...
Using LuaJIT 2.1 (include path is -I/usr/include/luajit-2.1, library path is -lluajit-5.1)
fatal: No names found, cannot describe anything.
protoc --proto_path=include --cpp_out=include include/osmformat.proto
protoc --proto_path=include --cpp_out=include include/vector_tile.proto
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/mbtiles.o -c src/mbtiles.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/pbf_blocks.o -c src/pbf_blocks.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
[libprotobuf WARNING google/protobuf/compiler/parser.cc:649] No syntax specified for the proto file: osmformat.proto. Please use 'syntax = "proto2";' or 'syntax = "proto3";' to specify a syntax version. (Defaulted to proto2 syntax.)
[libprotobuf WARNING google/protobuf/compiler/parser.cc:649] 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.)
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/coordinates.o -c src/coordinates.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/osm_store.o -c src/osm_store.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
src/osm_store.cpp: In constructor ‘mmap_file::mmap_file(const string&, std::size_t)’:
src/osm_store.cpp:29:54: warning: ‘mmap_file::buffer’ will be initialized after [-Wreorder]
   29 |         boost::interprocess::managed_external_buffer buffer;
      |                                                      ^~~~~~
src/osm_store.cpp:25:21: warning:   ‘std::string mmap_file::filename’ [-Wreorder]
   25 |         std::string filename;
      |                     ^~~~~~~~
src/osm_store.cpp:76:1: warning:   when initialized here [-Wreorder]
   76 | mmap_file::mmap_file(std::string const &filename, std::size_t offset)
      | ^~~~~~~~~
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/helpers.o -c src/helpers.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/output_object.o -c src/output_object.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/read_shp.o -c src/read_shp.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/read_pbf.o -c src/read_pbf.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=  -o src/osm_lua_processing.o -c src/osm_lua_processing.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1
In file included from ./include/osm_lua_processing.h:27,
                 from ./include/read_shp.h:11,
                 from src/read_shp.cpp:1:
./include/kaguya.hpp: In static member function ‘static kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get_type kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get(lua_State*, int)’:
./include/kaguya.hpp:5137:68: error: call of overloaded ‘lua_tonumberx(lua_State*&, int&, int*)’ is ambiguous
 5137 |                         get_type num = static_cast<T>(lua_tonumberx(l,index,&isnum));
      |                                                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:27,
                 from ./include/read_shp.h:11,
                 from src/read_shp.cpp:1:
./include/kaguya.hpp:733:35: note: candidate: ‘lua_Number kaguya::compat::lua_tonumberx(lua_State*, int, int*)’
  733 |                 inline lua_Number lua_tonumberx(lua_State *L, int index, int *isnum)
      |                                   ^~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:22,
                 from ./include/read_shp.h:11,
                 from src/read_shp.cpp:1:
/usr/include/luajit-2.1/lua.h:353:20: note: candidate: ‘lua_Number lua_tonumberx(lua_State*, int, int*)’
  353 | LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum);
      |                    ^~~~~~~~~~~~~
make: *** [Makefile:77: src/read_shp.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ./include/osm_lua_processing.h:27,
                 from src/read_pbf.cpp:9:
./include/kaguya.hpp: In static member function ‘static kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get_type kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get(lua_State*, int)’:
./include/kaguya.hpp:5137:68: error: call of overloaded ‘lua_tonumberx(lua_State*&, int&, int*)’ is ambiguous
 5137 |                         get_type num = static_cast<T>(lua_tonumberx(l,index,&isnum));
      |                                                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:27,
                 from src/read_pbf.cpp:9:
./include/kaguya.hpp:733:35: note: candidate: ‘lua_Number kaguya::compat::lua_tonumberx(lua_State*, int, int*)’
  733 |                 inline lua_Number lua_tonumberx(lua_State *L, int index, int *isnum)
      |                                   ^~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:22,
                 from src/read_pbf.cpp:9:
/usr/include/luajit-2.1/lua.h:353:20: note: candidate: ‘lua_Number lua_tonumberx(lua_State*, int, int*)’
  353 | LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum);
      |                    ^~~~~~~~~~~~~
src/read_pbf.cpp: In member function ‘bool PbfReader::ReadWays(OsmLuaProcessing&, PrimitiveGroup&, const PrimitiveBlock&)’:
src/read_pbf.cpp:76:31: warning: unused variable ‘wayId’ [-Wunused-variable]
   76 |                         WayID wayId = static_cast<WayID>(pbfWay.id());
      |                               ^~~~~
In file included from ./include/osm_lua_processing.h:27,
                 from src/osm_lua_processing.cpp:1:
./include/kaguya.hpp: In static member function ‘static kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get_type kaguya::lua_type_traits<T, typename std::enable_if<std::is_floating_point<_Tp>::value, void>::type>::get(lua_State*, int)’:
./include/kaguya.hpp:5137:68: error: call of overloaded ‘lua_tonumberx(lua_State*&, int&, int*)’ is ambiguous
 5137 |                         get_type num = static_cast<T>(lua_tonumberx(l,index,&isnum));
      |                                                       ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:27,
                 from src/osm_lua_processing.cpp:1:
./include/kaguya.hpp:733:35: note: candidate: ‘lua_Number kaguya::compat::lua_tonumberx(lua_State*, int, int*)’
  733 |                 inline lua_Number lua_tonumberx(lua_State *L, int index, int *isnum)
      |                                   ^~~~~~~~~~~~~
In file included from ./include/osm_lua_processing.h:22,
                 from src/osm_lua_processing.cpp:1:
/usr/include/luajit-2.1/lua.h:353:20: note: candidate: ‘lua_Number lua_tonumberx(lua_State*, int, int*)’
  353 | LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *isnum);
      |                    ^~~~~~~~~~~~~
make: *** [Makefile:77: src/read_pbf.o] Error 1
make: *** [Makefile:77: src/osm_lua_processing.o] Error 1
rm include/osmformat.pb.cc include/vector_tile.pb.cc
==> ERROR: A failure occurred in build().
    Aborting...

jokke commented on 2021-02-18 15:21 (UTC)

Build fails with:

usr/include/boost/geometry/core/coordinate_dimension.hpp:129:5: error: ‘value’ is not a member of ‘boost::geometry::dimension<const boost::geometry::model::box<boost::geometry::model::d2::point_xy<double> > >’
  129 |     BOOST_STATIC_ASSERT(( dimension<G1>::value == dimension<G2>::value ));
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/boost/geometry/core/coordinate_dimension.hpp:129:5: error: ‘value’ is not a member of ‘boost::geometry::dimension<boost::geometry::model::polygon<boost::geometry::model::d2::point_xy<double> > >’
  129 |     BOOST_STATIC_ASSERT(( dimension<G1>::value == dimension<G2>::value ));
      |     ^~~~~~~~~~~~~~~~~~~