Opened 9 months ago
Closed 8 months ago
#69079 closed defect (fixed)
rocksdb: test_util/mock_time_env.h:72:16: error: 'TimedWait' marked 'override' but does not override any member functions; test_util/secondary_cache_test_util.cc:41:23: error: unknown type name 'CacheTier'
Reported by: | neverpanic (Clemens Lang) | Owned by: | stromnov (Andrey Stromnov) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | rocksdb |
Description (last modified by neverpanic (Clemens Lang))
rocksdb 8.9.1 fails to build on macOS 14.2.1 23C71 arm64 with Xcode 15.2 15C500b. clang -v
is
$ clang -v Apple clang version 15.0.0 (clang-1500.1.0.2.5) Target: arm64-apple-darwin23.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I see two errors in the main.log:
:info:build /usr/bin/clang++ -DBZIP2 -DGFLAGS=1 -DHAVE_FULLFSYNC -DLZ4 -DOS_MACOSX -DROCKSDB_LIB_IO_POSIX -DROCKSDB_NO_DYNAMIC_EXTENSION -DROCKSDB_PLATFORM_POSIX -DSNAPPY -DZLIB -DZSTD -I/opt/local/include -I/opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1 -I/opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/include -isystem /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/third-party/gtest-1.8.1/fused-src -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -W -Wextra -Wall -pthread -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-invalid-offsetof -fno-omit-frame-pointer -momit-leaf-frame-pointer -march=armv8-a+crc+crypto -Wno-unused-function -Werror -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -std=gnu++17 -MD -MT CMakeFiles/testharness.dir/test_util/mock_time_env.cc.o -MF CMakeFiles/testharness.dir/test_util/mock_time_env.cc.o.d -o CMakeFiles/testharness.dir/test_util/mock_time_env.cc.o -c /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/test_util/mock_time_env.cc […] :info:build In file included from /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/test_util/mock_time_env.cc:6: :info:build /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/test_util/mock_time_env.h:72:16: error: 'TimedWait' marked 'override' but does not override any member functions :info:build virtual bool TimedWait(port::CondVar* cv, :info:build ^ :info:build 1 error generated. :info:build make[2]: *** [CMakeFiles/testharness.dir/test_util/mock_time_env.cc.o] Error 1
and
:info:build /usr/bin/clang++ -DBZIP2 -DGFLAGS=1 -DHAVE_FULLFSYNC -DLZ4 -DOS_MACOSX -DROCKSDB_LIB_IO_POSIX -DROCKSDB_NO_DYNAMIC_EXTENSION -DROCKSDB_PLATFORM_POSIX -DSNAPPY -DZLIB -DZSTD -I/opt/local/include -I/opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1 -I/opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/include -isystem /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/third-party/gtest-1.8.1/fused-src -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -W -Wextra -Wall -pthread -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers -Wno-strict-aliasing -Wno-invalid-offsetof -fno-omit-frame-pointer -momit-leaf-frame-pointer -march=armv8-a+crc+crypto -Wno-unused-function -Werror -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -mmacosx-version-min=14.0 -std=gnu++17 -MD -MT CMakeFiles/testharness.dir/test_util/secondary_cache_test_util.cc.o -MF CMakeFiles/testharness.dir/test_util/secondary_cache_test_util.cc.o.d -o CMakeFiles/testharness.dir/test_util/secondary_cache_test_util.cc.o -c /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/test_util/secondary_cache_test_util.cc […] :info:build /opt/local/var/macports/build/_opt_dports_databases_rocksdb/rocksdb/work/rocksdb-8.9.1/test_util/secondary_cache_test_util.cc:41:23: error: unknown type name 'CacheTier' :info:build CacheTier /*source*/, Cache::CreateContext* context, :info:build ^ :info:build make[2]: *** [CMakeFiles/testharness.dir/test_util/secondary_cache_test_util.cc.o] Error 1
Since those both seem to occur in testing code, maybe we can disable building the tests?
Attachments (1)
Change History (7)
Changed 9 months ago by neverpanic (Clemens Lang)
Attachment: | main.log.gz added |
---|
comment:1 Changed 9 months ago by neverpanic (Clemens Lang)
Description: | modified (diff) |
---|
comment:2 Changed 9 months ago by neverpanic (Clemens Lang)
comment:3 Changed 9 months ago by neverpanic (Clemens Lang)
This happens because rocksdb picks up its own installed headers (from the previous version) before the ones in its source directory, so #include "rocksdb/system_clock.h"
resolves to /opt/local/include/rocksdb/system_clock.h
, which does not contain a declaration of virtual bool TimedWait(port::CondVar*, std::chrono::microseconds)
. rocksdb's build system should put its own include paths in front of any externally specified source paths, such as /opt/local/include
.
comment:4 Changed 9 months ago by neverpanic (Clemens Lang)
The build succeeds with this source patch applied:
-
CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt index 49868be89..d01ebeebe 100644
a b if(HAVE_FULLFSYNC) 552 552 add_definitions(-DHAVE_FULLFSYNC) 553 553 endif() 554 554 555 include_directories( ${PROJECT_SOURCE_DIR})556 include_directories( ${PROJECT_SOURCE_DIR}/include)555 include_directories(BEFORE ${PROJECT_SOURCE_DIR}) 556 include_directories(BEFORE ${PROJECT_SOURCE_DIR}/include) 557 557 558 558 if(USE_COROUTINES) 559 559 if(USE_FOLLY OR USE_FOLLY_LITE)
See https://cmake.org/cmake/help/latest/command/include_directories.html for the docs. Alternatively, setting https://cmake.org/cmake/help/latest/variable/CMAKE_INCLUDE_DIRECTORIES_BEFORE.html#variable:CMAKE_INCLUDE_DIRECTORIES_BEFORE without patching the source works as well:
-
databases/rocksdb/Portfile
diff --git a/databases/rocksdb/Portfile b/databases/rocksdb/Portfile index f67e8a61b71..9982abdeffe 100644
a b configure.args-append \ 51 51 -DROCKSDB_BUILD_SHARED=ON \ 52 52 -DWITH_BZ2=ON \ 53 53 -DWITH_MD_LIBRARY=ON \ 54 -DWITH_TBB=OFF 54 -DWITH_TBB=OFF \ 55 -DCMAKE_INCLUDE_DIRECTORIES_BEFORE=ON 55 56 56 57 if {[string match *gcc* ${configure.compiler}]} { 57 58 # version_set.cc: error: 'rocksdb::{anonymous}::ManifestPicker::ManifestPicker' defined but not used
comment:5 Changed 8 months ago by neverpanic (Clemens Lang)
comment:6 Changed 8 months ago by neverpanic (Clemens Lang)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I bisected this as far as I could, but there are a bunch of upstream commits that just don't build, so I skipped them during testing. The result for the
TimedWait
failure is:Since
e373685dab1b0716a8ed7532c80ad2e4d05e7590
is the commit that added theTimedWait
functionality, I'm assuming that this has always been broken upstream.