-
Notifications
You must be signed in to change notification settings - Fork 518
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
Name collision ("__noinline__") between GCC 12's libstdc++ and HIP #2678
Comments
Thanks for reporting. We introduced |
This issue should be closed with: ROCm/hipamd@28009bc |
No, absolutely not. That is not an option for libstdc++ because it would break this valid C++ program: #define noinline some garbage )[ tokens
#include <memory> Fixing it in HIP was the right thing to do. |
still seems present in 5.2.1 on gcc-12 (Ubuntu 12-20220319-1ubuntu1) as seen in rocm-arch/rocm-arch#780 and in xuhuisheng/rocm-build#31 |
Upgrading to GCC 12.1 and its matching libstdc++ breaks HIP code which uses libstdc++'s headers such as "".
The origin of the issue seems to be in that libstdc++ started to use GCC attributes in two underscore form (such as "
__attribute__((__noinline__))
", in eg. shared_ptr implementation), which are also redefined by HIP. This causes invalid substitutions in cases such as:Similar issue emerged with boost (here #2355) before, but I'm not sure if libstdc++ would implement similar fix. Otherwise I don't see any good solution except workarounds such as
#undef __noinline__
when not needed or including libstdc++ headers first.The text was updated successfully, but these errors were encountered: