-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-40516: Silence GCC 9 warnings on MacOS Catalina #19925
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this is good way to fix it.
I'm not sure what to do here. Is GCC 9 on Catalina supposed to be supported? I tried it because I'm having issues with debug symbols with the latest version of clang and GDB but should I just build gcc 10? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the similar discussion about this issue.
#13306 (comment)
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
My question is do we know if these are legitimate warnings? If so, does the current Apple-provided clang give them in an otherwise identical build environment and configure options? If not, why not :) ? Also does gcc 10 report the same errors? Do these errors show up in other BSD-based systems, like FreeBSD? BTW @remilapeyre. you mentioned problems using gdb with clang. Have you tried clang's native debugger, lldb? |
Hi, thanks for your feedback, I had not found #13306 sorry about that. For more context about this issue, I'm usually using clang and lldb but I'm currently trying to diagnose a segmentation fault during SSL handshakes. To understand what's going on I would like to use the gdb support (https://devguide.python.org/gdb/). Using gdb on a binary built with clang used to work well but broke recently, I opened an issue at https://sourceware.org/bugzilla/show_bug.cgi?id=25850. I would actually be quite happy to continue using lldb as using gdb on MacOS is cumbersome since a certificate needs to be generated and gdb needs to signed with it but as as I know there is no way to get the same integration with the debugger.
The one in posix is specific to a quirk of MacOS 10.13, maybe clang knows about it? I did not check if the one in nis is present on BSD.
I did not try as I did not know it existed, it does not appear at https://gcc.gnu.org/releases.html. My main goal here is to be able to use https://devguide.python.org/gdb/ on MacOS, I see multiple way to do that:
Maybe the the third one is the best as a Python / LLDB could be useful to others? |
Ping, @ned-deily, @corona10? |
I don't have further suggestions as it's not really my area of expertise. Perhaps @ronaldoussoren might. |
For what it's worth I started working on a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the nismodule.c warnings also present on Linux systems with GCC 9? If so, adding warning suppression seems like a sane thing to do.
@@ -213,7 +213,9 @@ nis_cat (PyObject *self, PyObject *args, PyObject *kwdict) | |||
dict = PyDict_New (); | |||
if (dict == NULL) | |||
return NULL; | |||
#pragma GCC diagnostic ignored "-Wcast-function-type" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a preprocessor guard to ensure the pragma is only used with compatible compilers.
cb.foreach = (foreachfunc)nis_foreach; | ||
#pragma GCC diagnostic pop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise
@@ -3392,12 +3392,15 @@ os_chown_impl(PyObject *module, path_t *path, uid_t uid, gid_t gid, | |||
* This is for Mac OS X 10.3, which doesn't have lchown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #22855 will fix the warnings in posixmodule.c (as a side effect of more interesting changes).
Note the nis module is deprecated in 3.11 and set for removal in 3.13. See PEP 594 – Removing dead batteries from the standard library and #91217. |
This PR has been "awaiting changes" for over a year, and now has a merge conflict. I am therefore closing this PR. @remilapeyre, if you're still interested in working on this issue, feel free to ping me and I'll happily reopen the PR. However, do note that the |
https://bugs.python.org/issue40516