cyb70289 commented on issue #47229:
URL: https://github.com/apache/arrow/issues/47229#issuecomment-3384204962

   Set `MI_NO_OPT_ARCH=ON` does fix this issue per my test.
   Same as Try 2 from @gobes. But re-run cmake doesn't update the flag, must 
delete the build dir first.
   
   ```
   # default build throws illegal instruction
   ~/arrow/python$ qemu-aarch64 -cpu cortex-a72 `which python` -c "import 
pyarrow as pa; print(pa.__version__)"
   qemu: uncaught target signal 4 (Illegal instruction) - core dumped
   Illegal instruction (core dumped)
   
   # rebuild with this patch
   diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   index 2b9b2a7..a3f08d8 100644
   --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
   +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
   @@ -2294,7 +2294,8 @@ if(ARROW_MIMALLOC)
          -DMI_LOCAL_DYNAMIC_TLS=ON
          -DMI_BUILD_OBJECT=OFF
          -DMI_BUILD_SHARED=OFF
   -      -DMI_BUILD_TESTS=OFF)
   +      -DMI_BUILD_TESTS=OFF,
   +      -DMI_NO_OPT_ARCH=ON)
    
      externalproject_add(mimalloc_ep
                          ${EP_COMMON_OPTIONS}
   
   # verify patch is effective after build
   ~/arrow/cpp/build$ grep MI_NO_OPT_ARCH 
./mimalloc_ep-prefix/src/mimalloc_ep-build/CMakeCache.txt
   MI_NO_OPT_ARCH:BOOL=ON
   
   # new build works okay
   ~/arrow/python$ qemu-aarch64 -cpu cortex-a72 `which python` -c "import 
pyarrow as pa; print(pa.__version__)"
   22.0.0a1.dev1+gfcf3b4bde.d20251009
   ```


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