Digimend refuses to build/install due to the missing Linux-headers but headers already installed

I tried to install digimend-kernel-drivers-9 to improve support for my graphic tablet and to get WineHQ applications to use pen pressure and tilt. However, it refuses to build.
Performing make outputs the following:

make -C /lib/modules/5.4.85-1-MANJARO/build SUBDIRS=/home/fubar/Desktop/iso/gt/digimend-kernel-drivers-9 modules
make[1]: Entering directory '/usr/lib/modules/5.4.85-1-MANJARO/build'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/usr/lib/modules/5.4.85-1-MANJARO/build'
make: *** [Makefile:22: modules] Error 2

I double-checked for what headers are installed.
pacman -Q | grep headers outputs:

linux-api-headers 5.8-1
linux-latest-headers 5.10-1
linux510-headers 5.10.2-2

uname -r says:
5.4.85-1-MANJARO

mhwd-kernel -li says:
Currently running: 5.4.85-1-MANJARO (linux54)
The following kernels are installed in your system:
* linux54

So I guess, the package refuses to build because of messed-up headers or broken linking routines. I also tried to install digimend from AUR
sudo trizen -S digimend-kernel-drivers-dkms-git

it collects everything properly, but the last step fails for the same reason:

(1/3) Reloading device manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Install DKMS modules
==> Unable to install module digimend-kernel-drivers/10.r0.gec5c16d for kernel 5.10.2-2-MANJARO: Missing kernel modules tree.
==> Unable to install module digimend-kernel-drivers/10.r0.gec5c16d for kernel 5.4.85-1-MANJARO: Missing kernel headers.

Is there any exact steps to fix it?

You don’t have the linux54-headers installed.

Building on whst @NGr says, the command is:

sudo pamac install linux54-headers

I did, and everything has been updated. However, Makefile now spits out something other:

[fubar@perkele digimend-kernel-drivers-9]$ sudo make
make -C /lib/modules/5.4.89-1-MANJARO/build SUBDIRS=/home/fubar/Desktop/iso/gt/digimend-kernel-drivers-9 modules
make[1]: Entering directory '/usr/lib/modules/5.4.89-1-MANJARO/build'
scripts/Makefile.build:42: arch/x86/entry/syscalls/Makefile: No such file or directory
make[2]: *** No rule to make target 'arch/x86/entry/syscalls/Makefile'.  Stop.
make[1]: *** [arch/x86/Makefile:238: archheaders] Error 2
make[1]: Leaving directory '/usr/lib/modules/5.4.89-1-MANJARO/build'
make: *** [Makefile:22: modules] Error 2

and AUR installer still fails at the last step:

:: Running pre-transaction hooks...
(1/1) Remove upgraded DKMS modules
==> dkms remove --no-depmod -m digimend-kernel-drivers -v 10.r0.gec5c16d -k 5.4.89-1-MANJARO
==> Unable to remove module digimend-kernel-drivers/10.r0.gec5c16d for kernel 5.10.7-3-MANJARO: Not found in dkms status output.
:: Processing package changes...
(1/1) reinstalling digimend-kernel-drivers-dkms-git                                                                                   [#################################################################################] 100%
:: Running post-transaction hooks...
(1/3) Reloading device manager configuration...
(2/3) Arming ConditionNeedsUpdate...
(3/3) Install DKMS modules
==> dkms install --no-depmod -m digimend-kernel-drivers -v 10.r0.gec5c16d -k 5.4.89-1-MANJARO
==> depmod 5.4.89-1-MANJARO
==> Unable to install module digimend-kernel-drivers/10.r0.gec5c16d for kernel 5.10.7-3-MANJARO: Missing kernel modules tree.

In your first post you listed the following headers as installed, but the version doesn’t match the kernel (5.10.7-3). Maybe check everything is updated?

I had updated the headers. The pacman -Syyuu says that there is nothing to update. The last 3 lines are still saying that there are missing headers for 5.10.7-3. But, I noticed that now pen tilt support has appeared in Krita. Also, Photoshop CC 2017 which installed in Wine, started to recognize pen pressure and tilt (glitchy, laggy, but there it is). So, I guess, the correct digimend was actually installed while performing a global update from pamac. I think, the problem considers to be solved.

You should not use this to update btw. You want pacman -Syyu or pacman -Syu