-
Notifications
You must be signed in to change notification settings - Fork 483
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
ORC-1732: [C++] Fix detecting Homebrew-installed Protobuf on MacOS #1963
Conversation
@kou Could you help review this? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding a CI job on macOS?
https://github.com/apache/orc/compare/main...kou:orc:cpp-protobuf?expand=1#diff-48c0ee97c53013d18d6bbae44648f7fab9af2e0bf5b0dc1ca761e18ec5c478f2R101-R133 is a sample configuration.
cmake_modules/FindProtobuf.cmake
Outdated
message(FATAL_ERROR "Cannot determine Protobuf include directory.") | ||
endif () | ||
|
||
if (Protobuf_LIBRARIES MATCHES "\\.a$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may be able to use https://cmake.org/cmake/help/latest/variable/CMAKE_STATIC_LIBRARY_SUFFIX.html instead of .a
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at that, '.a' has been replaced with CMAKE_STATIC_LIBRARY_SUFFIX
cmake_modules/FindProtobuf.cmake
Outdated
if (NOT PROTOBUF_INCLUDE_DIR) | ||
set (PROTOBUF_INCLUDE_DIR ${Protobuf_INCLUDE_DIRS}) | ||
if (NOT PROTOBUF_INCLUDE_DIR) | ||
message(FATAL_ERROR "Cannot determine Protobuf include directory.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about showing detection sources too for easy to debug?
message(FATAL_ERROR "Cannot determine Protobuf include directory.") | |
message(FATAL_ERROR "Cannot determine Protobuf include directory from protobuf::libprotobuf and Protobuf_INCLUDE_DIRS.") |
The new github action doesn't run. I found the error message below:
https://github.com/apache/orc/actions/runs/9746489872 |
Co-authored-by: Gang Wu <ustcwg@gmail.com>
Co-authored-by: Gang Wu <ustcwg@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
.github/workflows/build_and_test.yml
Outdated
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [12, 14] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we skip 13
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no significant difference between 13 and 12 for C++ compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, please add 13 too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM.
### What changes were proposed in this pull request? Detect Protobuf installed by Homebrew on macOS. ### Why are the changes needed? Deal with the issue discussed [here](apache/arrow#42149) ### How was this patch tested? Test it locally. ### Was this patch authored or co-authored using generative AI tooling? NO Closes #1963 from luffy-zh/ORC-1732. Lead-authored-by: luffy-zh <zhnice@outlook.com> Co-authored-by: Hao Zou <34559830+luffy-zh@users.noreply.github.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit a9e0351) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
### Rationale for this change This PR aims to upgrade ORC to 2.0.3 to bring the following bug fixes. - https://orc.apache.org/news/2024/08/15/ORC-2.0.2/ - apache/orc#1963 - apache/orc#1997 - apache/orc#1981 - https://orc.apache.org/news/2024/11/14/ORC-2.0.3/ - apache/orc#2055 ### What changes are included in this PR? To use the latest bug fixed version. ### Are these changes tested? This should pass the CIs. ### Are there any user-facing changes? No. * GitHub Issue: #44744 Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
What changes were proposed in this pull request?
Detect Protobuf installed by Homebrew on macOS.
Why are the changes needed?
Deal with the issue discussed here
How was this patch tested?
Test it locally.
Was this patch authored or co-authored using generative AI tooling?
NO