apache / apache/arrow

[C++/Python] pyarrow build incorrectly detects x86 as system process during cross-cimpile

Open
#30,925 1 comment 0 reactions 0 assignees View on GitHub
Component: C++ Component: Python Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

When cross-compiling `pyarrow` for aarch64 or ppc64le we run into the following issue:
```java

-- System processor: x86_64
-- Performing Test CXX_SUPPORTS_SSE4_2
-- Performing Test CXX_SUPPORTS_SSE4_2 - Failed
-- Performing Test CXX_SUPPORTS_AVX2
-- Performing Test CXX_SUPPORTS_AVX2 - Failed
-- Performing Test CXX_SUPPORTS_AVX512
-- Performing Test CXX_SUPPORTS_AVX512 - Failed
-- Arrow build warning level: PRODUCTION
CMake Error at cmake_modules/SetupCxxFlags.cmake:456 (message):
SSE4.2 required but compiler doesn't support it.
Call Stack (most recent call first):
CMakeLists.txt:121 (include)

-- Configuring incomplete, errors occurred!

```
The error is valid as we are building for a target system that doesn't support SSE at all.

**Reporter**: [Uwe Korn](https://issues.apache.org/jira/browse/ARROW-15445) / @xhochy

**Note**: *This issue was originally created as [ARROW-15445](https://issues.apache.org/jira/browse/ARROW-15445). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with cmake_modules/SetupCxxFlags.cmake around line 456 and the inclusion from CMakeLists.txt:121, then reproduce configuration while cross-compiling pyarrow for aarch64 or ppc64le. Trace how CMake reports the system processor and evaluates SSE support; done means target builds no longer treat x86 features as required for non-x86 targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp, python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.