Skip to content

Commit

Permalink
apacheGH-38653: [Packaging][Java][Python][Ruby] Raise the minimum mac…
Browse files Browse the repository at this point in the history
…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 <niyue.com@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
niyue authored and dgreiss committed Feb 17, 2024
1 parent d218164 commit a88e013
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/scripts/python_wheel_macos_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ rm -rf ${source_dir}/python/pyarrow/*.so.*

echo "=== (${PYTHON_VERSION}) Set SDK, C++ and Wheel flags ==="
export _PYTHON_HOST_PLATFORM="macosx-${MACOSX_DEPLOYMENT_TARGET}-${arch}"
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-10.14}
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-10.15}
export SDKROOT=${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}

if [ $arch = "arm64" ]; then
Expand Down
2 changes: 1 addition & 1 deletion ci/vcpkg/universal2-osx-static-debug.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64")
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.14")
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.15")

set(VCPKG_BUILD_TYPE debug)
2 changes: 1 addition & 1 deletion ci/vcpkg/universal2-osx-static-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64")
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.14")
set(VCPKG_OSX_DEPLOYMENT_TARGET "10.15")

set(VCPKG_BUILD_TYPE release)
2 changes: 1 addition & 1 deletion dev/tasks/java-jars/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ tasks:

{############################## Wheel OSX ####################################}

{% for macos_version, macos_codename in [("10.14", "mojave")] %}
{% for macos_version, macos_codename in [("10.15", "catalina")] %}
{% set platform_tag = "macosx_{}_x86_64".format(macos_version.replace('.', '_')) %}

wheel-macos-{{ macos_codename }}-{{ python_tag }}-amd64:
Expand Down
2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ set(CMAKE_MACOSX_RPATH 1)
if(DEFINED ENV{MACOSX_DEPLOYMENT_TARGET})
set(CMAKE_OSX_DEPLOYMENT_TARGET $ENV{MACOSX_DEPLOYMENT_TARGET})
else()
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)
endif()

# Generate a Clang compile_commands.json "compilation database" file for use
Expand Down
2 changes: 1 addition & 1 deletion ruby/red-arrow/ext/arrow/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
symbols_in_external_bundles.each do |symbol|
$DLDFLAGS << " -Wl,-U,#{symbol}"
end
mmacosx_version_min = "-mmacosx-version-min=10.14"
mmacosx_version_min = "-mmacosx-version-min=10.15"
$CFLAGS << " #{mmacosx_version_min}"
$CXXFLAGS << " #{mmacosx_version_min}"
end
Expand Down

0 comments on commit a88e013

Please sign in to comment.