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

Build break of forestdb with XCode 15.3

    XMLWordPrintable

Details

    • Untriaged
    • 0
    • Unknown

    Description

      Forestdb fails to build with XCode 15.3 due to using a preprocessor macro to redefine realloc to je_realloc (fails as part of including a system header):

       

      /opt/homebrew/bin/ccache /Library/Developer/CommandLineTools/usr/bin/c++ -DCB_DEVELOPMENT_ASSERTS -DCOUCHBASE_ENTERPRISE_EDITION=1 -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL="" -DHAVE_JEMALLOC -DHAVE_JEMALLOC_SDALLOCX -DJETBRAINS_CLION_IDE -D_COW_COMPACTION=1 -D_DOC_COMP=1 -D_GNU_SOURCE=1 -D_LATENCY_STATS -D_LATENCY_STATS_DUMP_TO_FILE -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__=1 -D__STDC_FORMAT_MACROS -Dforestdb_EXPORTS -Dgsl_CONFIG_CONTRACT_VIOLATION_THROWS -I/Users/trondnorbye/compile/trunk/cmake-build-debug/forestdb/src -I/Users/trondnorbye/compile/trunk/forestdb/include -I/Users/trondnorbye/compile/trunk/forestdb/src -I/Users/trondnorbye/compile/trunk/forestdb/utils -I/Users/trondnorbye/compile/trunk/forestdb/option -I/Users/trondnorbye/compile/trunk/cmake-build-debug/platform/include -I/Users/trondnorbye/compile/trunk/cmake-build-debug/tlm/deps/snappy.exploded/include -I/Users/trondnorbye/compile/trunk/cmake-build-debug/tlm/deps/jemalloc.exploded/include -fvisibility=hidden -pthread -fcolor-diagnostics -Wl,-no_warn_duplicate_libraries -fdebug-default-version=4 -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 -O0 -Wunused-variable -Wall -pedantic -std=c++11 -Wredundant-decls -std=c++17 -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk -mmacosx-version-min=12.0 -fPIC -fcolor-diagnostics -Wno-deprecated-declarations -Wno-unused-but-set-variable -MD -MT forestdb/CMakeFiles/forestdb.dir/src/forestdb.cc.o -MF forestdb/CMakeFiles/forestdb.dir/src/forestdb.cc.o.d -o forestdb/CMakeFiles/forestdb.dir/src/forestdb.cc.o -c /Users/trondnorbye/compile/trunk/forestdb/src/forestdb.cc
      In file included from /Users/trondnorbye/compile/trunk/forestdb/src/forestdb.cc:8383:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/map:2529:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/functional:526:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/vector:321:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__format/formatter_bool.h:20:
      In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/__format/formatter_integral.h:32:
      /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk/usr/include/c++/v1/locale:2822:22: error: no member named 'je_realloc' in namespace 'std'; did you mean simply 'je_realloc'?
          _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
                           ^~~~~
      /Users/trondnorbye/compile/trunk/cmake-build-debug/tlm/deps/jemalloc.exploded/include/jemalloc/jemalloc.h:267:32: note: 'je_realloc' declared here
          void JEMALLOC_SYS_NOTHROW   *je_realloc(void *ptr, size_t size)
                                       ^
      /Users/trondnorbye/compile/trunk/cmake-build-debug/tlm/deps/jemalloc.exploded/include/jemalloc/jemalloc.h:86:22: note: expanded from macro 'je_realloc'
      #  define je_realloc je_realloc
                           ^
      1 error generated.
       

      My guess is that it comes from

      src/arch.h:#define realloc(ptr, size) je_realloc(ptr, size) 

       

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              srinath.duvuru Srinath Duvuru
              trond Trond Norbye
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty