Skip to content

Conversation

@jsquyres
Copy link
Member

@jsquyres jsquyres commented Jun 4, 2025

Several configure tests write integer result values to files and then do something like foo=$(cat conftestval). However, if the conftestval file contains whitespace around the integer value (e.g., if conftestval was written by a Fortran test code), then $foo will still contain that whitespace, too -- which then propagates throughout the configury and elsewhere.

This commit uses xargs to strip off the whitespace. There's really only one place where this is happening that is a problem, but let's do it in all places where we foo=$(cat conftestval) with integer results, just as a matter of consistency and defensive programming.

Thanks to Lisandro Dalcin (@dalcinl) for raising the issue.

Fixes #13285.

This is the v5.0.x PR corresponding to main PR #13286

jsquyres added 2 commits June 4, 2025 11:54
No code or logic changes.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 1a58617)
Several configure tests write integer result values to files and then
do something like foo=$(cat conftestval).  However, if the conftestval
file contains whitespace around the integer value (e.g., if
conftestval was written by a Fortran test code), then $foo will still
contain that whitespace, too -- which then propagates throughout the
configury and elsewhere.

This commit uses xargs to strip off the whitespace.  There's really
only one place where this is happening that is a problem, but let's do
it in all places where we foo=$(cat conftestval) with integer results,
just as a matter of consistency and defensive programming.

Thanks to Lisandro Dalcin for raising the issue.

Signed-off-by: Jeff Squyres <[email protected]>
(cherry picked from commit 122eae5)
@jsquyres jsquyres requested a review from janjust June 4, 2025 15:56
@jsquyres jsquyres changed the title configury: remove whitespace from "conftestval"-style tests#13286 v5.0.x: configury: remove whitespace from "conftestval"-style tests Jun 4, 2025
@github-actions github-actions bot added this to the v5.0.8 milestone Jun 4, 2025
@jsquyres jsquyres linked an issue Jun 4, 2025 that may be closed by this pull request
@janjust janjust merged commit 1001209 into open-mpi:v5.0.x Jun 9, 2025
18 checks passed
@jsquyres jsquyres deleted the pr/v5.0.x/conftestval-whitespace branch June 9, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[5.0.8] configure generates ompi_cv_fortran_common_alignment=<string>

2 participants