ORC-1732: [C++] Fix detecting Homebrew-installed Protobuf on MacOS#1963
ORC-1732: [C++] Fix detecting Homebrew-installed Protobuf on MacOS#1963luffy-zh wants to merge 10 commits intoapache:mainfrom
Conversation
|
@kou Could you help review this? Thanks! |
kou
left a comment
There was a problem hiding this comment.
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.
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.
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.
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>
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.
There is no significant difference between 13 and 12 for C++ compilation.
### 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>
### 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