Repository navigation
BUG: New meson system fails to identify long double representation on 64-bit BE platforms #23972
Description
Activity
That's indeed the relevant TODO. xref mesonbuild/meson#11068. It's all fixable, just needs someone to spend time on it.
@matoro why is this a Gentoo bug against 1.25.0? You should still be building that with
numpy.distutilsrather thanmeson.That's indeed the relevant TODO. xref mesonbuild/meson#11068. It's all fixable, just needs someone to spend time on it.
@matoro why is this a Gentoo bug against 1.25.0? You should still be building that with
numpy.distutilsrather thanmeson.I specified the version range in the Gentoo bug because that's the version the downstream maintainer decided to go ahead and switch over to meson, so it is relevant to the downstream maintainer (but not to upstream).
Sam has gone ahead and dropped keywords anyway in gentoo/gentoo@f096a78 so we will be individually revalidating each architecture.
Thanks @matoro, that's good to know. The actual in-memory format detection needs work, but it's easy to hardcode the most common 64-bit big endian format now, that will probably fix most of those issues. The options are:
IBM_DOUBLE_DOUBLE_BEIEEE_QUAD_BEBINFMT_NAME IEEE_binary128_beMOTOROLA_EXTENDED_12_BYTES_BE
To try, you could change the line
error('No idea what this is ....')in the snippet in the issue description tolongdouble_format = <above-string-here>.- addedMesonItems related to the introduction of Meson as the new build system for NumPyItems related to the introduction of Meson as the new build system for NumPy
on Jun 18, 2023 Thanks @matoro, that's good to know. The actual in-memory format detection needs work, but it's easy to hardcode the most common 64-bit big endian format now, that will probably fix most of those issues. The options are:
* `IBM_DOUBLE_DOUBLE_BE` * `IEEE_QUAD_BE` * `BINFMT_NAME IEEE_binary128_be` * `MOTOROLA_EXTENDED_12_BYTES_BE`To try, you could change the line
error('No idea what this is ....')in the snippet in the issue description tolongdouble_format = <above-string-here>.That might get it to compile, but I don't think it will be fully accurate until the entire original logic was ported. In fact, I don't think even the LE logic is correct right now. For example, standard IEEE long doubles are not being introduced in ppc64le on Fedora until Fedora 38. So this would compile incorrect code on Fedora 37 ppc64le right now.
I will look into mesonbuild/meson#11068 and see if I can port over the logic.
Reacted by Ralf GommersThanks matoro and ralf!
@matoro why is this a Gentoo bug against 1.25.0? You should still be building that with
numpy.distutilsrather thanmeson.We're pretty keen to get onto Meson as soon as we can for numpy because it's so much faster to build without -j1 (especially on slower platforms) and the support for cross, but we're also very happy to then help with any bugs that fall out of that. Sorry for the confusion!
If needed, we can add a warning to the packaging to ask users to definitely not report any issues upstream for now without asking us first to avoid confusion.
In this case, I'd meant to drop the tags marking it as working on everything-but-amd64 but didn't until matoro noticed - so now it goes through the usual testing process.
Reacted by Ralf GommersFantastic work, nice to see that this was ultimately practical to do entirely via the compiler object methods in meson.
If needed, we can add a warning to the packaging to ask users to definitely not report any issues upstream for now without asking us first to avoid confusion.
I think it's fine to open bug reports, we're aiming to complete the switchover before the well before the Python 3.12 release date (Oct 4th), so whatever gets reported is probably something we need to address anyway.
One word of warning: most SIMD acceleration isn't enabled in the 1.25.x branch (nor in
mainyet), so while the build is a lot faster, Gentoo users may see a performance impact as a result of that missing SIMD support.Reacted by Sam James- added a commit that references this issue
on Jun 24, 2023 - added 7 commits that reference this issue
on Dec 27, 2024 - added a commit that references this issue
on Feb 20, 2025 - added 2 commits that reference this issue
on Mar 11, 2025 - added a commit that references this issue
on Mar 21, 2025 - added a commit that references this issue
on Jul 18, 2025
Describe the issue:
When using the new Meson build system, numpy fails to configure on 64-bit big-endian platforms:
Seems to be due to this new snippet:
This affects such platforms as: ppc64 BE, mips64 BE, s390x, sparc64. 32-bit BE platforms such as hppa, ppc, m68k are unaffected.
Downstream bug: https://bugs.gentoo.org/908738
Reproduce the code example:
Error message:
No response
Runtime information:
N/A
Context for the issue:
No response