-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Couldn't build matplotlib 3.6.0 with both Clang-15 and GCC-12 #23943
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
Comments
I have been compiling in linux with gcc 12 without a problem. It seems that @MehdiChinoune Do you understand what changed in gcc / clang to make this code fail? Do we need a windows specific version of this function? |
Nothing has changed. the previous version (3.5.3) could be built by both gcc-12 and clang-14, It is matplotlib that changed in e1fcc90 |
proposed patch --- a/src/_tkagg.cpp
+++ b/src/_tkagg.cpp
@@ -231,13 +231,13 @@
{
// Try to fill Tcl/Tk global vars with function pointers. Return whether
// all of them have been filled.
- if (void* ptr = dlsym(lib, "Tcl_SetVar")) {
+ if (auto ptr = dlsym(lib, "Tcl_SetVar")) {
TCL_SETVAR = (Tcl_SetVar_t)ptr;
}
- if (void* ptr = dlsym(lib, "Tk_FindPhoto")) {
+ if (auto ptr = dlsym(lib, "Tk_FindPhoto")) {
TK_FIND_PHOTO = (Tk_FindPhoto_t)ptr;
}
- if (void* ptr = dlsym(lib, "Tk_PhotoPutBlock")) {
+ if (auto ptr = dlsym(lib, "Tk_PhotoPutBlock")) {
TK_PHOTO_PUT_BLOCK = (Tk_PhotoPutBlock_t)ptr;
}
return TCL_SETVAR && TK_FIND_PHOTO && TK_PHOTO_PUT_BLOCK; |
🐑 fair enough. I forgot we had done some work on that file, sorry for answering without doing my due diligence of checking git-blame. |
Bug summary
It fails to build with Clang-15 and GCC-12
Clang:
GCC:
Code for reproduction
Actual outcome
Building succeeds
Expected outcome
Building fails
Additional information
No response
Operating system
No response
Matplotlib Version
3.6.0
Matplotlib Backend
No response
Python version
3.10.7
Jupyter version
No response
Installation
No response
The text was updated successfully, but these errors were encountered: