Title: [Bug]: Couldn't build matplotlib 3.6.0 with both Clang-15 and GCC-12 · Issue #23943 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Couldn't build matplotlib 3.6.0 with both Clang-15 and GCC-12 · Issue #23943 · matplotlib/matplotlib
X Title: [Bug]: Couldn't build matplotlib 3.6.0 with both Clang-15 and GCC-12 · Issue #23943 · matplotlib/matplotlib
Description: Bug summary It fails to build with Clang-15 and GCC-12 Clang: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -march=x86-64 -mtune=generic -O2 -pipe -O3 ...
Open Graph Description: Bug summary It fails to build with Clang-15 and GCC-12 Clang: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -ma...
X Description: Bug summary It fails to build with Clang-15 and GCC-12 Clang: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -ma...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23943
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Couldn't build matplotlib 3.6.0 with both Clang-15 and GCC-12","articleBody":"### Bug summary\n\nIt fails to build with Clang-15 and GCC-12\r\nClang:\r\n```\r\n clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -march=x86-64 -mtune=generic -O2 -pipe -O3 -march=x86-64 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__tkagg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -Isrc -ID:/M/msys64/clang64/lib/python3.10/site-packages/numpy/core/include -ID:/M/msys64/clang64/include/python3.10 -c src/_tkagg.cpp -o build/temp.mingw_x86_64_clang-3.10/matplotlib.backends._tkagg/src/_tkagg.o\r\n src/_tkagg.cpp:234:15: error: cannot initialize a variable of type 'void *' with an rvalue of type 'FARPROC' (aka 'long long (*)()')\r\n if (void* ptr = dlsym(lib, \"Tcl_SetVar\")) {\r\n ^ ~~~~~~~~~~~~~~~~~~~~~~~~\r\n src/_tkagg.cpp:273:13: note: in instantiation of function template specialization 'load_tcl_tk\u003cHINSTANCE__ *\u003e' requested here\r\n if (load_tcl_tk(modules[i])) {\r\n ^\r\n src/_tkagg.cpp:237:15: error: cannot initialize a variable of type 'void *' with an rvalue of type 'FARPROC' (aka 'long long (*)()')\r\n if (void* ptr = dlsym(lib, \"Tk_FindPhoto\")) {\r\n ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n src/_tkagg.cpp:240:15: error: cannot initialize a variable of type 'void *' with an rvalue of type 'FARPROC' (aka 'long long (*)()')\r\n if (void* ptr = dlsym(lib, \"Tk_PhotoPutBlock\")) {\r\n ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n 3 errors generated.\r\n```\r\nGCC:\r\n```\r\n gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -march=x86-64 -mtune=generic -O2 -pipe -O3 -march=x86-64 -mtune=generic -O2 -pipe -D__USE_MINGW_ANSI_STDIO=1 -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_backends__tkagg_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -Isrc -ID:/M/msys64/ucrt64/lib/python3.10/site-packages/numpy/core/include -ID:/M/msys64/ucrt64/include/python3.10 -c src/_tkagg.cpp -o build/temp.mingw_x86_64_ucrt-3.10/matplotlib.backends._tkagg/src/_tkagg.o\r\n src/_tkagg.cpp: In instantiation of 'bool load_tcl_tk(T) [with T = HINSTANCE__*]':\r\n src/_tkagg.cpp:273:24: required from here\r\n src/_tkagg.cpp:234:26: error: invalid conversion from 'FARPROC' {aka 'long long int (*)()'} to 'void*' [-fpermissive]\r\n 234 | if (void* ptr = dlsym(lib, \"Tcl_SetVar\")) {\r\n | ^\r\n | |\r\n | FARPROC {aka long long int (*)()}\r\n src/_tkagg.cpp:237:26: error: invalid conversion from 'FARPROC' {aka 'long long int (*)()'} to 'void*' [-fpermissive]\r\n 237 | if (void* ptr = dlsym(lib, \"Tk_FindPhoto\")) {\r\n | ^\r\n | |\r\n | FARPROC {aka long long int (*)()}\r\n src/_tkagg.cpp:240:26: error: invalid conversion from 'FARPROC' {aka 'long long int (*)()'} to 'void*' [-fpermissive]\r\n 240 | if (void* ptr = dlsym(lib, \"Tk_PhotoPutBlock\")) {\r\n | ^\r\n | |\r\n | FARPROC {aka long long int (*)()}\r\n```\n\n### Code for reproduction\n\n```python\nNo code required\n```\n\n\n### Actual outcome\n\nBuilding succeeds\n\n### Expected outcome\n\nBuilding fails\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.6.0\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n3.10.7\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\n_No response_","author":{"url":"https://github.com/MehdiChinoune","@type":"Person","name":"MehdiChinoune"},"datePublished":"2022-09-19T04:50:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/23943/matplotlib/issues/23943"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:183a9921-b99b-d68b-31a3-3ae8b4ed47d1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DE2A:128295:682F8:8934B:6A516C14 |
| html-safe-nonce | b08b6f733c43e1eaa49fcb79f3b567c105eba95a6b644e3e16c06806d13cf3a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTJBOjEyODI5NTo2ODJGODo4OTM0Qjo2QTUxNkMxNCIsInZpc2l0b3JfaWQiOiIzMDA0NjU3Njc0OTM3Nzg5NDYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | dc247f8a894862d49ab680ece2866a9ba9db71b405441de93f32fc7bd15530e0 |
| hovercard-subject-tag | issue:1377395860 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/23943/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9583319623815ebe5178277724a9bb9b7006f67f67a8df9b5e3f644c5438bd9b/matplotlib/matplotlib/issues/23943 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9583319623815ebe5178277724a9bb9b7006f67f67a8df9b5e3f644c5438bd9b/matplotlib/matplotlib/issues/23943 |
| og:image:alt | Bug summary It fails to build with Clang-15 and GCC-12 Clang: clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -O3 -ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MehdiChinoune |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 60eaaf6d4dbaa817031b556aebd8a0a7eeb81b97 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width