Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-58769

Neo build fails on Xcode 15

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Yes

    Description

      When attempting to build the neo branch with Xcode 15 (released by Apple this week), the following compiler error is seen:

      FAILED: kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx.o 
      /opt/homebrew/bin/ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DCOUCHBASE_ENTERPRISE_EDITION=1 -DDESTINATION_ROOT=\"/Users/dave/repos/couchbase/server/neo/install\" -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_JEMALLOC -DHAVE_JEMALLOC_SDALLOCX -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DMEMCACHED_VERSION=\"6da4d760f5bf2ca57c0c107758b9cbeda0833159\" -DOBJECT_ROOT=\"/Users/dave/repos/couchbase/server/neo/build/kv_engine\" -DPRODUCT_VERSION=\"0.0.0-0000\" -DSOURCE_ROOT=\"/Users/dave/repos/couchbase/server/neo/kv_engine\" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1 -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__=1 -D__STDC_FORMAT_MACROS -Dgsl_CONFIG_CONTRACT_VIOLATION_THROWS -I/Users/dave/repos/couchbase/server/neo/build/kv_engine/include -I/Users/dave/repos/couchbase/server/neo/kv_engine -I/Users/dave/repos/couchbase/server/neo/kv_engine/include -I/Users/dave/repos/couchbase/server/neo/build/platform/include -I/Users/dave/repos/couchbase/server/neo/build/tlm/deps/googletest.exploded/include -I/Users/dave/repos/couchbase/server/neo/platform/include -isystem /Users/dave/repos/couchbase/server/neo/phosphor/include -isystem /Users/dave/repos/couchbase/server/neo/third_party/gsl-lite/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/libevent.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/openssl.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/jemalloc.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/folly.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/double-conversion.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/glog.exploded/include -isystem /Users/dave/repos/couchbase/server/neo/build/tlm/deps/json.exploded/include -fvisibility=hidden -pthread -fcolor-diagnostics -Qunused-arguments -Wall -Wextra -Wno-unused-parameter -pedantic -fno-strict-aliasing -Werror=switch -Werror=redundant-decls -Werror=missing-braces -ftemplate-depth=900 -fsized-deallocation -Wno-unused-lambda-capture -Wno-gnu-zero-variadic-macro-arguments -O3 -DNDEBUG -g -std=c++17 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk -mmacosx-version-min=10.14 -Winvalid-pch -Xarch_arm64 -include/Users/dave/repos/couchbase/server/neo/build/kv_engine/CMakeFiles/kv_pch.dir/cmake_pch_arm64.hxx -MD -MT kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx.o -MF kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx.o.d -o kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx.o -c /Users/dave/repos/couchbase/server/neo/build/kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx
      In file included from /Users/dave/repos/couchbase/server/neo/build/kv_engine/protocol/connection/CMakeFiles/mc_client_connection.dir/Unity/unity_0_cxx.cxx:3:
      In file included from /Users/dave/repos/couchbase/server/neo/kv_engine/protocol/connection/client_connection.cc:16:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/folly.exploded/include/folly/io/async/AsyncSSLSocket.h:39:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/folly.exploded/include/folly/ssl/SSLSessionManager.h:19:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include/boost/variant.hpp:17:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include/boost/variant/variant.hpp:21:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include/boost/type_index.hpp:29:
      In file included from /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include/boost/type_index/stl_type_index.hpp:47:
      /Users/dave/repos/couchbase/server/neo/build/tlm/deps/boost.exploded/include/boost/container_hash/hash.hpp:131: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> {};
                                 ~~~~~^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include/c++/v1/__functional/unary_function.h:46:1: note: '__unary_function' declared here
      using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
      ^
      1 error generated.
      

      The issue is caused by the version of Boost used by the neo branch (1.74) using a function deprecated in C++ 17 (documented at https://developer.apple.com/documentation/xcode-release-notes/xcode-14_3-release-notes#Deprecations):

      std::unary_function and std::binary_function are no longer available in C++17 and C++20. They can be re-enabled by defining _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION. They are also marked as [[deprecated]] in C++11 and later. To disable deprecation warnings you have to define _LIBCPP_DISABLE_DEPRECATION_WARNINGS. Note that this disables all deprecation warnings.

      Note master isn't affected as we use Boost 1.82 there, and Boost fixed the issue upstream in v1.81.

      Attachments

        For Gerrit Dashboard: MB-58769
        # Subject Branch Project Status CR V

        Activity

          People

            ming.ho Ming Ho
            drigby Dave Rigby (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty