Skip to content
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

gh-105776: Fix test_cppext when CC contains -std=c11 option #108343

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 23, 2023

Fix test_cppext when the C compiler command "-std=c11" option: remove
"-std=" options from the compiler command.
@vstinner
Copy link
Member Author

Without this PR, test_cppext fails with these commands:

$ ./configure --with-pydebug 'CC=gcc -std=c11' CFLAGS="-O0"
$ make
$ ./python -m test test_cppext -v

With this PR, test_cppext pass.

@vstinner vstinner enabled auto-merge (squash) August 23, 2023 02:43
@vstinner vstinner merged commit 9173b2b into python:main Aug 23, 2023
20 checks passed
@miss-islington
Copy link
Contributor

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @vstinner, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9173b2bbe13aeccc075b571da05c653a2a91de1b 3.11

@bedevere-bot
Copy link

GH-108345 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Aug 23, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 23, 2023
…thonGH-108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.
(cherry picked from commit 9173b2b)

Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner vstinner deleted the test_cppext_std branch August 23, 2023 03:10
@bedevere-bot
Copy link

GH-108347 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Aug 23, 2023
vstinner added a commit to vstinner/cpython that referenced this pull request Aug 23, 2023
…thon#108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.

(cherry picked from commit 9173b2b)
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable 3.x has failed when building commit 9173b2b.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/543/builds/4279) and take a look at the build logs.
  4. Check if the failure is related to this commit (9173b2b) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/543/builds/4279

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

432 tests OK.

10 slowest tests:

  • test_gdb: 4 min 29 sec
  • test_multiprocessing_spawn: 3 min 7 sec
  • test_concurrent_futures: 2 min 49 sec
  • test_math: 2 min 33 sec
  • test_multiprocessing_forkserver: 1 min 39 sec
  • test_multiprocessing_fork: 1 min 13 sec
  • test_tokenize: 1 min 7 sec
  • test_capi: 1 min 3 sec
  • test_unparse: 1 min
  • test_socket: 55.5 sec

1 test altered the execution environment:
test_ssl

14 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_ioctl
test_kqueue test_launcher test_startfile test_tkinter test_ttk
test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64

Total duration: 5 min 24 sec

Click to see traceback logs
remote: Enumerating objects: 20, done.        
remote: Counting objects:   5% (1/20)        
remote: Counting objects:  10% (2/20)        
remote: Counting objects:  15% (3/20)        
remote: Counting objects:  20% (4/20)        
remote: Counting objects:  25% (5/20)        
remote: Counting objects:  30% (6/20)        
remote: Counting objects:  35% (7/20)        
remote: Counting objects:  40% (8/20)        
remote: Counting objects:  45% (9/20)        
remote: Counting objects:  50% (10/20)        
remote: Counting objects:  55% (11/20)        
remote: Counting objects:  60% (12/20)        
remote: Counting objects:  65% (13/20)        
remote: Counting objects:  70% (14/20)        
remote: Counting objects:  75% (15/20)        
remote: Counting objects:  80% (16/20)        
remote: Counting objects:  85% (17/20)        
remote: Counting objects:  90% (18/20)        
remote: Counting objects:  95% (19/20)        
remote: Counting objects: 100% (20/20)        
remote: Counting objects: 100% (20/20), done.        
remote: Compressing objects:  20% (1/5)        
remote: Compressing objects:  40% (2/5)        
remote: Compressing objects:  60% (3/5)        
remote: Compressing objects:  80% (4/5)        
remote: Compressing objects: 100% (5/5)        
remote: Compressing objects: 100% (5/5), done.        
remote: Total 11 (delta 9), reused 7 (delta 6), pack-reused 0        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '9173b2bbe13aeccc075b571da05c653a2a91de1b'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 9173b2bbe1 gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343)
Switched to and reset branch 'main'

../Objects/longobject.c: In function ‘long_format_binary’:
../Objects/longobject.c:2122:13: warning: ‘kind’ may be used uninitialized [-Wmaybe-uninitialized]
 2122 |     else if (kind == PyUnicode_1BYTE_KIND) {
      |             ^
../Objects/longobject.c:1998:9: note: ‘kind’ was declared here
 1998 |     int kind;
      |         ^~~~
../Objects/longobject.c: In function ‘long_to_decimal_string_internal’:
../Objects/longobject.c:1945:13: warning: ‘kind’ may be used uninitialized [-Wmaybe-uninitialized]
 1945 |     else if (kind == PyUnicode_1BYTE_KIND) {
      |             ^
../Objects/longobject.c:1769:9: note: ‘kind’ was declared here
 1769 |     int kind;
      |         ^~~~

make: *** [Makefile:2034: buildbottest] Error 3

vstinner added a commit that referenced this pull request Aug 23, 2023
…108343) (#108347)

gh-105776: Fix test_cppext when CC contains -std=c11 option (#108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.

(cherry picked from commit 9173b2b)
Yhg1s pushed a commit that referenced this pull request Aug 23, 2023
…H-108343) (#108345)

gh-105776: Fix test_cppext when CC contains -std=c11 option (GH-108343)

Fix test_cppext when the C compiler command has the "-std=c11" option.
Remove "-std=" options from the compiler command.
(cherry picked from commit 9173b2b)

Co-authored-by: Victor Stinner <vstinner@python.org>
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.

3 participants