ROCm: Can't install rocm-dev on Debian Bullseye

Trying to install rocm-dev on Debian Bullseye (Testing) fails due to unmet dependencies.

$ sudo apt install rocm-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 llvm-amdgpu : Depends: libstdc++-5-dev but it is not installable or
                        libstdc++-7-dev but it is not installable
               Depends: libgcc-5-dev but it is not installable or
                        libgcc-7-dev but it is not installable
E: Unable to correct problems, you have held broken packages.

Neither libstdc+±5-dev, libstdc+±7-dev, libgcc-5-dev nor libgcc-7-dev are available for Bullseye anymore

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 15
  • Comments: 36

Most upvoted comments

Hi @baryluk We are not able to reproduce this issue with our supported OSes. For ex: Ubuntu has libstdc++ packages and will be installed automatically.

You can create your own dummy packages for libgcc-7-dev and libpython3.8, then manually link (dummy) libpython3.8 to libpython3.9 for rocm-gdb dependencies.

create two files “fake-libpython3.8” and “fake-libgcc-7-dev” (contents below) install equivs run equivs-build $file install resulting deb files configure rocm deb repository install desired rocm packages

“fake-libgcc-7-dev” contents:

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: fake-libgcc-7-dev
Version: 1.0
Provides: libgcc-7-dev, libstdc++-7-dev
Architecture: all
Description: Fake libgcc7-dev package to satisfy dependencies
 Fake libgcc7-dev package to satisfy dependencies

“fake-libpython3.8” contents:

Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: fake-libpython3.8
Version: 1.0
Depends: libpython3.9
Provides: libpython3.8, libpython3.8-minimal, libpython3.8-stdlib
Architecture: all
Description: Fake libpython3.8 package to satisfy dependencies
 Fake libpython3.8 package to satisfy dependencies

## MANUAL INSTALL
#sudo ln -s /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/x86_64-linux-gnu/libpython3.8.so
#sudo ln -s /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/x86_64-linux-gnu/libpython3.8.so.1
#sudo ln -s /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0

Thanks all for your ideas and suggestions. As we are not supporting Debian officially, we can not share official info on this. Request to try with the above tricks and suggestions to overcome installation problems. Thank you.

For anybody struggling with working around this, here is a repackaged unsigned deb with dependencies for libstdc+±10-dev and libgcc-10-dev added.

wget http://repo.radeon.com/rocm/apt/debian/pool/main/l/llvm-amdgpu3.8.0/llvm-amdgpu3.8.0_11.0.dev_amd64.deb                                                                                      
mkdir tmp
dpkg-deb -R llvm-amdgpu3.8.0_11.0.dev_amd64.deb tmpllvm-amdgpu
sed -E -i -e 's/libstdc\+\+-7-dev,/libstdc++-7-dev|libstdc++-10-dev,/' -e 's/libgcc-7-dev$/libgcc-7-dev|libgcc-10-dev/' tmpllvm-amdgpu/DEBIAN/control 
dpkg-deb -b tmpllvm-amdgpu llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb
sudo dpkg -i llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb
rm -rf tmpllvm-amdgpu

https://www.functor.xyz/rocm/llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb (506MB)

9d8e9c711eaa367ef6f054eb3f7c373b8b81ae5a6980d5403f46ec287a72ac01  llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb

please provide step by step guide. i am unable to understand that what to do with that downloaded file. and how to install it. then after which commands should i use. my amd gpu is not working in hashcat and all other applications. i have tried all methods. but same error. please help me.

Better go with @baryluk solution. Just install https://www.functor.xyz/rocm/fake-old-libgcc_99_all.deb. Then ensure you have libstdc+±10-dev and libgcc-10-dev installed. Finally just install rocm-dev from repo. You can install this file with: sudo dpkg -i fake-old-libgcc_99_all.deb. For rocm-dev, you can follow the instructions in https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu, but if you are using debian, instead of sudo apt install rocm-dkms && sudo reboot at step 3, you better use sudo apt install rocm-dev (no reboot needed in this case). This works if you are using debian testing and have most up to date kernel by having linux-image-amd64 linux-headers-amd64 packages installed and update to testing or unstable.

Hope it helps.

Big thanks to baryluk and sebastianlacuesta again ! I now also successfully installed rocm-dkms under Debian 11 after solving kernel header file not found issue.

Hi sebastianlacuesta and others,

I have just signed in and want to thank you all ! This has solved my issue of installing rocm-libs in Debian 11 It is vital for upgrading HQplayer Embedded newer version with cuda offload.

Ii

Just FYI, it’s easier to workaround the issue if you just install dummy package using equivs: https://wiki.debian.org/Packaging/HackingDependencies

Just create empty package that provides libstdc+±7-dev and libgcc-7-dev.

That said, ROCm should fix its dependency in DEBIAN/control so it references “libstdc+±dev” and “gcc”, instead of version-specific “libstdc+±<VER>-dev” and “libgcc-<VER>-dev” package.

@satmandu I have a custom kernel with some parts of enabled manually, using rocm-opencl clinfo shows the GPU as a device, at least. Hashcat does not see it, but I think that might be a simpler path than dealing with dkms.

@tai Thanks. That is a neat trick.

https://www.functor.xyz/rocm/fake-old-libgcc_99_all.deb should do the trick and work with both rocm 3.8 and 3.9. The equivs source in in the same directory there on the server if you want to check it out.

After downloading, go to directory you downloaded it to, and do sudo dpkg -i fake-old-libgcc_99_all.deb, then continue with normal ROCm installation just like for Ubuntu using normal install guide.

For anybody struggling with working around this, here is a repackaged unsigned deb with dependencies for libstdc+±10-dev and libgcc-10-dev added.

wget http://repo.radeon.com/rocm/apt/debian/pool/main/l/llvm-amdgpu3.8.0/llvm-amdgpu3.8.0_11.0.dev_amd64.deb                                                                                      
mkdir tmp
dpkg-deb -R llvm-amdgpu3.8.0_11.0.dev_amd64.deb tmpllvm-amdgpu
sed -E -i -e 's/libstdc\+\+-7-dev,/libstdc++-7-dev|libstdc++-10-dev,/' -e 's/libgcc-7-dev$/libgcc-7-dev|libgcc-10-dev/' tmpllvm-amdgpu/DEBIAN/control 
dpkg-deb -b tmpllvm-amdgpu llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb
sudo dpkg -i llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb
rm -rf tmpllvm-amdgpu

https://www.functor.xyz/rocm/llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb (506MB)

9d8e9c711eaa367ef6f054eb3f7c373b8b81ae5a6980d5403f46ec287a72ac01  llvm-amdgpu3.8.0_11.1.dev~fix1_amd64.deb