There is an error while compiling rocm-dkms (but why is it being compiled? I thought it was prebuilt) and here is the log.
DKMS make.log for amdgpu-3.5-32 for kernel 5.4.0-91-generic (x86_64)
lun 27 dic 2021, 19:40:04, CET
make: Entering directory '/usr/src/linux-headers-5.4.0-91-generic'
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/main.o
AR /var/lib/dkms/amdgpu/3.5-32/build/built-in.a
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/symbols.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_mn.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_memory.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_ioctl.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_device_cgroup.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_drm_cache.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/scheduler/sched_main.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_drm.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/scheduler/sched_fence.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_memory.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_drv.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_tt.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_fence_array.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_fence.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_io.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_kthread.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_device.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/scheduler/sched_entity.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_mm.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_pci.o
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_fence.c:29:1: warning: ‘dma_fence_test_signaled_any’ defined but not used [-Wunused-function]
29 | dma_fence_test_signaled_any(struct dma_fence fences, uint32_t count,
| ^~~~~~~
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_bo.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_perf_event.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_kms.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_reservation.o
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_pci.c: In function ‘amdkcl_pci_init’:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_pci.c:102:84: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
102 | _kcl_pcie_link_speed = (const unsigned char ) amdkcl_fp_setup("pcie_link_speed", _kcl_pcie_link_speed_stub);
| ^~~~~~~~~
In file included from /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_pci.c:3:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_common.h:23:63: note: expected ‘void ’ but argument is of type ‘const unsigned char ’
23 | static inline void amdkcl_fp_setup(const char symbol, void fp_stup)
| ~~^~~
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/dma-resv.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_bo_util.o
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_reservation.c: In function ‘amdkcl_reservation_init’:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_reservation.c:58:10: warning: passing argument 2 of ‘amdkcl_fp_setup’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-array-qualifiers]
58 | &_kcl_reservation_seqcount_string_stub);
| ^~~~~~~~~~
In file included from /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_reservation.c:32:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_common.h:23:63: note: expected ‘void ’ but argument is of type ‘const char ()[21]’
23 | static inline void amdkcl_fp_setup(const char symbol, void fp_stup)
| ~~^~~
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_bo_vm.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_suspend.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_module.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_workqueue.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_seq_file.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/kcl_connector.o
LD [M] /var/lib/dkms/amdgpu/3.5-32/build/scheduler/amd-sched.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_execbuf_util.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_atombios.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/atombios_crtc.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_connectors.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_page_alloc.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/atom.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_bo_manager.o
LD [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdkcl/amdkcl.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_agp_backend.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/ttm_page_alloc_dma.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_fence.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_ttm.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_object.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_gart.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_encoders.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_display.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_i2c.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_fb.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_gem.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_ring.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_cs.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_bios.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_benchmark.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_test.o
LD [M] /var/lib/dkms/amdgpu/3.5-32/build/ttm/amdttm.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_pm.o
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_fb.c: In function ‘amdgpufb_create’:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_fb.c:253:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
253 | info->fbops = &amdgpufb_ops;
| ^
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/atombios_dp.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_afmt.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_trace_points.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/atombios_encoders.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_sa.o
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_bios.c: In function ‘amdgpu_read_platform_bios’:
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_bios.c:200:9: error: implicit declaration of function ‘pci_platform_rom’ [-Werror=implicit-function-declaration]
200 | bios = pci_platform_rom(adev->pdev, &size);
| ^~~~
/var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_bios.c:200:7: warning: assignment to ‘uint8_t ’ {aka ‘unsigned char ’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
200 | bios = pci_platform_rom(adev->pdev, &size);
| ^
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/atombios_i2c.o
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_dma_buf.o
cc1: some warnings being treated as errors
CC [M] /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_vm.o
make[2]: [scripts/Makefile.build:270: /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu/amdgpu_bios.o] Error 1
make[2]: Waiting for unfinished jobs....
make[1]: [scripts/Makefile.build:519: /var/lib/dkms/amdgpu/3.5-32/build/amd/amdgpu] Error 2
make: *** [Makefile:1762: /var/lib/dkms/amdgpu/3.5-32/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.0-91-generic'
There is an error while compiling rocm-dkms (but why is it being compiled? I thought it was prebuilt) and here is the log.
Any suggestion? Thanks in advance.