-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[pybind11] Fixed compiling errors for pybind11 -Wmissing-field-initializers under gcc8 and python312
#63949
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
[pybind11] Fixed compiling errors for pybind11 -Wmissing-field-initializers under gcc8 and python312
#63949
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
-Wmissing-field-initializers under aarch64 and gcc8-Wmissing-field-initializers under aarch64 and gcc8 only python12
-Wmissing-field-initializers under aarch64 and gcc8 only python12-Wmissing-field-initializers under aarch64 and gcc8 only python312
|
|
||
| include_directories(${PYBIND_INCLUDE_DIR}) | ||
|
|
||
| set(PYBIND_PATCH_COMMAND "") |
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.
加个注释吧,说明这个 patch 可以在 gcc 9.1+ 安全移除
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.
Done
-Wmissing-field-initializers under aarch64 and gcc8 only python312-Wmissing-field-initializers under gcc8 and python312
SigureMo
left a comment
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.
…alizers` under gcc8 and python312 (PaddlePaddle#63949)
…alizers` under gcc8 and python312 (PaddlePaddle#63949)
…alizers` under gcc8 and python312 (PaddlePaddle#63949)
…alizers` under gcc8 and python312 (PaddlePaddle#63949)
PR Category
Others
PR Types
Others
Description
修复 #63741 引入的问题
可以在
registry.baidubce.com/device/paddle-cpu:ubuntu18-aarch64-gcc82-python-all镜像下复现复现步骤
[ 59%] Built target extern_brpc In file included from /usr/local/include/python3.12/pythread.h:128, from /usr/local/include/python3.12/Python.h:89, from /paddle/paddle/fluid/eager/pylayer/py_layer_node.h:17, from /paddle/paddle/fluid/eager/pylayer/py_layer_node.cc:15: /usr/local/include/python3.12/cpython/pythread.h:42:31: error: missing initializer for member ‘_Py_tss_t::_key’ [-Werror=missing-field-initializers] #define Py_tss_NEEDS_INIT {0} ^ /paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/detail/../detail/internals.h:82:23: note: in expansion of macro ‘Py_tss_NEEDS_INIT’ = Py_tss_NEEDS_INIT; \ ^~~~~~~~~~~~~~~~~ /paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/detail/../detail/internals.h:197:5: note: in expansion of macro ‘PYBIND11_TLS_KEY_INIT’ PYBIND11_TLS_KEY_INIT(tstate) ^~~~~~~~~~~~~~~~~~~~~ /usr/local/include/python3.12/cpython/pythread.h:42:31: error: missing initializer for member ‘_Py_tss_t::_key’ [-Werror=missing-field-initializers] #define Py_tss_NEEDS_INIT {0} ^ /paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/detail/../detail/internals.h:82:23: note: in expansion of macro ‘Py_tss_NEEDS_INIT’ = Py_tss_NEEDS_INIT; \ ^~~~~~~~~~~~~~~~~ /paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/detail/../detail/internals.h:199:5: note: in expansion of macro ‘PYBIND11_TLS_KEY_INIT’ PYBIND11_TLS_KEY_INIT(loader_life_support_tls_key) ^~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors paddle/fluid/eager/pylayer/CMakeFiles/py_layer_node.dir/build.make:75: recipe for target 'paddle/fluid/eager/pylayer/CMakeFiles/py_layer_node.dir/py_layer_node.cc.o' failed make[2]: *** [paddle/fluid/eager/pylayer/CMakeFiles/py_layer_node.dir/py_layer_node.cc.o] Error 1 CMakeFiles/Makefile2:59652: recipe for target 'paddle/fluid/eager/pylayer/CMakeFiles/py_layer_node.dir/all' failed make[1]: *** [paddle/fluid/eager/pylayer/CMakeFiles/py_layer_node.dir/all] Error 2 Makefile:135: recipe for target 'all' failedcloses #63906