-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-37067: [C++] Install bundled GoogleTest #37483
Conversation
a00e50a
to
763a7e9
Compare
@github-actions crossbow submit test-debian-11-* test-ubuntu-22.04-* |
This comment was marked as outdated.
This comment was marked as outdated.
c0d00c9
to
5e13c25
Compare
@github-actions crossbow submit test-debian-11-* test-ubuntu-22.04-* |
Revision: 5e13c25 Submitted crossbow builds: ursacomputing/crossbow @ actions-311479b333 |
Thanks for working on this @kou! It seems that the C++ tests are failing for the macOS MATLAB build. Unfortunately the reason for the failure isn't obvious from the build logs. @sgilmore10 and I working on trying to reproduce this failure locally. |
@sgilmore10 and I did manage to reproduce the test failures locally on macOS. Here is the log output (note I replaced some personal information from the file paths with "..." ): dyld[26962]: Library not loaded: libarrow_gtest.1.11.0.dylib
Referenced from: <02638200-BA25-3D9D-AF66-D4C71F49AEFC> /System/Volumes/Data/.../arrow/matlab/build/placeholder_test
Reason: tried: 'libarrow_gtest.1.11.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibarrow_gtest.1.11.0.dylib' (no such file), 'libarrow_gtest.1.11.0.dylib' (no such file), '/usr/local/lib/libarrow_gtest.1.11.0.dylib' (no such file), '/usr/lib/libarrow_gtest.1.11.0.dylib' (no such file, not in dyld cache), '/System/Volumes/Data/.../arrow/matlab/build/libarrow_gtest.1.11.0.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Volumes/Data/.../arrow/matlab/build/libarrow_gtest.1.11.0.dylib' (no such file), '/System/Volumes/Data/.../arrow/matlab/build/libarrow_gtest.1.11.0.dylib' (no such file), '/usr/local/lib/libarrow_gtest.1.11.0.dylib' (no such file), '/usr/lib/libarrow_gtest.1.11.0.dylib' (no such file, not in dyld cache) It appears that the linker is unable to find It seems that the linker is not searching in |
It seems like this is some kind of CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
gmock
gmock_main
gtest
gtest_main |
Hi @kou @kevingurney and I spent some more time investigating this failure. Here's what we found:
>> ldd placeholder_test
placeholder_test:
libarrow_gtest.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
libarrow_gtest_main.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
>> ldd placeholder_test
placeholder_test:
</path/to/repo>/arrow/matlab/build/arrow_ep-build/googletest_ep-prefix/lib/libgtest.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
</path/to/repo>/arrow/matlab/build/arrow_ep-build/googletest_ep-prefix/lib/libgtest_main.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0) Note: I replaced some personal information with
With those changes, the executable runs as expected: Internal ctest changing into directory: <path/to/repo>/arrow/matlab/build
Test project <path/to/repo>/arrow/matlab/build
Start 1: PlaceholderTestTarget
1/1 Test #1: PlaceholderTestTarget ............ Passed 0.01 sec
100% tests passed, 0 tests failed out of 1
Total Test time (real) = 0.03 sec
placeholder_test:
@rpath/libarrow_gtest.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
@rpath/libarrow_gtest_main.1.11.0.dylib (compatibility version 0.0.0, current version 1.11.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0) I'm not sure if this solution is the right one, but wanted to share with you what we found. Best, |
Because `libarrow*_testing.so` depend it.
633b61e
to
4fff568
Compare
@kevingurney @sgilmore10 Thanks for your help! It's very helpful. I'll use the BTW, it seems that we can remove GoogleTest support from |
Ah, do we need to set both of |
Yes, I had to set both to get it to work. |
I think we want to keep the GoogleTest support for now because we do plan on adding C++ unit tests. There are a few error-conditions that cannot be triggered from MATLAB for which we want to add C++ unit tests. |
I agree with @sgilmore10. I don't think it would be ideal to completely remove GoogleTest because C++ tests would be beneficial for the MATLAB interface. |
@kou - sorry! I accidentally hit the "Close with comment" button rather than the "Comment" button. I just reopened the pull request. |
@sgilmore10 @kevingurney I see. I don't remove the GoogleTest support in |
I'll merge this in this week if nobody objects this. |
Thanks! It worked by adding |
@kou - very sorry for the delayed response. I was out sick at the end of last week and am just getting caught up now. These changes look good! Thanks for bringing up the GoogleTest question and capturing it in #37532. After further consideration, we agree that it is worth thinking more about removing GoogleTest. As you suggested, we can discuss this in more detail on #37532. Thank you! |
+1 |
No problem. I'm not in hurry. :-) Thanks for your approvement. I merge this. |
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit ad7f6ef. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about possible false positives for unstable benchmarks that are known to sometimes produce them. |
@github-actions crossbow submit java-jars |
Revision: 52138c1 Submitted crossbow builds: ursacomputing/crossbow @ actions-e36e4f51b2
|
### Rationale for this change Because `libarrow*_testing.so` depend it. If we don't install bundled GoogleTest, users can't use `libarrow*_testing.so`. ### What changes are included in this PR? If we install bundled GoogleTest as-is, it may conflict existing GoogleTest. So this PR renames GoogleTest when we install GoogleTest: * `lib{gtest,gtest_main,gmock,gmock_main}.so` -> `libarrow_{gtest,gtest_main,gmock,gmock_main}.so` * `${PREFIX}/include/{gtest,gmock}/` -> `${PREFIX}/include/arrow-gtest/${gtest,gmock}/` Other CMake packages and `.pc` files aren't installed. `ArrowTesting` CMake package and `arrow-testing.pc` configures bundled GoogleTest instead. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: apache#37067 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
### Rationale for this change Because `libarrow*_testing.so` depend it. If we don't install bundled GoogleTest, users can't use `libarrow*_testing.so`. ### What changes are included in this PR? If we install bundled GoogleTest as-is, it may conflict existing GoogleTest. So this PR renames GoogleTest when we install GoogleTest: * `lib{gtest,gtest_main,gmock,gmock_main}.so` -> `libarrow_{gtest,gtest_main,gmock,gmock_main}.so` * `${PREFIX}/include/{gtest,gmock}/` -> `${PREFIX}/include/arrow-gtest/${gtest,gmock}/` Other CMake packages and `.pc` files aren't installed. `ArrowTesting` CMake package and `arrow-testing.pc` configures bundled GoogleTest instead. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * Closes: apache#37067 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Rationale for this change
Because
libarrow*_testing.so
depend it. If we don't install bundled GoogleTest, users can't uselibarrow*_testing.so
.What changes are included in this PR?
If we install bundled GoogleTest as-is, it may conflict existing GoogleTest. So this PR renames GoogleTest when we install GoogleTest:
lib{gtest,gtest_main,gmock,gmock_main}.so
->libarrow_{gtest,gtest_main,gmock,gmock_main}.so
${PREFIX}/include/{gtest,gmock}/
->${PREFIX}/include/arrow-gtest/${gtest,gmock}/
Other CMake packages and
.pc
files aren't installed.ArrowTesting
CMake package andarrow-testing.pc
configures bundled GoogleTest instead.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.