bufr: use f2py build directory outside /tmp - #6211
Open
mathomp4 wants to merge 2 commits into
Open
Conversation
spackbot-triage
Bot
requested review from
AlexanderRichert-NOAA,
Hang-Lei-NOAA,
edwardhartnett and
jbathegit
August 24, 2026 17:45
Contributor
Author
|
Note to @climbfuji: This was found in my test builds of my spack-stack testing. Fun with |
mathomp4
marked this pull request as draft
August 24, 2026 18:35
Contributor
Author
|
Converting to draft. Something isn't quite right. Still seeing a bufr build failure...though I thought it worked? Weird... |
mathomp4
marked this pull request as ready for review
August 24, 2026 19:33
Contributor
Author
|
Okay. Should be good to go. I really hate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With
+pythonand Python 3.12 or newer, NumPyf2pyuses Meson to build BUFR's Python extension. By default, f2py creates its build directory with Python's temporary-directory mechanism. On systems where/tmpis mountednoexec, Meson then cannot execute its compiler sanity-check program.Pass f2py's
--build-diroption from BUFR's CMake custom command, placing the temporary Meson project under CMake's binary directory instead of/tmp.The change is limited to
bufr+python ^python@3.12:, matching the f2py versions that use Meson.Testing
Successfully built on Linux:
Before this change, f2py invoked Meson from
/tmpand failed on its Fortran sanity check. With this change, BUFR builds successfully.AI assistance disclosure
GPT-5.6 assisted with identifying the f2py/Meson failure and drafting the package change. The change was reviewed and tested by the submitter.