Skip to content

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Jul 9, 2025

Print the long double format that is used for the build. This can be helpful when you're about to cross-compile, but can also run Meson first on the native host to check the right value.

Print the long double format that is used for the build.  This can
be helpful when you're about to cross-compile, but can also run Meson
first on the native host to check the right value.

Signed-off-by: Michał Górny <mgorny@quansight.com>
@github-actions github-actions bot added the 36 - Build Build related PR label Jul 9, 2025
@seberg
Copy link
Member

seberg commented Jul 10, 2025

Looks fine to me. I guess it's already printed in the full log but rather cryptically. @ngoldbaum or is there a better way to do this?

I feel like there must be a place where all defines are printed already (so including the HAVE_... define), but I didn't find it immediately?

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, this is useful, thanks @mgorny. I've had this need as well before. We do the same with the symbol suffix for BLAS, which is printed as a message and is also needed sometimes as input to the build, just like this value is.

I feel like there must be a place where all defines are printed already (so including the HAVE_... define), but I didn't find it immediately?

You're thinking about the detailed logging in builddir/meson-logs/meson-log.txt, but that's not visible in CI and also gets cleaned up so it's a frequent point of confusion. The HAVE_ defines are different, since they're never needed as input to the build, just generated header values. And the checks for them are present in the main log, e.g. for HAVE_XLOCALE_H you see:

Has header "xlocale.h" : YES

The reason the long double format isn't visible is because it's not a standard header/function/attribute check but comes from parsing the string output of a meson.get_compiler('c').run invocation.

@rgommers rgommers merged commit 26f1c91 into numpy:main Jul 10, 2025
77 checks passed
@rgommers rgommers added this to the 2.4.0 release milestone Jul 10, 2025
@mgorny mgorny deleted the print-long-double branch July 10, 2025 10:01
@mgorny
Copy link
Contributor Author

mgorny commented Jul 10, 2025

Thanks!

And indeed, I was only able to find this in the list of defines, which implies access to the build tree and is nontrivial to read anyway. Logs are preserved more often than build trees, and having a single clear value makes it easy to copy and paste.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

36 - Build Build related PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants