kszucs commented on a change in pull request #10659:
URL: https://github.com/apache/arrow/pull/10659#discussion_r664170706
##########
File path: ci/scripts/python_wheel_macos_build.sh
##########
@@ -62,14 +62,18 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries
==="
mkdir -p ${build_dir}/build
pushd ${build_dir}/build
+
cmake \
+ -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 \
Review comment:
We don't need to use the `CMAKE_SYSTEM_*` variables.
##########
File path: ci/scripts/python_wheel_macos_build.sh
##########
@@ -62,14 +62,18 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries
==="
mkdir -p ${build_dir}/build
pushd ${build_dir}/build
+
cmake \
+ -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 \
-DARROW_BUILD_SHARED=ON \
+ -DARROW_SIMD_LEVEL=${ARROW_SIMD_LEVEL} \
+ -DARROW_RUNTIME_SIMD_LEVEL=NONE \
-DARROW_BUILD_STATIC=OFF \
-DARROW_BUILD_TESTS=OFF \
-DARROW_DATASET=${ARROW_DATASET} \
-DARROW_DEPENDENCY_SOURCE="VCPKG" \
-DARROW_DEPENDENCY_USE_SHARED=OFF \
- -DARROW_FLIGHT==${ARROW_FLIGHT} \
+ -DARROW_FLIGHT=${ARROW_FLIGHT} \
Review comment:
`gRPC` is not supported on apple silicon at the moment
##########
File path: ci/vcpkg/arm64-osx-static-release.cmake~
##########
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set(VCPKG_TARGET_ARCHITECTURE x64)
Review comment:
Need to remove this file.
##########
File path: cpp/cmake_modules/FindSnappyAlt.cmake
##########
@@ -0,0 +1,117 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set(find_package_args)
Review comment:
Actually this snappy change wasn't required after using
`CMAKE_APPLE_SILICON_PROCESSOR`
##########
File path: wheel.sh
##########
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+arrow_dir=$1
+build_dir=$2
+
+export ARROW_FLIGHT=OFF
+export ARROW_JEMALLOC=OFF
+export ARROW_SIMD_LEVEL=NONE
+export BUILD_PREFIX=$build_dir
Review comment:
If we don't set `BUILD_PREFIX` to a non-existing location then
[multibuild will set it to
/usr/local](https://github.com/matthew-brett/multibuild/blob/devel/configure_build.sh#L71-L80)
causing a pretty misleading cmake issue.
CMake tries to locate numpy's include path [by importing
it](https://github.com/Kitware/CMake/blob/v3.19.2/Modules/FindPython/Support.cmake#L3075)
swallowing any errors. If `BUILD_PREFIX` is set to `/usr/local` then
multibuild will prepend `PATH` by `/usr/local/bin` which is brew's `x86_64`
installation prefix. This causes the shell script to call the `x86_64` variant
of `cmake` instead of the `arm64` one under `/opt/homebrew/bin` which calls the
universal2 python binary as `x86_64` where importing an `arm64` compiled numpy
will fail, but silently, making CMake unable to locate numpy for both compiling
libarrow_python and pyarrow.
##########
File path: ci/scripts/python_wheel_macos_build.sh
##########
@@ -62,14 +62,18 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries
==="
mkdir -p ${build_dir}/build
pushd ${build_dir}/build
+
cmake \
+ -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 \
-DARROW_BUILD_SHARED=ON \
+ -DARROW_SIMD_LEVEL=${ARROW_SIMD_LEVEL} \
+ -DARROW_RUNTIME_SIMD_LEVEL=NONE \
Review comment:
Remove this during the cleanup.
##########
File path: wheel.sh
##########
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+arrow_dir=$1
+build_dir=$2
+
+export ARROW_FLIGHT=OFF
+export ARROW_JEMALLOC=OFF
+export ARROW_SIMD_LEVEL=NONE
+export BUILD_PREFIX=$build_dir
+export CONFIG_PATH=/dev/null
+export MACOSX_DEPLOYMENT_TARGET=11.0
+export MB_PYTHON_VERSION=3.9
+export PLAT=arm64
Review comment:
The produced wheel has universal2 platform tag, though my original plan
is to provide a pure arm64 wheel in the first iteration.
##########
File path: wheel.sh
##########
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+arrow_dir=$1
+build_dir=$2
+
+export ARROW_FLIGHT=OFF
+export ARROW_JEMALLOC=OFF
+export ARROW_SIMD_LEVEL=NONE
+export BUILD_PREFIX=$build_dir
+export CONFIG_PATH=/dev/null
+export MACOSX_DEPLOYMENT_TARGET=11.0
+export MB_PYTHON_VERSION=3.9
+export PLAT=arm64
Review comment:
Tried `export ARCHFLAGS=" -arch arm64"`, but still.
##########
File path: wheel.sh
##########
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+arrow_dir=$1
+build_dir=$2
+
+export ARROW_FLIGHT=OFF
+export ARROW_JEMALLOC=OFF
+export ARROW_SIMD_LEVEL=NONE
+export BUILD_PREFIX=$build_dir
+export CONFIG_PATH=/dev/null
+export MACOSX_DEPLOYMENT_TARGET=11.0
+export MB_PYTHON_VERSION=3.9
+export PLAT=arm64
Review comment:
Tried to `export ARCHFLAGS=" -arch arm64"`, but still.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]