Skip to content
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-38653: [Packaging][Java][Python][Ruby] Raise the minimum macOS version to 10.15 catalina to allow using new APIs in C++17 #38677

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

niyue
Copy link
Contributor

@niyue niyue commented Nov 10, 2023

Rationale for this change

For macOS, some new APIs in C++17, e.g. std::filesystem::path is only visible when the compiling target is >= macOS 10.15 (Catalina). But currently the minimum macOS target is set to 10.14 (Mojave).

  • macOS 10.14 Mojave was released on 2018-09-24 [1]
  • macOS 10.15 Catalina was released on 2019-10-07 [2]
  • Both macOS 10.14 and 10.15 are end of life [3]

There is a similar issue [4] and its fix [5] for ClickHouse on year 2020, which raised minimum macOS version from 10.14 to 10.15.

What changes are included in this PR?

Raise the minimum macOS version from 10.14 to 10.15

Are these changes tested?

This should be tested and verified on CI.

Are there any user-facing changes?

  • Users using macOS <= 10.14 may not able to run these CI jobs locally.
  • The new version of python wheels may not be able to be deployed to environments with macOS <= 10.14 (not completely sure how this affects the deployment)
  • Closes: [Java][CI] Java Jars failing on MacOS #38653

References

Copy link

⚠️ GitHub issue #38653 has been automatically assigned in GitHub to PR creator.

@niyue
Copy link
Contributor Author

niyue commented Nov 11, 2023

I am not very familiar with CI scripts in the project, and I only search for "10.14" and replace the possible usages from "10.14" to "10.15", and if there is some usage missing in the PR, please let me know. Thanks.

@assignUser
Copy link
Member

assignUser commented Nov 11, 2023

We build arrow C++ on 10.13 for the R package, because CRAN still builds on that (hopefully only until next april...). We do this succesfully by disabeling availability checks by adding -D_LIBCPP_DISABLE_AVAILABILITY see r/configure.

In that case we have to support the massivly eol macOS version due to CRAN but in general I would be ok with raising the deployment target, that can probably also happen independently for each implementation depending on the eco system standard (e.g. for python iirc 10.14 or even 11 is normal?)

@kou kou changed the title GH-38653: Raise the minimum macOS version to 10.15 catalina to allow using new APIs in C++17 GH-38653: [Packaging][Java][Python][Ruby] Raise the minimum macOS version to 10.15 catalina to allow using new APIs in C++17 Nov 12, 2023
@kou
Copy link
Member

kou commented Nov 12, 2023

@github-actions crossbow submit java-jars -g wheel

Copy link

Revision: a46e6eb

Submitted crossbow builds: ursacomputing/crossbow @ actions-b9ab40b2df

Task Status
java-jars Github Actions
wheel-macos-big-sur-cp310-arm64 Github Actions
wheel-macos-big-sur-cp311-arm64 Github Actions
wheel-macos-big-sur-cp312-arm64 Github Actions
wheel-macos-big-sur-cp38-arm64 Github Actions
wheel-macos-big-sur-cp39-arm64 Github Actions
wheel-macos-catalina-cp310-amd64 Github Actions
wheel-macos-catalina-cp311-amd64 Github Actions
wheel-macos-catalina-cp312-amd64 Github Actions
wheel-macos-catalina-cp38-amd64 Github Actions
wheel-macos-catalina-cp39-amd64 Github Actions
wheel-manylinux-2-28-cp310-amd64 Github Actions
wheel-manylinux-2-28-cp310-arm64 Github Actions
wheel-manylinux-2-28-cp311-amd64 Github Actions
wheel-manylinux-2-28-cp311-arm64 Github Actions
wheel-manylinux-2-28-cp312-amd64 Github Actions
wheel-manylinux-2-28-cp312-arm64 Github Actions
wheel-manylinux-2-28-cp38-amd64 Github Actions
wheel-manylinux-2-28-cp38-arm64 Github Actions
wheel-manylinux-2-28-cp39-amd64 Github Actions
wheel-manylinux-2-28-cp39-arm64 Github Actions
wheel-manylinux-2014-cp310-amd64 Github Actions
wheel-manylinux-2014-cp310-arm64 Github Actions
wheel-manylinux-2014-cp311-amd64 Github Actions
wheel-manylinux-2014-cp311-arm64 Github Actions
wheel-manylinux-2014-cp312-amd64 Github Actions
wheel-manylinux-2014-cp312-arm64 Github Actions
wheel-manylinux-2014-cp38-amd64 Github Actions
wheel-manylinux-2014-cp38-arm64 Github Actions
wheel-manylinux-2014-cp39-amd64 Github Actions
wheel-manylinux-2014-cp39-arm64 Github Actions
wheel-windows-cp310-amd64 Github Actions
wheel-windows-cp311-amd64 Github Actions
wheel-windows-cp312-amd64 Github Actions
wheel-windows-cp38-amd64 Github Actions
wheel-windows-cp39-amd64 Github Actions

@kou
Copy link
Member

kou commented Nov 13, 2023

It seems that we need the following:

diff --git a/dev/tasks/java-jars/github.yml b/dev/tasks/java-jars/github.yml
index 7dc53a35e..fbce12ee4 100644
--- a/dev/tasks/java-jars/github.yml
+++ b/dev/tasks/java-jars/github.yml
@@ -81,7 +81,7 @@ jobs:
          - { runs_on: ["macos-latest"], arch: "x86_64"}
          - { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], arch: "aarch_64" }
    env:
-      MACOSX_DEPLOYMENT_TARGET: "10.13"
+      MACOSX_DEPLOYMENT_TARGET: "10.15"
    steps:
      {{ macros.github_checkout_arrow()|indent }}
      - name: Set up Python

@kou
Copy link
Member

kou commented Nov 13, 2023

Or how about using https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/io_util.h instead of std::filesystem::path for now?

@niyue
Copy link
Contributor Author

niyue commented Nov 13, 2023

It seems that we need the following

Updated that file

@kou
Copy link
Member

kou commented Nov 13, 2023

@github-actions crossbow submit java-jars

Copy link

Revision: c131dbd

Submitted crossbow builds: ursacomputing/crossbow @ actions-8301fee69d

Task Status
java-jars Github Actions

@niyue
Copy link
Contributor Author

niyue commented Nov 13, 2023

Or how about using https://github.com/apache/arrow/blob/main/cpp/src/arrow/util/io_util.h instead of std::filesystem::path for now?

I am okay with that, and I can submit another PR for this change. Currently it is just an internal test file so I think it is easy to change. But we may have to document such requirement, otherwise, people submitting new PR may trigger similar issue accidentally later (I assume there are other classes in C++ 17 that could cause this issue, actually since arrow switched to C++17 for a while, I am a bit surprised that I am the first one having PR triggering such an issue).

Please let me know if this is needed and I am glad to submit a PR to revise the usage of std::filesystem::path to io_util.h

@kou
Copy link
Member

kou commented Nov 13, 2023

@raulcd I'm not sure that it's related but can we remove https://github.com/apache/arrow/releases/tag/apache-arrow-14.0.1.dev ?

The java-jars job failed by 14.0.1-SNAPSHOT related files:

https://github.com/ursacomputing/crossbow/actions/runs/6844812497/job/18609953970#step:6:2690

INFO] Scanning for projects...
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/arrow/arrow-bom/14.0.1-SNAPSHOT/maven-metadata.xml
Downloading from apache.snapshots: https://repository.apache.org/snapshots/org/apache/arrow/arrow-bom/14.0.1-SNAPSHOT/arrow-bom-14.0.1-SNAPSHOT.pom
Error: ] Some problems were encountered while processing the POMs:
Error:  Non-resolvable import POM: The following artifacts could not be resolved: org.apache.arrow:arrow-bom:pom:14.0.1-SNAPSHOT (absent): Could not find artifact org.apache.arrow:arrow-bom:pom:14.0.1-SNAPSHOT in apache.snapshots (https://repository.apache.org/snapshots) @ line 545, column 19
 @ 
Error:  The build could not read 1 project -> [Help 1]
Error:    
Error:    The project org.apache.arrow:arrow-java-root:14.0.1-SNAPSHOT (/Users/runner/work/crossbow/crossbow/arrow/java/pom.xml) has 1 error
Error:      Non-resolvable import POM: The following artifacts could not be resolved: org.apache.arrow:arrow-bom:pom:14.0.1-SNAPSHOT (absent): Could not find artifact org.apache.arrow:arrow-bom:pom:14.0.1-SNAPSHOT in apache.snapshots (https://repository.apache.org/snapshots) @ line 545, column 19 -> [Help 2]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Error:  [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Error: Process completed with exit code 1.

@kou
Copy link
Member

kou commented Nov 13, 2023

@niyue Could you try io_util.h approach for now? It may be easier than this approach...

We may want to set MACOSX_DEPLOYMENT_TARGET=10.13 or something in .github/workflows/cpp.yml to detect similar problems before we merge a PR...:

diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index e6ae6c60b..daf77935b 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -181,6 +181,7 @@ jobs:
       ARROW_WITH_ZLIB: ON
       ARROW_WITH_ZSTD: ON
       GTest_SOURCE: BUNDLED
+      MACOSX_DEPLOYMENT_TARGET: "10.13"
     steps:
       - name: CPU Info
         run: |

@raulcd
Copy link
Member

raulcd commented Nov 13, 2023

@raulcd I'm not sure that it's related but can we remove https://github.com/apache/arrow/releases/tag/apache-arrow-14.0.1.dev ?

I've deleted it, I still have to bump-versions after 14.0.1 but I don't think this tag should be necessary.

@raulcd
Copy link
Member

raulcd commented Nov 13, 2023

@github-actions crossbow submit java-jars

Copy link

Revision: c131dbd

Submitted crossbow builds: ursacomputing/crossbow @ actions-cd86a2e13a

Task Status
java-jars Github Actions

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kou kou merged commit 9e5c5b5 into apache:main Nov 14, 2023
17 checks passed
@kou kou removed the awaiting review Awaiting review label Nov 14, 2023
@github-actions github-actions bot added the awaiting merge Awaiting merge label Nov 14, 2023
@kou
Copy link
Member

kou commented Nov 14, 2023

@niyue Hmm. It seems that std::filesystem::path has a problem on AlmaLinux 8: verify-rc-source-cpp-linux-almalinux-8-amd64

https://lists.apache.org/thread/rbfqs9fzy66rv509wjx5j10z5ygqvvnx

https://github.com/ursacomputing/crossbow/actions/runs/6840785973/job/18600423664#step:6:8858

FAILED: release/gandiva-internals-test 
: && /usr/bin/c++ -Wno-noexcept-type  -fdiagnostics-color=always  -Wall -fno-semantic-interposition -msse4.2  -O3 -DNDEBUG -O2 -ftree-vectorize  src/gandiva/CMakeFiles/gandiva-internals-test.dir/bitmap_accumulator_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/engine_llvm_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/function_registry_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/function_signature_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/llvm_types_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/llvm_generator_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/annotator_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/tree_expr_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/encrypt_utils_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/expr_decomposer_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/exported_funcs_registry_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/expression_registry_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/selection_vector_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/lru_cache_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/to_date_holder_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/simple_arena_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/regex_functions_holder_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/decimal_type_util_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/random_generator_holder_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/hash_utils_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/gdv_function_stubs_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/interval_holder_test.cc.o src/gandiva/CMakeFiles/gandiva-internals-test.dir/tests/test_util.cc.o -o release/gandiva-internals-test  -Wl,-rpath,/tmp/arrow-HEAD.tNBaF/cpp-build/release  release/libgandiva.so.1500.0.0  release/libarrow_testing.so.1500.0.0  release/libarrow.so.1500.0.0  /usr/lib64/libcrypto.so  /usr/lib64/libssl.so  brotli_ep/src/brotli_ep-install/lib/libbrotlienc-static.a  brotli_ep/src/brotli_ep-install/lib/libbrotlidec-static.a  brotli_ep/src/brotli_ep-install/lib/libbrotlicommon-static.a  orc_ep-install/lib/liborc.a  protobuf_ep-install/lib/libprotobuf.a  utf8proc_ep-install/lib/libutf8proc.a  re2_ep-install/lib/libre2.a  -ldl  release/libarrow_gmock.so.1.11.0  release/libarrow_gtest_main.so.1.11.0  -ldl  utf8proc_ep-install/lib/libutf8proc.a  /usr/lib64/libcrypto.so  lz4_ep-install/lib/liblz4.a  /usr/lib64/libz.so  snappy_ep/src/snappy_ep-install/lib/libsnappy.a  jemalloc_ep-prefix/src/jemalloc_ep/dist//lib/libjemalloc_pic.a  -lrt  /usr/lib64/libzstd.so  release/libarrow_gtest.so.1.11.0  -pthread  /usr/lib64/libLLVM-15.so && :
src/gandiva/CMakeFiles/gandiva-internals-test.dir/tests/test_util.cc.o: In function `gandiva::GetTestFunctionLLVMIRPath[abi:cxx11]()':
test_util.cc:(.text+0x420): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
test_util.cc:(.text+0x46f): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
test_util.cc:(.text+0x621): undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
test_util.cc:(.text+0x7d4): undefined reference to `std::filesystem::__cxx11::path::has_filename() const'
test_util.cc:(.text+0x85a): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
collect2: error: ld returned 1 exit status

Could you open a new issue for this and use io_util.h for now?

@niyue
Copy link
Contributor Author

niyue commented Nov 14, 2023

Could you open a new issue for this and use io_util.h for now?

Sure.
The issue: #38697
The PR: #38698

Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 9e5c5b5.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…OS version to 10.15 catalina to allow using new APIs in C++17 (apache#38677)

### Rationale for this change
For macOS, some new APIs in C++17, e.g. `std::filesystem::path` is only visible when the compiling target is >= macOS 10.15 (Catalina). But currently the minimum macOS target is set to 10.14 (Mojave).

* macOS 10.14 Mojave was released on 2018-09-24 [1] 
* macOS 10.15 Catalina was released on 2019-10-07 [2]
* Both macOS 10.14 and 10.15 are end of life [3]

There is a [similar issue](ClickHouse/ClickHouse#8541) [4] and [its fix](ClickHouse/ClickHouse#8600) [5] for ClickHouse on year 2020, which raised minimum macOS version from 10.14 to 10.15.

### What changes are included in this PR?
Raise the minimum macOS version from 10.14 to 10.15

### Are these changes tested?
This should be tested and verified on CI.
 
### Are there any user-facing changes?
* Users using macOS <= 10.14 may not able to run these CI jobs locally. 
* The new version of python wheels may not be able to be deployed to environments with macOS <= 10.14 (not completely sure how this affects the deployment)
* Closes: apache#38653

### References
* [1] https://en.wikipedia.org/wiki/MacOS_Mojave
* [2] https://en.wikipedia.org/wiki/MacOS_Catalina
* [3] https://endoflife.date/macos 
* [4] ClickHouse/ClickHouse#8541
* [5] ClickHouse/ClickHouse#8600

Authored-by: Yue Ni <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Java][CI] Java Jars failing on MacOS
4 participants