Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925448 - sys-process/btop-1.3.2 recommends installing dev-util/rocm-smi, but it doesn't work
Summary: sys-process/btop-1.3.2 recommends installing dev-util/rocm-smi, but it doesn'...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Adrian Schollmeyer
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2024-02-24 22:28 UTC by Enne Eziarc
Modified: 2024-03-10 02:16 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enne Eziarc 2024-02-24 22:28:04 UTC
The versions of dev-util/rocm-smi currently available install librocm_smi64.so.1, not *.so.5 - btop's dynamic loader code[1] expects the library version to match what it says on the box and so falls through to the error message at the end.

[1] https://github.com/aristocratos/btop/blob/v1.3.2/src/linux/btop_collect.cpp#L1338


Here's a trivial patch for btop that makes it work on my end:
```
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp
index d500192db..baeaf5799 100644
--- a/src/linux/btop_collect.cpp
+++ b/src/linux/btop_collect.cpp
@@ -1342,7 +1342,7 @@ namespace Gpu {
 			if (result != RSMI_STATUS_SUCCESS) {
 				Logger::warning("ROCm SMI: Failed to get version");
 				return false;
-			} else if (version.major == 5) {
+			} else if (version.major == 1) {
 				if ((rsmi_dev_gpu_clk_freq_get_v5 = (decltype(rsmi_dev_gpu_clk_freq_get_v5))load_rsmi_sym("rsmi_dev_gpu_clk_freq_get")) == nullptr)
 					return false;
 			// In the release tarballs of rocm 6.0.0 and 6.0.2 the version queried with rsmi_version_get is 7.0.0.0
```
Comment 1 Sv. Lockal 2024-03-09 17:24:53 UTC
Confirming issue with sys-process/btop-1.3.2 (while it works btop-1.3.0).

I will add a fix to dev-util/rocm-smi 5.7.1 to return version.major = 5.
Comment 2 Larry the Git Cow gentoo-dev 2024-03-10 02:16:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb314ed153d17c3831a83381cd68550187ac97db

commit fb314ed153d17c3831a83381cd68550187ac97db
Author:     Sv. Lockal <lockalsash@gmail.com>
AuthorDate: 2024-03-09 18:56:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-10 02:16:14 +0000

    dev-util/rocm-smi: return correct version in rsmi_version_get
    
    This still retains librocm_smi64.so.1 for library name (as in older versions and Debian),
    but rsmi_version_get() will return correct version (sys-process/btop-1.3.2 calls it).
    
    Closes: https://bugs.gentoo.org/925448
    Signed-off-by: Sv. Lockal <lockalsash@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/rocm-smi-5.7.1-set-soversion.patch       | 64 ++++++++++++++--------
 ...m-smi-5.7.1.ebuild => rocm-smi-5.7.1-r1.ebuild} |  5 +-
 2 files changed, 44 insertions(+), 25 deletions(-)