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

ROCM 3.7 rocm-dkms meta package fails to install on pop os 20.04 #1208

Closed
hongshaojichi opened this issue Aug 29, 2020 · 8 comments
Closed

Comments

@hongshaojichi
Copy link

I get a weird error from dpkg:

Loading new amdgpu-3.7-20 DKMS files...
Building for 5.4.0-7642-generic
Building for architecture amd64
Building initial module for 5.4.0-7642-generic
ERROR (dkms apport): kernel package linux-headers-5.4.0-7642-generic is not supported
Error! Bad return status for module build on kernel: 5.4.0-7642-generic (amd64)
Consult /var/lib/dkms/amdgpu/3.7-20/build/make.log for more information.
dpkg: error processing package rock-dkms (--configure):
installed rock-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
rock-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

I checked the log file and it says:

DKMS make.log for amdgpu-3.7-20 for kernel 5.4.0-7642-generic (amd64)
Sat 29 Aug 2020 02:54:24 PM PDT
make: Entering directory '/usr/src/linux-headers-5.4.0-7642-generic'
AR /var/lib/dkms/amdgpu/3.7-20/build/built-in.a
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/main.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_mn.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_memory.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_ioctl.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/ttm/ttm_memory.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_drm.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/ttm/ttm_bo_util.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/3.7-20/build/amd/amdkcl/kcl_fence.o
In file included from :
/var/lib/dkms/amdgpu/3.7-20/build/include/kcl/kcl_version.h:5:34: error: missing expression between '(' and ')'
5 | #define DRM_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
| ^
/var/lib/dkms/amdgpu/3.7-20/build/include/kcl/kcl_version.h:6:26: note: in expansion of macro ‘DRM_VERSION’
6 | #define DRM_VERSION_CODE DRM_VERSION(DRM_VER, DRM_PATCH, DRM_SUB)
| ^~~~~~~~~~~
/var/lib/dkms/amdgpu/3.7-20/build/include/kcl/kcl_fence.h:61:5: note: in expansion of macro ‘DRM_VERSION_CODE’
61 | #if DRM_VERSION_CODE < DRM_VERSION(4, 19, 0)
| ^~~~~~~~~~~~~~~~
Seems like i'm the only one having this weird issue. Did I miss anything in my setup? Thanks!

@srinivamd
Copy link
Collaborator

What is the output of the following commands:
uname -a
and
dpkg -l | grep linux-headers
and
dpkg -l | grep linux-tools

@hongshaojichi
Copy link
Author

hongshaojichi commented Aug 31, 2020

I was checking the makefile and supposedly pop os should be treated the same as "ubuntu" but I guess it fell under generic linux.

I had to hack the /etc/os-release to make it work but I don't think this is a good solution though.

Hi Srinivamd,

Here is the output of the commands you provided:

hsjc@pop-os:$ uname -a
Linux pop-os 5.4.0-7642-generic #46
159742248420.04e78f762-Ubuntu SMP Wed Aug 19 14:35:06 UTC x86_64 x86_64 x86_64 GNU/Linux
hsjc@pop-os:$ dpkg -l | grep linux-headers
ii linux-headers-5.4.0-7642 5.4.0-7642.46
159742248420.04e78f762 all Header files related to Linux kernel version 5.4.0
ii linux-headers-5.4.0-7642-generic 5.4.0-7642.46159742248420.04e78f762 amd64 Linux kernel headers for version 5.4.0 on 64 bit x86 SMP
ii linux-headers-generic 5.4.0.7642.46
159742248420.04e78f762 amd64 Generic Linux kernel headers
hsjc@pop-os:$ dpkg -l | grep linux-tools
hsjc@pop-os:
$

EDIT: Not sure why the texts have strikethrough in them

@srinivamd
Copy link
Collaborator

Thank you for the info. The versions of the packages are all aligned - sometimes these issues occur when the headers/tools versions do not exactly align with kernel version.

I had to hack the /etc/os-release to make it work
Made it "like ubuntu"? lsb_release -i for Pop OS different?
Could you please share the hack to get it working?

@hongshaojichi
Copy link
Author

hsjc@pop-os:$ lsb_release -i
Distributor ID: Pop
hsjc@pop-os:
$ cat /etc/os-release
NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://pop.system76.com"
SUPPORT_URL="https://support.system76.com"
BUG_REPORT_URL="https://github.com/pop-os/pop/issues"
PRIVACY_POLICY_URL="https://system76.com/privacy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
LOGO=distributor-logo-pop-os

I temporarily changed ID from "pop" to "ubuntu" and everything installed.

@TommyHolmberg
Copy link

@hongshaojichi Thank you so much! I've been looking for a solution for so long and your comment fixed it.

To others reading: I first tried to edit the os-release file in a text editor but it won't save because of permissions. Use sudo nano to edit it.

@hongshaojichi
Copy link
Author

Thank you for the info. The versions of the packages are all aligned - sometimes these issues occur when the headers/tools versions do not exactly align with kernel version.

I had to hack the /etc/os-release to make it work
Made it "like ubuntu"? lsb_release -i for Pop OS different?
Could you please share the hack to get it working?

Since Pop OS is just derivative of ubuntu, can we fix the makefile so that pop can be installed properly without hacking?

@josarv
Copy link

josarv commented Dec 1, 2020

The hack mentioned above did not work for me. Would it be difficult to support pop os as well regarding to how similar it is to ubuntu? Us pop users are stuck with basically no opencl functionality at all :(

@ROCmSupport
Copy link

Thanks @hongshaojichi
pop OS is not an officially supported as of now. But things might work as you tried with hacks.

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

No branches or pull requests

5 participants