This is an auto-filled bug because dev-libs/hsa-ext-rocr installs files with unresolved SONAME dependencies. The issue was originally discovered on amd64, but it may be reproducible on other arches as well. If you think that a different summary clarifies the issue better, feel free to change it. Attached build log and emerge --info.
Created attachment 639014 [details] build.log build log and emerge --info
For the record: libhsa-runtime64.so.1 is provided by dev-libs/rocr-runtime, libhsakmt.so.1 - by dev-libs/roct-thunk-interface. I must admit that I feel _very_ tempted to leave this as it is. The correct way of solving this issue would be for dev-libs/hsa-ext-rocr to depend on both of the aforementioned packages - except we already have rocr-runtime conditionally depending on hsa-ext-roct. In other words, doing this "properly" would make things harder for users because instead of simply setting USE=non-free on rocr-runtime, they would have to emerge it manually. That said, if candrews (who maintains rocr-runtime) decides to replace the dependency on hsa-ext-roct with a message telling the users to install that package if they want OpenCL image support I shall be happy to change things on my end as well.
dev-libs/hsa-ext-rocr is on its way out, ROCm doesn't use it at all since version 3.7. IMHO there is no point in fixing this only to have the package removed soon, the only reason I haven't last-rited it yet is that I need candrews to clean up ROCm (i.e. remove versions which do require proprietary OpenCL image support from the tree and remove the hsa-ext-rocr dependency from those which do not) first.