kszucs commented on a change in pull request #10659:
URL: https://github.com/apache/arrow/pull/10659#discussion_r664172803



##########
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.




-- 
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]


Reply via email to