Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131093: Enforce -std=c11 for gcc at configure time rather than make time#133608

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
CS-cwhite wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromCS-cwhite:bugfix/SDX-12236-configure-std-c11

Conversation

CS-cwhite
Copy link

@CS-cwhiteCS-cwhite commentedMay 7, 2025
edited by bedevere-appbot
Loading

When compiling under gcc, configure.ac currently assumes-std=c11 rather than checking it. This causes configure to succeed but make to fail on old compilers. Fix this by adding a check for-std=c11 in configure.ac.

The changes toconfigure are the result of runningTools/build/regen-configure.sh.

Manual test on gcc 4.4.7:

Before:

$ ./configure... (after it builds for a while)gcc -std=gnu99 -pthread -c -fno-strict-overflow -Wsign-compare ...  -DPy_BUILD_CORE -o Parser/lexer/buffer.o Parser/lexer/buffer.ccc1: error: unrecognized command line option "-std=c11"cc1: error: unrecognized command line option "-std=c11"

After:

$ ./configure...checking whether C compiler accepts -std=c11... noconfigure: error: Python requires -std=c11 on gcc

Fixes#131093.

@python-cla-bot
Copy link

The following commit authors need to sign the Contributor License Agreement:

CLA signed

@CS-cwhite
Copy link
Author

CS-cwhite commentedMay 7, 2025
edited
Loading

I previously signed the CLA on behalf of my organization, at the direction of the organization's legal department. Is there a way to tell CLA-bot to recognize that?

@AA-Turner
Copy link
Member

AA-Turner commentedMay 8, 2025
edited
Loading

cc@ambv re CLA

@AA-TurnerAA-Turner added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 8, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@AA-Turner for commitb4fbd36 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F133608%2Fmerge

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMay 8, 2025
@CS-cwhite
Copy link
Author

This is my first cpython PR, so I don't know --- do I have any action items from the build failures? E.g.,Check if generated files are up to date appears to be checking C code, and this PR doesn't touch any C code. The failures don't appear to be related to this PR's changes, but I'm happy to work on fixes if they are!

@AA-Turner
Copy link
Member

We had some teething issues with the bump to 3.15, so I've updated the branch to check the failures aren't related. In general, you may find thePython Developer's Guide useful.

A

CS-cwhite reacted with thumbs up emoji

@ZeroIntensityZeroIntensity added the buildThe build process and cross-build labelMay 11, 2025
@ZeroIntensity
Copy link
Member

I previously signed the CLA on behalf of my organization, at the direction of the organization's legal department.

I think redoing the commits with whatever email you signed with and then force-pushing should work.

…an make timeWhen compiling under gcc, configure.ac currently assumes -std=c11 ratherthan checking it.  This causes configure to succeed but make to fail onold compilers.  Fix this by adding a check for -std=c11 in configure.ac.
@CS-cwhiteCS-cwhiteforce-pushed thebugfix/SDX-12236-configure-std-c11 branch fromf14b4f8 tobc5c9edCompareMay 12, 2025 15:26
@CS-cwhite
Copy link
Author

@ZeroIntensity Thanks! I checked, and the email is the same. However, the authorname was different (it was "Chris White" in the commit but "Christopher White" on the CLA). I amended the commit to show the same name as the CLA in case that made a difference.

@AA-Turner
Copy link
Member

I've asked internally for advice.

A

@AA-Turner
Copy link
Member

AA-Turner commentedMay 12, 2025
edited
Loading

@CS-cwhite, the advice I've had is that you should click the button to sign the CLA again. Sorry for the delay and the trouble this has caused. There's some more background/colour in#120171 (comment)

A

CS-cwhite reacted with eyes emoji

@@ -0,0 +1,3 @@
On GCC-compatible compilers, check at configure time that ``-std=c11``
works. This way you don't hit an "invalid option" error at make time on old
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
works. This way you don't hit an "invalid option" error atmake time on old
works. This way you don't hit an "invalid option" error atbuild time on old

@CS-cwhite
Copy link
Author

@AA-Turner Unfortunately, corporate legal says I am not permitted to sign the individual CLA, and that the organizational CLA must control my contributions.

@AA-Turner
Copy link
Member

I'll ask for advice.

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

@erlend-aaslanderlend-aaslanderlend-aasland left review comments

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

Assignees
No one assigned
Labels
awaiting reviewbuildThe build process and cross-build
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

configure.ac assumes -std=c11 rather than checking it, which causes make failures on old compilers
5 participants
@CS-cwhite@AA-Turner@bedevere-bot@ZeroIntensity@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp