apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store

Home Page:https://apple.github.io/foundationdb/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build on macos..

metaforte opened this issue · comments

Looks like there is an issue with latest xcode as per stackoverflow

./boost/container_hash/hash.hpp:132:33: error: no template named 'unary_function' in namespace 'std'; did you mean '__unary_function'?
struct hash_base : std::unary_function<T, std::size_t> {};
~~~~~^~~~~~~~~~~~~~
__unary_function

This is caused by https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Deprecations and we are use boost 1.78 (1.81 and after should be fine).

Specifically, in order to compile, we need to add -D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION compiler flag.

For main branch, this is fixed by #11017