robll-v1 commented on issue #68404:
URL: https://github.com/apache/doris/issues/68404#issuecomment-5788689268

   Thanks for the triage — confirming the two configuration-sensitive failures 
with concrete evidence, plus one correction.
   
   **1) Faiss include on Apple: confirmed, and it is the `-force_load` code 
path**
   
   `be/test/CMakeLists.txt:168-180` is exactly as described: the Apple branch 
passes the archive as a raw link flag
   
   ```cmake
   if (APPLE)
       target_link_libraries(doris_be_test ${TEST_LINK_LIBS}
           -Wl,-force_load,$<TARGET_FILE:vector_search_test>)
       add_dependencies(doris_be_test vector_search_test)
   else()
       target_link_libraries(doris_be_test ${TEST_LINK_LIBS}
           -Wl,--whole-archive vector_search_test -Wl,--no-whole-archive)
   endif()
   ```
   
   so `vector_search_test`'s INTERFACE usage requirements (`ann_index -> faiss` 
include dirs) never reach `doris_be_test` compilation on Apple, while the 
non-Apple branch passes `vector_search_test` as a target name and does 
propagate them.
   
   The failing TU's recorded command (from 
`be/ut_build_ASAN/compile_commands.json` created by `run-be-ut.sh`) abridges to:
   
   ```
   ... -I<repo>/be/src -I<repo>/be/test ... -isystem 
<repo>/thirdparty/installed/include ...
   ```
   
   with no faiss include directory anywhere, matching that explanation.
   
   **2) `__COUNTER__`: tag name and blast radius**
   
   With clang 23.1.1 the diagnostic is `-Wc2y-extensions` on this revision, not 
`-Wcounter-extension`:
   
   ```
   $ clang++ -std=gnu++20 -Wpedantic -Werror -c counter.cpp
   counter.cpp:1:18: error: '__COUNTER__' is a C2y extension 
[-Werror,-Wc2y-extensions]
   
   $ clang++ -std=gnu++20 -Wpedantic -Werror -Wno-counter-extension -c 
counter.cpp
   error: unknown warning option '-Wno-counter-extension'; did you mean 
'-Wno-openacc-extension'? [-Werror,-Wunknown-warning-option]
   ```
   
   Also, this is not limited to `be/test`: with clang 23 the production BE 
build fails the same way — `./build.sh --be` stops at 
`be/src/runtime/memory/lru_cache_policy.h:177` and 
`be/src/storage/segment/variant/hierarchical_data_iterator.h:174` 
(`SCOPED_TIMER`/`SCOPED_RAW_TIMER` expand `__COUNTER__`), and a syntax-only 
sweep of `be/src` reports ~642 sites in total.
   
   One implementation note for whoever fixes it: adding `-Wno-*` to 
`CMAKE_CXX_FLAGS`/`EXTRA_CXX_FLAGS` is ineffective, because `be/CMakeLists.txt` 
appends `-Wpedantic` later on the command line and that re-enables the 
diagnostic group (last match wins). A `#pragma clang diagnostic ignored` or a 
flag appended *after* the project's `-Wpedantic` is required.
   
   **3) `snii_vs_v3_benchmark_test.cpp`**
   
   Agreed — a Darwin no-op `posix_fadvise` would silently invalidate the 
benchmark's cold-page-cache contract, so it is not an acceptable upstream fix. 
I only used that shim locally as a temporary probe to enumerate the remaining 
failing TUs. Excluding this disabled benchmark on macOS (or implementing a 
verified Darwin cold-read path) is the right call.
   
   **4) macOS CI**
   
   Also agree that at least a compile-only `doris_be_test` step in the macOS 
workflow would be worth it — that is the only thing that would have caught this 
class of regression, given the job deliberately sets `-DMAKE_TEST=OFF` since 
#65796.
   
   Happy to prepare a PR along the lines of your option 1 (`PRIu64`-style 
formatting, symmetric comparator mirroring `OwnedVocabEq` in 
`spimi_term_buffer.h`, explicit `std::min<uint64_t>`, `#include <charconv>` in 
`ip_address_cidr.h`), and to either fix the Apple `-force_load` linkage or 
exclude `snii_vs_v3_benchmark_test.cpp` on macOS as you prefer.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to