Skip to content

numpy 2.0.1 build issue on ibm AIX OS  #27531

@Ganeshkumhar1

Description

@Ganeshkumhar1

Describe the issue:

I am trying to build numpy 2.0.1 on AIX OS with ibm-clang_r compiler. numpy is using meson build in this version and I am hitting issue -

$ python -m build --wheel --no-isolation .

  • Getting build dependencies for wheel...
  • Building wheel...
  • /tmp/3392379693/python/bin/python /home/user/numpy/2.0.1/numpy-2.0.1/vendored-meson/meson/meson.py setup /home/user/numpy/2.0.1/numpy-2.0.1 /home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i/meson-python-native-file.ini
    The Meson build system
    Version: 1.4.99
    Source dir: /home/user/numpy/2.0.1/numpy-2.0.1
    Build dir: /home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i
    Build type: native build
    Project name: NumPy
    Project version: 2.0.1

../meson.build:1:0: ERROR: Unable to detect linker for compiler ibm-clang_r -Wl,--version -L/tmp/3392379693/python/lib -I/tmp/3392379693/python/include -I/tmp/3392379693/python/include/openssl
stdout:
stderr: ld: 0706-012 The -- flag is not recognized.
.ibm-clang: error: linker command failed with exit code 255 (use -v to see invocation)

seems linker ld on AIX does not support --version flag. tried few suggestion found on internet but could not get past this issue.

does meson build supported on AIX ? could some one please suggest way out from here?

PS - I was able to build numpy 1.26.4 which had setup.py . ( did not use meson build for this ) simply built whl file using python setup.py bdist_wheel, but with 2.0.1 this is not the case as setup.py is removed from this version and have to build using meson build.

Reproduce the code example:

$ python -m build --wheel --no-isolation .
* Getting build dependencies for wheel...
* Building wheel...
+ /tmp/3392379693/python/bin/python /home/user/numpy/2.0.1/numpy-2.0.1/vendored-meson/meson/meson.py setup /home/user/numpy/2.0.1/numpy-2.0.1 /home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i/meson-python-native-file.ini
The Meson build system
Version: 1.4.99
Source dir: /home/user/numpy/2.0.1/numpy-2.0.1
Build dir: /home/user/numpy/2.0.1/numpy-2.0.1/.mesonpy-5yatrh9i
Build type: native build
Project name: NumPy
Project version: 2.0.1

../meson.build:1:0: ERROR: Unable to detect linker for compiler `ibm-clang_r -Wl,--version -L/tmp/3392379693/python/lib -I/tmp/3392379693/python/include -I/tmp/3392379693/python/include/openssl`
stdout:
stderr: ld: 0706-012 The -- flag is not recognized.
.ibm-clang: error: linker command failed with exit code 255 (use -v to see invocation)

Error message:

No response

Python and NumPy Versions:

python version 3.12.6
numpy version 2.0.1

Runtime Environment:

No response

Context for the issue:

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions