HIP icon indicating copy to clipboard operation
HIP copied to clipboard

Can not install hip_nvcc on Ubuntu 18.04

Open sampie opened this issue 6 years ago • 21 comments

Hi

I am trying to install HIP support on an environment having NVIDIA hardware.

Unfortunately running "apt-get install hip_nvcc" says: hip_nvcc : Depends: cuda (>= 7.5) but it is not installable

I have nvidia-cuda-toolkit (9.1.85-3ubuntu1) package installed on my system.

How hip_nvcc can be installed to Ubuntu 18.04?

sampie avatar Dec 19 '18 18:12 sampie

hip_nvcc has only been tested with cuda package that comes from Nvidia's cuda repo. If you want to use nvidia-cuda-toolkit with hip_nvcc, you can ignore the cuda dependency for now by using apt-get install hip_nvcc cuda-

mangupta avatar May 20 '19 05:05 mangupta

$ sudo apt-get install hip_nvcc cuda- Reading package lists... Done Building dependency tree
Reading state information... Done Package 'cuda' is not installed, so not removed 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: hip_nvcc : Depends: cuda (>= 7.5) but it is not installable E: Unable to correct problems, you have held broken packages.

sampie avatar May 20 '19 06:05 sampie

A simple solution is a | dependency in the .deb: cude (>= 7.5) | nvidia-cuda-toolkit (>= 7.5).

VincentSC avatar May 21 '19 10:05 VincentSC

I met the same problem? Any possible solution?

gassive avatar Jan 09 '21 14:01 gassive

Reading package lists... Done Building dependency tree
Reading state information... Done Package hip_nvcc is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: hip-nvcc hip-nvcc4.0.0

E: Package 'hip_nvcc' has no installation candidate

gassive avatar Jan 09 '21 14:01 gassive

A simple solution is a | dependency in the .deb: cude (>= 7.5) | nvidia-cuda-toolkit (>= 7.5).

So you say that we can correct the dependency from cuda to nvidia-cuda-toolkit ? Where do you change that ?

avidov avatar Mar 13 '21 00:03 avidov

I think it would be the time to include rocm to proper distribution channels (as part of distributions, for example, Debian, Ubuntu Fedora, where dependencies are very well managed). Hopefully AMD is working toward this goal.

sampie avatar Mar 13 '21 06:03 sampie

A simple solution is a | dependency in the .deb: cude (>= 7.5) | nvidia-cuda-toolkit (>= 7.5).

So you say that we can correct the dependency from cuda to nvidia-cuda-toolkit ? Where do you change that ?

@avidov You need to download the deb package and manually edit the requirements.

apt-get download hip-nvcc # downloaded as e.g. hip-nvcc_4.3.21300.5994.40300-52_amd64.deb
dpkg-deb -x hip-nvcc_4.3.21300.5994.40300-52_amd64.deb hip-nvcc-d
dpkg-deb --control hip-nvcc_4.3.21300.5994.40300-52_amd64.deb hip-nvcc-d/DEBIAN

Manually edit the following line in hip-nvcc-d/DEBIAN/control

Depends: hip-base (= 4.3.21300.5994.40300-52), cuda (>= 7.5) | nvidia-cuda-toolkit (>= 7.5)
                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this

Repackage and install from your tweaked one

dpkg -b hip-nvcc hip-nvcc_4.3.21300.5994.40300-52_amd64_tweaked.deb
apt-get install ./hip-nvcc_4.3.21300.5994.40300-52_amd64_tweaked.deb

Source

rosenrodt avatar Sep 01 '21 08:09 rosenrodt

@rosenrodt Thank you, with your instructions of editing the package manually, I was able to install hip-runtime-nvidia package to Ubuntu 22.04 LTS.

Is there any easier way nowdays?

sidenote: I also had to edit the header files manually for CUDA 12.x combatibility: https://github.com/ROCm-Developer-Tools/HIP/issues/3222#issuecomment-1537113676

mikaelkuisma1 avatar May 06 '23 11:05 mikaelkuisma1

Hey @mikaelkuisma1, even I could install hip-runtime-cuda following the steps but am unable to run HIP codes yet, was there anything else you had to do like changing environment variables to run your codes? Please see https://github.com/ROCm-Developer-Tools/HIP/issues/3310 for the detailed issue, any help would be appreciated, thankyou!!

Smit703 avatar Aug 21 '23 09:08 Smit703

I was able to work around this by creating a fake "cuda" package using equivs. https://grayson.sh/blogs/faking-dependencies-with-the-equivs-package

cantonios avatar Jan 04 '24 18:01 cantonios

@sampie Do you still need assistance with this issue? If not, please close ticket. Thanks!

ppanchad-amd avatar Apr 29 '24 20:04 ppanchad-amd

@sampie Do you still need assistance with this issue? If not, please close ticket. Thanks!

So, is this now fixed? In what ROCm version this is fixed?

sampie avatar Apr 30 '24 05:04 sampie

Hi @sampie, An internal ticket has been created to fix this issue. Thanks!

harkgill-amd avatar Jun 05 '24 14:06 harkgill-amd

@sampie, nvidia-cuda-toolkit is not supported by hip-nvcc. To resolve the dependency issue noted in this ticket, please install the cuda package from https://developer.nvidia.com/cuda-downloads. Thanks!

harkgill-amd avatar Jun 05 '24 19:06 harkgill-amd

@harkgill-amd What is the difference of cuda package from nvidia and the nvidia-cuda-toolkit package provided by ubuntu repositories, that is, why nvidia-cuda-tookit package is not supported by hip-nvcc? In my ubuntu 24.04 they both seem to provide cuda version 12.

sampie avatar Jun 06 '24 08:06 sampie

The difference between the two packages lies in the installation paths. The official cuda package is installed in /usr/local/cuda whereas nvidia-cuda-toolkit is installed in distribution specific paths. There are various dependencies that look for the cuda installation at /usr/local/cuda. There are currently no plans on enabling support for nvidia-cuda-toolkit, however; open source contributions that enable this are welcome. Thank you!

harkgill-amd avatar Jun 06 '24 15:06 harkgill-amd

@sampie, nvidia-cuda-toolkit is not supported by hip-nvcc. To resolve the dependency issue noted in this ticket, please install the cuda package from https://developer.nvidia.com/cuda-downloads. Thanks!

Just installed 12.5 using that URL - but still get this;

$ sudo apt-get install hip-runtime-nvidia hip-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
hip-dev is already the newest version (6.1.40092.60101-90~22.04).
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:
 hip-runtime-nvidia : Depends: cuda (>= 7.5) but it is not installable
                      Depends: hipcc-nvidia but it is not installable
E: Unable to correct problems, you have held broken packages.

RobQuistNL avatar Jun 06 '24 23:06 RobQuistNL

Hi @RobQuistNL, could you try sudo apt-get install -y cuda-drivers to resolve the cuda dependency. The Depends: hipcc-nvidia but it is not installable dependency has also been reported and is being investigated under the issue below.

https://github.com/ROCm/HIP/issues/3479

harkgill-amd avatar Jun 07 '24 13:06 harkgill-amd

@RobQuistNL Hi, I also meet same error, have you resolved the cuda dependency ?

Siomarry avatar Jul 14 '24 05:07 Siomarry

@Siomarry what I did was this; https://github.com/ROCm/HIP/issues/820#issuecomment-910063554

RobQuistNL avatar Jul 15 '24 08:07 RobQuistNL