Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not install hip_nvcc on Ubuntu 18.04 #820

Open
sampie opened this issue Dec 19, 2018 · 21 comments
Open

Can not install hip_nvcc on Ubuntu 18.04 #820

sampie opened this issue Dec 19, 2018 · 21 comments

Comments

@sampie
Copy link

sampie commented Dec 19, 2018

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?

@mangupta
Copy link
Contributor

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-

@sampie
Copy link
Author

sampie commented May 20, 2019

$ 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.

@VincentSC
Copy link
Contributor

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

@gassive
Copy link

gassive commented Jan 9, 2021

I met the same problem? Any possible solution?

@gassive
Copy link

gassive commented Jan 9, 2021

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

@avidov
Copy link

avidov commented Mar 13, 2021

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 ?

@sampie
Copy link
Author

sampie commented Mar 13, 2021

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.

@rosenrodt
Copy link

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

@mikaelkuisma1
Copy link

@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:
#3222 (comment)

@Smit703
Copy link

Smit703 commented Aug 21, 2023

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 #3310 for the detailed issue, any help would be appreciated, thankyou!!

@cantonios
Copy link

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

@ppanchad-amd
Copy link

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

@sampie
Copy link
Author

sampie commented Apr 30, 2024

@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?

@harkgill-amd
Copy link

harkgill-amd commented Jun 5, 2024

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

@harkgill-amd
Copy link

@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!

@sampie
Copy link
Author

sampie commented Jun 6, 2024

@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.

@harkgill-amd
Copy link

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!

@RobQuistNL
Copy link

@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.

@harkgill-amd
Copy link

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.

#3479

@Siomarry
Copy link

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

@RobQuistNL
Copy link

RobQuistNL commented Jul 15, 2024

@Siomarry what I did was this;
#820 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests