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

module build failure with 5.11.0

Open zhol01825 opened this issue 4 years ago • 7 comments

Hi all, I am trying to build fxkamd/criu-wip branch to try out criu amd plugin, while dkms amdgpu module build failed with following, anyone has any idea?

Building module: cleaning build area...(bad exit status: 2) make -j256 KERNELRELEASE=5.11.0 -j256 TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/5.11.0/build M=/var/lib/dkms/amdgpu/4.3-59/build......................................................(bad exit status: 2) ERROR (dkms apport): kernel package linux-headers-5.11.0 is not supported Error! Bad return status for module build on kernel: 5.11.0 (x86_64) Consult /var/lib/dkms/amdgpu/4.3-59/build/make.log for more information.

make.log (file attached): DKMS make.log for amdgpu-4.3-59 for kernel 5.11.0 (x86_64) Wed Oct 27 03:16:16 AM PDT 2021 /var/lib/dkms/amdgpu/4.3-59/build/Makefile:26: "Local GCC version 90303 does not match kernel compiler GCC version 90300" /var/lib/dkms/amdgpu/4.3-59/build/Makefile:27: "This may cause unexpected and hard-to-isolate compiler-related issues" CC [M] /var/lib/dkms/amdgpu/4.3-59/build/scheduler/sched_main.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/scheduler/sched_fence.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/scheduler/sched_entity.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_tt.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_bo.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_bo_util.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_bo_vm.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_module.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_execbuf_util.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_range_manager.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/amd/amdkcl/main.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_resource.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/ttm/ttm_pool.o CC [M] /var/lib/dkms/amdgpu/4.3-59/build/amd/amdkcl/symbols.o In file included from /var/lib/dkms/amdgpu/4.3-59/build/scheduler/backport/backport.h:5, from : ./include/generated/uapi/linux/version.h:6: warning: "DRM_VERSION_CODE" redefined 6 | #define DRM_VERSION_CODE 330496 | In file included from /var/lib/dkms/amdgpu/4.3-59/build/scheduler/backport/backport.h:5, from : ./include/generated/uapi/linux/version.h:6: warning: "DRM_VERSION_CODE" redefined 6 | #define DRM_VERSION_CODE 330496 | In file included from /var/lib/dkms/amdgpu/4.3-59/build/scheduler/backport/backport.h:5, from : ./include/generated/uapi/linux/version.h:6: warning: "DRM_VERSION_CODE" redefined 6 | #define DRM_VERSION_CODE 330496

...

In file included from /var/lib/dkms/amdgpu/4.3-59/build/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:35, from /var/lib/dkms/amdgpu/4.3-59/build/amd/backport/backport.h:80, from : /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/amdgpu.h:1231: note: this is the location of the previous definition 1231 | #define REG_SET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK) | In file included from /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/../display/dmub/src/dmub_dcn21.c:27: /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/../display/dmub/src/dmub_reg.h:112: warning: "REG_GET" redefined 112 | #define REG_GET(reg_name, field, val)
| In file included from /var/lib/dkms/amdgpu/4.3-59/build/amd/backport/include/kcl/kcl_amdgpu_drm_fb_helper.h:35, from /var/lib/dkms/amdgpu/4.3-59/build/amd/backport/backport.h:80, from : /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/amdgpu.h:1232: note: this is the location of the previous definition 1232 | #define REG_GET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK) | /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/../display/dc/core/dc_debug.c: In function ‘dc_status_to_str’: /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/../display/dc/core/dc_debug.c:378:2: warning: enumeration value ‘DC_FAIL_DSC_VALIDATE’ not handled in switch [-Wswitch] 378 | switch (status) { | ^~~~~~ /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/../display/dc/core/dc_debug.c:378:2: warning: enumeration value ‘DC_NO_DSC_RESOURCE’ not handled in switch [-Wswitch] LD [M] /var/lib/dkms/amdgpu/4.3-59/build/amd/amdgpu/amdgpu.o grep: arch/x86/boot/amd/dkms/config/config.h: No such file or directory /var/lib/dkms/amdgpu/4.3-59/build/Makefile:16: *** dma_resv->seq is missing., exit.... Stop. make[2]: *** [Makefile:1710: modules] Error 2

Ubuntu 20.04.3 LTS (Focal Fossa) Current kernel: 5.11.0-051100-generic

make.log

zhol01825 avatar Oct 27 '21 10:10 zhol01825

@rajbhar any chance you have some ideas?

zhol01825 avatar Oct 28 '21 03:10 zhol01825

This is monolithic kernel branch. We are currently working on updating our APIs to recent kernel versions.

rajbhar avatar Oct 28 '21 03:10 rajbhar

@zhol01825 Have you tried kernel 5.11.0-42-generic on your system yet?

I've been successfully using this kernel version together with the amdgpu 21.40.1 driver (installed from .deb packages and then via sudo amdgpu-install --opencl=rocr --vulkan=pro).

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

@zhol01825 Have you resolve this problem? I also want to build fxkamd/criu-wip branch but don't know what is the correct compile command.

malixian avatar Apr 24 '22 03:04 malixian

All CRIU APIs are now available upstream. Feel free to use https://gitlab.freedesktop.org/agd5f/linux/-/commits/amd-staging-drm-next or any latest upstream kernel branch such as https://elixir.bootlin.com/linux/v5.18-rc4/source/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c#L2524

rajbhar avatar Apr 24 '22 23:04 rajbhar

All CRIU APIs are now available upstream. Feel free to use https://gitlab.freedesktop.org/agd5f/linux/-/commits/amd-staging-drm-next or any latest upstream kernel branch such as https://elixir.bootlin.com/linux/v5.18-rc4/source/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c#L2524

So I need to install rocm 5.18 to enjoy?

malixian avatar Apr 25 '22 06:04 malixian

Is there some compile option available to compile the kernel module? I want to use CRIU in rocm-4.3(rock-4.3),if possible.

malixian avatar Apr 25 '22 06:04 malixian