You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
be/test does not compile on macOS, so run-be-ut.sh is unusable locally. Note that .github/workflows/be-ut-mac.yml deliberately does not compile be/test ("Only verify that the BE compiles on macOS; do NOT compile be/test. The unit tests are built and run locally, not in this job."), so nothing in CI catches this.
All test sources are linked into the single doris_be_test target, therefore a handful of failing files blocks every --filter= run as well.
The BE itself (./build.sh --be) builds and runs fine on macOS; only the unit-test target is affected.
7 TUs fail. 5 of them are macOS-incompatible test code added in the last few weeks:
6 × format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') / 'unsigned long' but 'uint64_t' (aka 'unsigned long long')[-Werror,-Wformat]
no member named 'posix_fadvise' in the global namespace, use of undeclared identifier 'POSIX_FADV_DONTNEED', and cannot initialize a parameter of type 'char *' with an rvalue of type 'value_type *' (aka 'unsigned char *') for mincore()
posix_fadvise() is Linux-only and mincore()'s 3rd parameter is char* on macOS
be/src/core/value/ip_address_cidr.h:181: no member named 'from_chars' in namespace 'std' — the header uses std::from_chars without including <charconv>
'faiss/impl/platform_macros.h' file not found — it includes be/src/exprs/function/array/function_array_distance.h, which needs faiss headers; be/test/CMakeLists.txt already removes storage/index/ann/*.cpp from UT_FILES for exactly this reason, but not test files that import faiss headers indirectly
Additionally, with clang ≥ 23 the __COUNTER__ uses in be/src/runtime/memory/lru_cache_policy.h and be/src/storage/segment/variant/hierarchical_data_iterator.h become hard errors under the project's -Wpedantic -Werror ('__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]). Not macOS-specific, but it independently prevents building the UT target with a current clang.
What You Expected?
./run-be-ut.sh -j 4 and ./run-be-ut.sh --run --filter=<some_test> should build and run on macOS, as the macOS workflow's comment says unit tests are meant to be built locally.
How to Reproduce?
# macOS arm64, master
git clone https://github.com/apache/doris.git &&cd doris
./build.sh --be -j 4 # succeeds, doris_be is produced
./run-be-ut.sh -j 4 # fails while compiling be/test# a single TU is enough to see the platform issues, e.g.cd be/ut_build_ASAN
ninja test/CMakeFiles/doris_be_test.dir/storage/index/snii/bench/snii_vs_v3_benchmark_test.cpp.o
Exact lines / errors (paths shortened to the repository root):
===== be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp (6 errors)
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:375:88: error: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Werror,-Wformat]
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:403:12: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:404:79: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:482:44: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:582:64: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cpp:707:79: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]
===== be/test/storage/index/snii/bench/snii_vs_v3_benchmark_test.cpp (3 platform errors)
be/test/storage/index/snii/bench/snii_vs_v3_benchmark_test.cpp:1048:62: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'value_type *' (aka 'unsigned char *')
be/test/storage/index/snii/bench/snii_vs_v3_benchmark_test.cpp:1083:15: error: no member named 'posix_fadvise' in the global namespace; did you mean 'posix_madvise'?
be/test/storage/index/snii/bench/snii_vs_v3_benchmark_test.cpp:1083:39: error: use of undeclared identifier 'POSIX_FADV_DONTNEED'
===== be/test/storage/index/snii/bkd/bkd_corruption_test.cpp (2 errors)
be/test/storage/index/snii/bkd/bkd_corruption_test.cpp:557:36: error: deduced conflicting types ('size_type' (aka 'unsigned long') vs 'uint64_t' (aka 'unsigned long long')) for initializer list element type
be/test/storage/index/snii/bkd/bkd_corruption_test.cpp:566:36: error: deduced conflicting types ('uint64_t' (aka 'unsigned long long') vs 'size_type' (aka 'unsigned long')) for initializer list element type
===== be/test/storage/index/snii/writer/spimi_locality_bench_test.cpp (1 error)
.../c++/v1/__hash_table:1802:43: error: no matching function for call to object of type 'key_equal' (aka 'Equal')
===== be/test/storage/segment/hierarchical_data_iterator_test.cpp (3 errors)
be/test/storage/segment/hierarchical_data_iterator_test.cpp:121:33: error: no matching function for call to 'min'
be/test/storage/segment/hierarchical_data_iterator_test.cpp:169:33: error: no matching function for call to 'min'
be/test/storage/segment/hierarchical_data_iterator_test.cpp:224:33: error: no matching function for call to 'min'
===== be/test/exec/dictionary/dictionary_ip_trie_test.cpp (1 error)
be/src/core/value/ip_address_cidr.h:181:42: error: no member named 'from_chars' in namespace 'std'; did you mean 'to_chars'?
===== be/test/exprs/function/function_map_inner_product_test.cpp (1 error)
be/src/exprs/function/array/function_array_distance.h:20:10: fatal error: 'faiss/impl/platform_macros.h' file not found
Anything Else?
The failing files are recent: the snii ones were added by 96fd1e9bd2, 1db4b1d305, 9f3b084a75 (Aug–Sep 2026) and hierarchical_data_iterator_test.cpp was changed by 388c93aa8a ([feature](variant) Enable Variant V2 by default, [feature](variant) Enable Variant V2 by default #66858, 2026-09-14). macOS CI intentionally skips be/test, so these went unnoticed.
Two possible fixes:
make the 5 files portable (%lld/%llu or the PRI* macros, reinterpret_cast<char*> for mincore, #if defined(__linux__) around posix_fadvise, explicit std::min<uint64_t>/casts, add the missing Equal::operator()(uint32_t, std::string_view) or drop heterogeneous lookup for that bench, and #include <charconv> in ip_address_cidr.h); and/or
if macOS coverage of those tests is not desired, extend the existing platform-exclusion block in be/test/CMakeLists.txt — if (OS_MACOSX) list(REMOVE_ITEM UT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/util/system_metrics_test.cpp) endif() — with the files above.
A local patch covering all of the above is already prepared (roughly 15 lines) and can be submitted as a PR if that direction is preferred.
Search before asking
Version
master. Reproduced on
f5da8fb165and still present on1a3772ff04.Platform / toolchain: macOS 27 (build 26A428) arm64 (Apple Silicon), Homebrew LLVM/Clang 23.1.1, CMake 3.25.3, ninja 1.13.2, JDK 17,
BUILD_TYPE=ASAN, third-party from thedoris-thirdparty-prebuilt-darwin-arm64release.What's Wrong?
be/testdoes not compile on macOS, sorun-be-ut.shis unusable locally. Note that.github/workflows/be-ut-mac.ymldeliberately does not compilebe/test("Only verify that the BE compiles on macOS; do NOT compile be/test. The unit tests are built and run locally, not in this job."), so nothing in CI catches this.All test sources are linked into the single
doris_be_testtarget, therefore a handful of failing files blocks every--filter=run as well.The BE itself (
./build.sh --be) builds and runs fine on macOS; only the unit-test target is affected.7 TUs fail. 5 of them are macOS-incompatible test code added in the last few weeks:
be/test/storage/index/snii/bench/bkd_native_vs_clucene_bench_test.cppformat specifies type 'long' but the argument has type 'int64_t' (aka 'long long')/'unsigned long' but 'uint64_t' (aka 'unsigned long long')[-Werror,-Wformat]int64_tislong long; on glibc it islongbe/test/storage/index/snii/bench/snii_vs_v3_benchmark_test.cppno member named 'posix_fadvise' in the global namespace,use of undeclared identifier 'POSIX_FADV_DONTNEED', andcannot initialize a parameter of type 'char *' with an rvalue of type 'value_type *' (aka 'unsigned char *')formincore()posix_fadvise()is Linux-only andmincore()'s 3rd parameter ischar*on macOSbe/test/storage/index/snii/bkd/bkd_corruption_test.cppdeduced conflicting types ('size_type' (aka 'unsigned long') vs 'uint64_t' (aka 'unsigned long long')) for initializer list element typesize_tanduint64_tare distinct types on Darwinbe/test/storage/index/snii/writer/spimi_locality_bench_test.cppno matching function for call to object of type 'key_equal' (aka 'Equal')raised from libc++<__hash_table>Equalfunctor used for heterogeneous lookup does not provide the overloads libc++ instantiatesbe/test/storage/segment/hierarchical_data_iterator_test.cppno matching function for call to 'min'(std::min(*rows, kRows - _state->current_ordinal))uint64_tvssize_t(unsigned long longvsunsigned long)2 more TUs fail for include/build-configuration reasons (also reproduced with the same toolchain):
be/test/exec/dictionary/dictionary_ip_trie_test.cppbe/src/core/value/ip_address_cidr.h:181: no member named 'from_chars' in namespace 'std'— the header usesstd::from_charswithout including<charconv>be/test/exprs/function/function_map_inner_product_test.cpp'faiss/impl/platform_macros.h' file not found— it includesbe/src/exprs/function/array/function_array_distance.h, which needs faiss headers;be/test/CMakeLists.txtalready removesstorage/index/ann/*.cppfromUT_FILESfor exactly this reason, but not test files that import faiss headers indirectlyAdditionally, with clang ≥ 23 the
__COUNTER__uses inbe/src/runtime/memory/lru_cache_policy.handbe/src/storage/segment/variant/hierarchical_data_iterator.hbecome hard errors under the project's-Wpedantic -Werror('__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]). Not macOS-specific, but it independently prevents building the UT target with a current clang.What You Expected?
./run-be-ut.sh -j 4and./run-be-ut.sh --run --filter=<some_test>should build and run on macOS, as the macOS workflow's comment says unit tests are meant to be built locally.How to Reproduce?
Exact lines / errors (paths shortened to the repository root):
Anything Else?
96fd1e9bd2,1db4b1d305,9f3b084a75(Aug–Sep 2026) andhierarchical_data_iterator_test.cppwas changed by388c93aa8a([feature](variant) Enable Variant V2 by default, [feature](variant) Enable Variant V2 by default #66858, 2026-09-14). macOS CI intentionally skipsbe/test, so these went unnoticed.%lld/%lluor thePRI*macros,reinterpret_cast<char*>formincore,#if defined(__linux__)aroundposix_fadvise, explicitstd::min<uint64_t>/casts, add the missingEqual::operator()(uint32_t, std::string_view)or drop heterogeneous lookup for that bench, and#include <charconv>inip_address_cidr.h); and/orbe/test/CMakeLists.txt—if (OS_MACOSX) list(REMOVE_ITEM UT_FILES ${CMAKE_CURRENT_SOURCE_DIR}/util/system_metrics_test.cpp) endif()— with the files above.Are you willing to submit PR?
Code of Conduct