Skip to content

BUG: Cannot build master branch of numpy in AIX. #25244

Closed

Description

@KamathForAIX

Describe the issue:

Respected community members,

Hi,

Numpy is not building successfully with the current version of Vendor Meson in AIX.

We also tried using the manual build option, but it looks like the features module is not available in the master branch of Meson.

The pip way fails with an unhandled python exception because it uses meson < 1.3.0

The current vender version or fork of Meson that Numpy uses is 1.2.99.

In AIX, meson versions < 1.3.0 had problems finding a.so file. This is because, by default, Meson archives a shared library in AIX, and due to the dl_open() mechanism of Python, it searches for a '.so' and not a '.a' archive file. This issue was fixed recently in Meson by AIX folks and the Meson community so that Python modules using the Meson build system in AIX can be built smoothly.

Therefore, I kindly request that the Numpy community update the vendor version of Meson to 1.3.0 or higher. Kindle let me know if any more information or help is needed so that we can fix this for Numpy and AIX

Have a nice day ahead.

Thanks and regards,

Reproduce the code example:

pip3.9 install numpy 
......
The Meson build system
  Version: 1.2.99
  Source dir: /numpy-1.26.2
  Build dir: /numpy-1.26.2/.mesonpy-hj2ou2ww/build
  Build type: native build
........
File "/numpy-1.26.2/vendored-meson/meson/mesonbuild/compilers/compilers.py", line 963, in get_command_to_archive_shlib
      return self.linker.get_command_to_archive_shlib()

ERROR: Unhandled python exception
  
      This is a Meson bug and should be reported!
  [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
.........

Error message:

No response

Runtime information:

When we manually build, using meson-1.3.0 we get

../meson_cpu/x86/meson.build:2:15: ERROR: Module "features" does not exist

A full log can be found at /numpy/.mesonpy-f1ggpx8t/meson-logs/meson-log.txt

Context for the issue:

No response

Activity

  1. rgommers commented on Nov 26, 2023

    @rgommers
    Member

    Thank you for the report @KamathForAIX. We'll update our vendored Meson to the just-released 1.3.0, that will fix this problem.

    Glad to hear that AIX is working with Meson now.

  2. KamathForAIX commented on Nov 27, 2023

    @KamathForAIX
    Author

    Thanks @rgommers

  3. added this to the 2.0.0 release milestone on Dec 7, 2023
  4. added
    MesonItems related to the introduction of Meson as the new build system for NumPy
    on Dec 7, 2023
  5. rgommers commented on Dec 7, 2023

    @rgommers
    Member

    The full update to latest Meson master is a bit of a pain. It'll be easier to finish upstreaming some stuff so we get fewer merge conflicts. Since for this AIX issue we only seem to need mesonbuild/meson#12352, I'll plan to cherry-pick those two commits first.

  6. KamathForAIX commented on Dec 7, 2023

    @KamathForAIX
    Author

    Sure @rgommers. Thanks for the same.

    I tried patching these two commits before, and Numpy builds successfully in AIX with vendored meson v1.2.99.

  7. added a commit that references this issue on Dec 7, 2023
    fbd57ab
  8. added a commit that references this issue on Dec 13, 2023
    e6b2fb3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    00 - BugMesonItems related to the introduction of Meson as the new build system for NumPy

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions