Skip to content

Commit

Permalink
apacheGH-41696: [Python][Packaging] Bump MACOSX_DEPLOYMENT_TARGET to …
Browse files Browse the repository at this point in the history
…12 instead of 11 (apache#43137)

### Rationale for this change

As shown on the associated issue there seems to be a problem with `MACOSX_DEPLOYMENT_TARGET` 11 on the wheels.

### What changes are included in this PR?

Update `MACOSX_DEPLOYMENT_TARGET` everywhere to the latest supported macOS version.

### Are these changes tested?

Via CI, even though the issue was not reproducible on CI.

### Are there any user-facing changes?

Yes, wheels won't be available for macOS 11 but those were crashing on the previous release.
* GitHub Issue: apache#41696

Authored-by: Raúl Cumplido <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
  • Loading branch information
raulcd authored Aug 29, 2024
1 parent 3089387 commit 6db12f2
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
ARROW_BUILD_TESTS: OFF
PYARROW_TEST_LARGE_MEMORY: ON
# Current oldest supported version according to https://endoflife.date/macos
MACOSX_DEPLOYMENT_TARGET: 10.15
MACOSX_DEPLOYMENT_TARGET: 12.0
steps:
- name: Checkout Arrow
uses: actions/checkout@v4
Expand Down
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.15}
export MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-12.0}
export SDKROOT=${SDKROOT:-$(xcrun --sdk macosx --show-sdk-path)}

if [ $arch = "arm64" ]; then
Expand Down
2 changes: 1 addition & 1 deletion ci/vcpkg/arm64-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 arm64)
set(VCPKG_OSX_DEPLOYMENT_TARGET "11.0")
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")

set(VCPKG_BUILD_TYPE debug)
2 changes: 1 addition & 1 deletion ci/vcpkg/arm64-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 arm64)
set(VCPKG_OSX_DEPLOYMENT_TARGET "11.0")
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")

set(VCPKG_BUILD_TYPE release)
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.15")
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")

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.15")
set(VCPKG_OSX_DEPLOYMENT_TARGET "12.0")

set(VCPKG_BUILD_TYPE release)
6 changes: 6 additions & 0 deletions cpp/src/arrow/flight/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ endif()
if(WIN32)
list(APPEND ARROW_FLIGHT_LINK_LIBS ws2_32.lib)
endif()
# Updating the MACOSX_DEPLOYMENT_TARGET to 12 required us to explicitly
# link Flight with OpenSSL on macOS. Read this comment for more details:
# https://github.com/apache/arrow/pull/43137#pullrequestreview-2267476893
if(APPLE AND ARROW_USE_OPENSSL)
list(APPEND ARROW_FLIGHT_LINK_LIBS ${ARROW_OPENSSL_LIBS})
endif()

set(ARROW_FLIGHT_TEST_LINKAGE "${ARROW_TEST_LINKAGE}")
if(Protobuf_USE_STATIC_LIBS)
Expand Down
10 changes: 5 additions & 5 deletions dev/tasks/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ tasks:

{############################## Wheel macOS ####################################}

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

wheel-macos-{{ macos_codename }}-{{ python_tag }}-amd64:
Expand All @@ -424,25 +424,25 @@ tasks:
arrow_jemalloc: "ON"
python_version: "{{ python_version }}"
macos_deployment_target: "{{ macos_version }}"
runs_on: "macos-13"
runs_on: "macos-12"
vcpkg_arch: "amd64"
artifacts:
- pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-{{ platform_tag }}.whl

{% endfor %}

wheel-macos-big-sur-{{ python_tag }}-arm64:
wheel-macos-monterey-{{ python_tag }}-arm64:
ci: github
template: python-wheels/github.osx.yml
params:
arch: "arm64"
arrow_jemalloc: "OFF"
python_version: "{{ python_version }}"
macos_deployment_target: "11.0"
macos_deployment_target: "12.0"
runs_on: "macos-14"
vcpkg_arch: "arm64"
artifacts:
- pyarrow-{no_rc_version}-{{ python_tag }}-{{ python_tag }}-macosx_11_0_arm64.whl
- pyarrow-{no_rc_version}-{{ python_tag }}-{{ python_tag }}-macosx_12_0_arm64.whl

{############################## Wheel Windows ################################}

Expand Down
2 changes: 1 addition & 1 deletion dev/tasks/verify-rc/github.macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% set use_conda = use_conda|default(False) %}
# env: is generated by macros.github_header()
# Current oldest supported version according to https://endoflife.date/macos
MACOSX_DEPLOYMENT_TARGET: "10.15"
MACOSX_DEPLOYMENT_TARGET: "12.0"

jobs:
verify:
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.15)
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0)
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 @@ -91,7 +91,7 @@
symbols_in_external_bundles.each do |symbol|
$DLDFLAGS << " -Wl,-U,#{symbol}"
end
mmacosx_version_min = "-mmacosx-version-min=10.15"
mmacosx_version_min = "-mmacosx-version-min=12.0"
$CFLAGS << " #{mmacosx_version_min}"
$CXXFLAGS << " #{mmacosx_version_min}"
end
Expand Down

0 comments on commit 6db12f2

Please sign in to comment.