ROCK-Kernel-Driver icon indicating copy to clipboard operation
ROCK-Kernel-Driver copied to clipboard

Module build failure with 5.13.0

Open da-phil opened this issue 4 years ago • 3 comments

I tried to install the amdgpu-dkms module on Ubuntu 20.4.3, first I failed due to the issue with compiler flags, which was solved in https://github.com/RadeonOpenCompute/ROCK-Kernel-Driver/pull/117, but now I'm getting nasty conflicting types compile errors, like

/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_topology.h:229:11: error: conflicting types for ‘amd_iommu_pc_get_max_banks’
  229 | extern u8 amd_iommu_pc_get_max_banks(u16 devid);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:31:
./include/linux/amd-iommu.h:201:4: note: previous declaration of ‘amd_iommu_pc_get_max_banks’ was here
  201 | u8 amd_iommu_pc_get_max_banks(unsigned int idx);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:34:
/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_topology.h:230:11: error: conflicting types for ‘amd_iommu_pc_get_max_counters’
  230 | extern u8 amd_iommu_pc_get_max_counters(u16 devid);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:31:
./include/linux/amd-iommu.h:202:4: note: previous declaration of ‘amd_iommu_pc_get_max_counters’ was here
  202 | u8 amd_iommu_pc_get_max_counters(unsigned int idx);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:347:11: error: conflicting types for ‘amd_iommu_pc_get_max_banks’
  347 | extern u8 amd_iommu_pc_get_max_banks(u16 devid);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:31:
./include/linux/amd-iommu.h:201:4: note: previous declaration of ‘amd_iommu_pc_get_max_banks’ was here
  201 | u8 amd_iommu_pc_get_max_banks(unsigned int idx);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:348:11: error: conflicting types for ‘amd_iommu_pc_get_max_counters’
  348 | extern u8 amd_iommu_pc_get_max_counters(u16 devid);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.c:31:
./include/linux/amd-iommu.h:202:4: note: previous declaration of ‘amd_iommu_pc_get_max_counters’ was here
  202 | u8 amd_iommu_pc_get_max_counters(unsigned int idx);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:281: /var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_iommu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_debug.c: In function ‘kfd_dbg_trap_device_snapshot’:
/var/lib/dkms/amdgpu/5.11.32-1331380/build/amd/amdgpu/../amdkfd/kfd_debug.c:952:1: warning: the frame size of 1040 bytes is larger than 1024 bytes [-Wframe-larger-than=]
  952 | }

I attached the whole build log: make.log

Which kernels are officially tested with this release? I couldn't find this information anywhere, but I suppose version 5.4 for Ubuntu 20.04.3?

Building the module worked for the following two Ubuntu kernels though:

  • 5.11.0-42-generic
  • 5.4.0-92-generic

da-phil avatar Dec 04 '21 22:12 da-phil

I get the same conflicting types errors with amdgpu-dkms package version 5.11.32.40502-1350682.

I'm on kernel 5.13.0-22-generic. Have not tested with a 5.11 kernel or below.

francistheodorecatte avatar Dec 15 '21 03:12 francistheodorecatte

I get the same conflicting types errors with amdgpu-dkms package version 5.11.32.40502-1350682.

I'm on kernel 5.13.0-22-generic. Have not tested with a 5.11 kernel or below.

I'm now on 5.11.0-42-generic and everything has been working smoothly, since creating the issue. I think I remember AMD stating that supporting more kernels is a current work-in-progress.

da-phil avatar Dec 15 '21 09:12 da-phil

Bug report on the official drivers repository: https://gitlab.freedesktop.org/drm/amd/-/issues/1870.

64kramsystem avatar Jan 26 '22 17:01 64kramsystem

Closing since gitlab ticket is open (and that's the right place for this issue)

kentrussell avatar Feb 24 '23 22:02 kentrussell