anbox-modules
anbox-modules copied to clipboard
In fedora 37, when install kernel module by dkms there's some issue reported
DKMS make.log for anbox-ashmem-1 for kernel 6.0.16-300.fc37.x86_64 (x86_64)
Sun Jan 8 01:13:59 PM CST 2023
make -C /lib/modules/6.0.16-300.fc37.x86_64/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/kernels/6.0.16-300.fc37.x86_64'
CC [M] /var/lib/dkms/anbox-ashmem/1/build/deps.o
CC [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem.o
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c: In function ‘ashmem_init’:
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c:877:9: error: too few arguments to function ‘register_shrinker’
877 | register_shrinker(&ashmem_shrinker);
| ^~~~~~~~~~~~~~~~~
In file included from ./include/linux/list_lru.h:13,
from ./include/linux/fs.h:13,
from /var/lib/dkms/anbox-ashmem/1/build/ashmem.c:25:
./include/linux/shrinker.h:99:27: note: declared here
99 | extern int __printf(2, 3) register_shrinker(struct shrinker *shrinker,
| ^~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:249: /var/lib/dkms/anbox-ashmem/1/build/ashmem.o] Error 1
make[1]: *** [Makefile:1856: /var/lib/dkms/anbox-ashmem/1/build] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.0.16-300.fc37.x86_64'
make: *** [Makefile:12: all] Error 2
I'm having the same issue.
+1 Exactly same error, but with kernel 6.1.8-200.fc37 And based on #75 , the building using DKMS isn't supported anymore in kernel, we need to recompile it with the anroid options enabled.
That is correct :+1: :zap:
you could try to adapt my write up from the fedora documentation: https://fedoraproject.org/wiki/Building_a_custom_kernel
Today I wanted to upgrade my Debian 11 to 12 and in the process new kernel modules was attempted to be compiled with the same error. make.log Is this module really needed for my normal use (I do not plan to run any android containers)? If it is not used how can I install the new kernel 6.1.0-9-amd64 (x86_64) without this module trying to be compiled?
I do not know what will I loose/not work, but I uninstalled linux-headers and only installed linux-image 6.1.0-9 and so far I see no issues. But what will I loose without these modules installed?
To clarify you need to build ASHMEM with patches from user choff on github as a module for use with anbox as anbox IS a container system.. You CANNOT build BINDER as a module in newer installed kernel versions any more. If your installed kernel has binder already burned inside the kernel you only need the patched ashmem module i mentioned for anbox which is most of the time not the case. In that case you need TO REBUILD THE WHOLE KERNEL FROM SOURCE and burn BINDER or BINDERFS into the kernel.
First of all it is recommend to clean installed binder and ashmem modules out of dkms beforehand:
sudo dkms remove -m anbox-ashmem/1 --all sudo dkms remove -m anbox-binder/1 --all
And then you can look here to rebuild the fedora kernel with enabled BINDER inside the ".config" file.
Hope this helps a bit 🙂