systemed / tilemaker

Make OpenStreetMap vector tiles without the stack
https://tilemaker.org/
Other
1.5k stars 232 forks source link

Fails to build with Boost 1.86.0 #747

Closed wdaus closed 2 months ago

wdaus commented 2 months ago

I'm not very familiar with C++ or Boost, but it looks like mmap_allocator.cpp is trying to use a method that no longer exists in Boost 1.86.0 (destroy in interprocess::allocator).

make
...
g++ -O3 -Wall -Wno-unknown-pragmas -Wno-sign-compare -std=c++14 -pthread -fPIE -DTM_VERSION=v3.0.0
-o src/mmap_allocator.o -c src/mmap_allocator.cpp -I/usr/local/include -isystem ./include -I./src -I/usr/include/luajit-2.1 DLUAJIT
src/mmap_allocator.cpp: In static member function ‘static void void_mmap_allocator::destroy(void*)’:
src/mmap_allocator.cpp:227:42: error: ‘using allocator_t = class boost::interprocess::allocator<unsigned char,
boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::null_mutex_family>,
boost::interprocess::iset_index> >’ {aka ‘class boost::interprocess::allocator<unsigned char,
boost::interprocess::segment_manager<char, boost::interprocess::rbtree_best_fit<boost::interprocess::null_mutex_family>,
boost::interprocess::iset_index> >’} has no member named ‘destroy’
  227 |                         return allocator.destroy(reinterpret_cast<uint8_t *>(p));
systemed commented 2 months ago

https://github.com/boostorg/interprocess/commit/929b488e6c847c729a53654b26a82a5a5f513b15 looks like the change in question.

https://stackoverflow.com/questions/39414610/why-are-are-stdallocators-construct-and-destroy-functions-deprecated-in-c17 seems to explain some background.

cldellow commented 2 months ago

Oops, I didn't put the magic words in the PR, so GitHub didn't autoclose this issue.

@wdaus I think this has been fixed in #759 - can you give that a whirl and close the issue if it works for you now?

wdaus commented 2 months ago

@cldellow thanks for the quick fix. Can confirm that build succeeds on Arch Linux with the latest boost version.


Name            : boost
Version         : 1.86.0-2
Description     : Free peer-reviewed portable C++ source libraries (development headers)
Architecture    : x86_64
...
Build Date      : Sat 07 Sep 2024 04:51:12 AM AEST
...```
wdaus commented 2 months ago

Closing issue