You are not logged in.
I tried to install the xrt package and I got some error messages. The system is up-to-date. I ran pacman -Syu and reboot before installing xrt.
Here's the error message:
$ sudo pacman -S xrt
warning: xrt-1:2.21.75-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
Packages (1) xrt-1:2.21.75-2
Total Installed Size: 47.63 MiB
Net Upgrade Size: 0.00 MiB
:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring [###########################################] 100%
(1/1) checking package integrity [###########################################] 100%
(1/1) loading package files [###########################################] 100%
(1/1) checking for file conflicts [###########################################] 100%
(1/1) checking available disk space [###########################################] 100%
:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
==> dkms remove --no-depmod xrt-aws/2.21.0 -k 6.19.6-arch1-1
==> dkms remove --no-depmod xrt/2.21.0 -k 6.19.6-arch1-1
:: Processing package changes...
(1/1) reinstalling xrt [###########################################] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Install DKMS modules
==> dkms install --no-depmod xrt/2.21.0 -k 6.19.6-arch1-1
Deprecated feature: CLEAN (/usr/src/xrt-2.21.0/dkms.conf)
Error! Build of driver/xocl/userpf/xocl.ko failed for: 6.19.6-arch1-1 (x86_64)
Make sure the name and location of the generated module are correct,
or consult /var/lib/dkms/xrt/2.21.0/build/make.log for more information.
==> WARNING: `dkms install --no-depmod xrt/2.21.0 -k 6.19.6-arch1-1' exited 7
==> dkms install --no-depmod xrt-aws/2.21.0 -k 6.19.6-arch1-1
Deprecated feature: CLEAN (/usr/src/xrt-aws-2.21.0/dkms.conf)
==> depmod 6.19.6-arch1-1
(3/3) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.19.6-arch1-1'
-> Running build hook: [base]
-> Running build hook: [systemd]
-> Running build hook: [autodetect]
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
-> Running build hook: [keyboard]
-> Running build hook: [keymap]
-> Running build hook: [sd-vconsole]
-> Running build hook: [block]
-> Running build hook: [filesystems]
-> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
-> Early uncompressed CPIO image generation successful
==> Initcpio image generation successfulSo I followed the message and checked /var/lib/dkms/xrt/2.21.0/build/make.log, here's what I found:
xocl_drv.c: In function ‘xocl_cma_mem_alloc_huge_page’:
xocl_drv.c:1419:17: error: implicit declaration of function ‘DRM_ERROR’; did you mean ‘SO_ERROR’? [-Wimplicit-function-declaration]
1419 | DRM_ERROR("Request %lld, round down to power of 2 %lld\n",
| ^~~~~~~~~
| SO_ERROR
xocl_drv.c: In function ‘xocl_cma_mem_alloc’:
xocl_drv.c:1599:17: error: implicit declaration of function ‘DRM_WARN’; did you mean ‘VM_WARN’? [-Wimplicit-function-declaration]
1599 | DRM_WARN("Unable to allocate with page size 0x%llx", page_sz);
| ^~~~~~~~
| VM_WARN
xocl_drv.c: In function ‘xocl_cma_bank_alloc’:
xocl_drv.c:1672:25: error: implicit declaration of function ‘DRM_INFO’; did you mean ‘DRM_IO’? [-Wimplicit-function-declaration]
1672 | DRM_INFO("HOST MEM already allocated, skip");
| ^~~~~~~~
| DRM_IO
make[5]: *** [/usr/lib/modules/6.19.6-arch1-1/build/scripts/Makefile.build:289: xocl_drv.o] Error 1
make[4]: *** [/usr/lib/modules/6.19.6-arch1-1/build/Makefile:2064: .] Error 2
make[3]: *** [/usr/lib/modules/6.19.6-arch1-1/build/Makefile:248: __sub-make] Error 2
make[3]: Leaving directory '/var/lib/dkms/xrt/2.21.0/build/driver/xocl/userpf'
make[2]: *** [Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/usr/lib/modules/6.19.6-arch1-1/build'
make[1]: *** [Makefile:137: all] Error 2
make[1]: Leaving directory '/var/lib/dkms/xrt/2.21.0/build/driver/xocl/userpf'
make: *** [Makefile:2: all] Error 2Strange... So I checked my linux-headers and found that the missing symbols are defined in /usr/lib/modules/6.19.6-arch1-1/build/include/drm/drm_print.h.
So, the headers should be good.
Finally, I followed the build log and checked the faulty code file: /usr/src/xrt-2.21.0/driver/xocl/xocl_drv.h and /usr/src/xrt-2.21.0/driver/xocl/userpf/xocl_drv.c.
Guess what I found, it didn't include drm/drm_print.h at all!
So, I manually added a line in xocl_drv.h:
#include <drm/drm_print.h>and then, dkms install again:
$ sudo dkms install --no-depmod xrt/2.21.0 -k 6.19.6-arch1-1
Deprecated feature: CLEAN (/var/lib/dkms/xrt/2.21.0/source/dkms.conf)
Sign command: /usr/lib/modules/6.19.6-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module(s)...................... done.
Signing module /var/lib/dkms/xrt/2.21.0/build/driver/xocl/userpf/xocl.ko
Signing module /var/lib/dkms/xrt/2.21.0/build/driver/xocl/mgmtpf/xclmgmt.ko
Installing /usr/lib/modules/6.19.6-arch1-1/updates/dkms/xocl.ko.zst
Installing /usr/lib/modules/6.19.6-arch1-1/updates/dkms/xclmgmt.ko.zst
Running depmod... done.And success! It compiles.
I'm not sure what to do now. I'm not even sure if I did it right.
Because I think that xrt's developers won't make such elementary mistake. There should be something else went wrong.
So, I'm here to ask:
1. Did I do to the right thing and fixed a bug or did I miss something that actually caused this issue?
2. Should I submit a bug report?
3. If a bug report is needed, then to whom should it be submitted. (xrt developers or Arch Linux package maintainers?)
Offline
Does it build as-is with the -lts kernel? If something in the kernel headers previously pulled in that header but doesn't now, this is exactly what you'd see. If that's the issue, it should probably be reported upstream if it hasn't already been. Since the package isn't functional, though, reporting it to Arch with a link to the upstream issue makes sense. Side note, why does this package not depend on dkms?
Offline