Skip to content

bpo-46602: Do not append conftest.c #31062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 2, 2022
Merged

bpo-46602: Do not append conftest.c #31062

merged 3 commits into from
Feb 2, 2022

Conversation

adanhawth
Copy link
Contributor

@adanhawth adanhawth commented Feb 1, 2022

The heredoc creation statements use >> to append conftest.c. This can cause
tricky build issues if the file is not correctly removed prior to its
name being reused (such name is reused several times for different
contextual tests during the build). One such result from appending may
cause #include <ac_nonexistent.h> to persist when testing to acquire
PLATFORM_TRIPLET. This can then lead to downstream issues concerning SOABI.

https://bugs.python.org/issue46602

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@adanhawth

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

@adanhawth adanhawth changed the title bpo-46602: Do not append conftest.c (GH-NNNN) bpo-46602: Do not append conftest.c Feb 1, 2022
The heredoc creation statements use >> to append conftest.c.  This can cause
tricky build issues if the file is not correctly removed prior to its
name being reused (such name is reused several times for different
contextual tests during the build).  One such result from appending may
cause #include <ac_nonexistent.h> to persist when testing to acquire
PLATFORM_TRIPLET.  This can then lead to downstream issues concerning SOABI.
@arhadthedev
Copy link
Member

You also need to change the corresponding lines of configure.ac (so both original configure.ac and generated configure are amended by this PR):

cpython/configure.ac

Lines 835 to 836 in bebaa95

AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
cat >> conftest.c <<EOF

cpython/configure.ac

Lines 1030 to 1031 in bebaa95

AC_MSG_CHECKING([for the Android API level])
cat >> conftest.c <<EOF

@ned-deily
Copy link
Member

Thanks for the PR; the changes to configure.ac do not seem to present in it and those are more important than the auto-generated configure changes.

@arhadthedev
Copy link
Member

@adanhawth Looking through a list of checks I noticed failed bedevere/news — No news entry in Misc/NEWS.d/next/ or "skip news" label found.

I forgot to say that you also need to add a short changelog entry using https://blurb-it.herokuapp.com/add_blurb. It can be, for example, Fix configure.ac so it fully regenerates conftest.c instead of appending to its previous content.

I cannot do it by myself because I have no push access to your PR, but it will look like this:

image

Copy link
Member

@ned-deily ned-deily left a comment

Choose a reason for hiding this comment

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

The changes look good to me. I gather from the comments that you have experienced "tricky build problems" as configure now stands. For that reason, I think it might be a good idea to add a NEWS item for this change since others might have also run into the problem, assuming the problem description can be meaningfully described in a few lines; see the description of blurb and blurb-it in the devguide.

@ned-deily
Copy link
Member

@arhadthedev, sorry, I didn't see your comment before I made mine :)

@ned-deily ned-deily merged commit b128896 into python:main Feb 2, 2022
@ned-deily
Copy link
Member

Thanks again for the PR and congrats on your first cpython PR.

@adanhawth
Copy link
Contributor Author

You're welcome. Thank you, both, for the timely feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants