-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C++] Bundled GTest CI jobs seem to #include
ing GTest headers from somewhere else
#36379
Comments
FWIW, that pipeline also installs GTest via Homebrew. We've seen similar issues before when we had both Conda-installed and bundled GTest in the same build (because we stuck the Conda include directory early on in the search path). |
The same link error occurs on the manylinux JNI job. I'll update the description with a more informative listing of the link errors |
The problem is actually more subtle: when the dependency's source is AUTO, ThirdpartyToolchain.cmake checks for a compatible system package. If the system package is not compatible, it will build a bundled version. arrow/cpp/cmake_modules/ThirdpartyToolchain.cmake Lines 287 to 292 in ad7f6ef
Building the bundled dependency adds its include directories... but it appends them so include directories which are already added have precedence. In this case the incompatible gtest headers from the conda environment are not being overridden by the bundled headers. It should be sufficient to use |
I'm not sure how this interacts with #37483 yet. Among other things bundled gtest is no longer built as an ExternalProject. I'll open a PR using target_include_directories+BEFORE for the dependencies which still are ExternalProjects |
Nevermind, FetchContent_MakeAvailable does produce an ExternalProject. |
…em include dirs (#37612) ### Rationale for this change Bundled dependencies' include directories should override system include dirs. Otherwise an incompatible header in the system might be included when we wanted a header from the bundled dependency. ### What changes are included in this PR? bundled dependencies explicitly insert their own include dirs ahead of others * Closes: #36379 Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…e system include dirs (apache#37612) ### Rationale for this change Bundled dependencies' include directories should override system include dirs. Otherwise an incompatible header in the system might be included when we wanted a header from the bundled dependency. ### What changes are included in this PR? bundled dependencies explicitly insert their own include dirs ahead of others * Closes: apache#36379 Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
…e system include dirs (apache#37612) ### Rationale for this change Bundled dependencies' include directories should override system include dirs. Otherwise an incompatible header in the system might be included when we wanted a header from the bundled dependency. ### What changes are included in this PR? bundled dependencies explicitly insert their own include dirs ahead of others * Closes: apache#36379 Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Describe the bug, including details regarding any error messages, version, and platform.
In #36334 I saw link errors in some CI jobs which build bundled GTest:
The symbol which is undefined is the internal FormatMatcherDescription function. That function is present in the bundled version of GTest (v1.11), but its signature is different in that version.
This suggests that somehow although we're building GTest v1.11 the tests are
#include
ing headers from a more recent version of GTest and we just haven't noticed before now.Component(s)
C++
The text was updated successfully, but these errors were encountered: