Bug 2336010
| Summary: | amdsmi fails to build with GCC 15 ("error: 'uintptr_t' does not name a type") | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dave Malcolm <dmalcolm> |
| Component: | amdsmi | Assignee: | Tom.Rix |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | jwakely, rocm-packagers-sig, Tom.Rix |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-01-10 14:25:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2333037 | ||
|
Description
Dave Malcolm
2025-01-06 22:06:27 UTC
https://github.com/ROCm/amdsmi/pull/70 submitted upstream That fix is incorrect, strictly speaking. <stdint.h> is guaranteed to declare the names in the global namespace, and *might* also declare them in namespace std. <cstdint> is guaranteed to declare the names in namespace std, and *might* also declare them in the global namespace. Since the code uses those names unqualified (i.e. uintptr_t not std::uintptr_t) the portable and correct fix is to include <stdint.h> (or alternatively, include <cstdint> then add `using std::uintptr_t;` for each name, or `using namespace std;`). In practice, with GCC's C++ stdlib the fix works, because <cstdint> does declare the names in both std and the global namespace. Then the gcc warning suggesting the fix needs to change otherwise everyone facing this issue will follow this advice. I am seeing this problem in other packages, atm clang build. This update may roil the F42 release. Can this problem be hidden by a compiler change ? Can update to gcc-compat be rolled out quickly ? The packages need to be fixed, they're not valid C++. Reverting the GCC change will just mean the packages are never fixed, and we'll have the same problems in a year with GCC 16. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |