Open alpham-heepsy opened 4 years ago
@morphis There are several issues on this problem, could you maybe add a little note about the dkms modules not being usable in kernel >=5.7? :slightly_smiling_face:.
are the standalone anbox modules not supported anymore in general? the last meaningful commit was 2 years ago. trying to get anbox running with a generic binary kernel is a mess right now, if you are not willing to compile your own kernel.
well there are always virtual machines as last resort
@magiruuvelvet Well, kernels below 5.7 still support the modules.
There was a change in the newer kernels and it seems that is blocking the use of dkms for the modules that are needed by anbox, see also: https://github.com/anbox/anbox-modules/issues/49
So the only way to use Anbox on newer kernels is to use a kernel which includes the modules. You can either install an appropriate kernel (see below for examples) or you have to rebuild the kernel with the necessary options.
Some systems include the modules in their kernels by default:
linux-zen
kernel which includes them (see also: Arch wiki on Anbox).modinfo
or check the kernel config in the source code of your distros repo, whether they are included)
Also: It doesn't hurt to ask your maintainers to include them.Note: I clarified the above comment for others reading this.
The original comment included:
But what system do you use? [...]
I use Gentoo (the joke here is that Gentoo now has generic binary kernels and I'm using one because I'm lazy). I used Anbox in KVM virtual machines in the past, but it was laggy as hell. I checked the config for Android and it looks like you can't build them as modules. I'd rather not have those built-in so I can remove/blacklist the modules as needed.
@magiruuvelvet I am no expert on kernel stuff, but Debian and Arch use binder configs that build the modules with the "m"(module) option. I think that should make them "blacklistable". See for example: https://github.com/archlinux/svntogit-packages/commit/d8d13d766ca79ebb788a484b8d24ffa83f12fc52#diff-8d0411b338c83cd8cd8ad9d9db127101
Just noticed that Android is set to "y"...but binder and ashmem are set to "m". No clue, was just a guess :smile:.
I have a similar issue with kernel 5.8. The log file says:
/var/lib/dkms/anbox-binder/1/build/binder.c:633:19: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
633 | down_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:683:17: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
683 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/var/lib/dkms/anbox-binder/1/build/binder.c:710:17: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
710 | up_write(&mm->mmap_sem);
| ^~~~~~~~
| mmap_base
I'm running Ubuntu 20.04 with an upgraded kernel.
It looks like the code will need to be adjusted for newer kernels. Another unrelated project had the same issue.
@magiruuvelvet Well, kernels below 5.7 still support the modules.
There was a change in the kernels and it seems that is blocking the use of dkms for the modules that are needed by anbox, see also: #49
But what system do you use?
* Ubuntu and Debian include the modules by default. * Arch has the `linux-zen` kernel which supports it. * maybe others have it as well Also: It doesn't hurt to ask your maintainers to include it.
no
==> dkms install --no-depmod -m anbox-modules-ashmem -v 1292.7f1bfaf -k 5.9.2-arch1-1
Error! Bad return status for module build on kernel: 5.9.2-arch1-1 (x86_64)
Consult /var/lib/dkms/anbox-modules-ashmem/1292.7f1bfaf/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m anbox-modules-ashmem -v 1292.7f1bfaf -k 5.9.2-arch1-1' returned 10
==> dkms install --no-depmod -m anbox-modules-ashmem -v 1292.7f1bfaf -k 5.9.2-zen1-1-zen
Error! Bad return status for module build on kernel: 5.9.2-zen1-1-zen (x86_64)
Consult /var/lib/dkms/anbox-modules-ashmem/1292.7f1bfaf/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m anbox-modules-ashmem -v 1292.7f1bfaf -k 5.9.2-zen1-1-zen' returned 10
==> dkms install --no-depmod -m anbox-modules-binder -v 1292.7f1bfaf -k 5.9.2-zen1-1-zen
Error! Bad return status for module build on kernel: 5.9.2-zen1-1-zen (x86_64)
Consult /var/lib/dkms/anbox-modules-binder/1292.7f1bfaf/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m anbox-modules-binder -v 1292.7f1bfaf -k 5.9.2-zen1-1-zen' returned 10
==> dkms install --no-depmod -m anbox-modules-binder -v 1292.7f1bfaf -k 5.9.2-arch1-1
Error! Bad return status for module build on kernel: 5.9.2-arch1-1 (x86_64)
Consult /var/lib/dkms/anbox-modules-binder/1292.7f1bfaf/build/make.log for more information.
==> Warning, `dkms install --no-depmod -m anbox-modules-binder -v 1292.7f1bfaf -k 5.9.2-arch1-1' returned 10
==> depmod 5.9.2-zen1-1-zen
@poly000 Read again, you missunderstood things.
5.9.2 > 5.7, so dkms modules don't work. Follow the Arch wiki (Anbox) instead.
I clarified the above comment though; for people not familiar with modules, it might have been missunderstood.
@poly000 Read again, you missunderstood things.
5.9.2 > 5.7, so dkms modules don't work. Follow the Arch wiki (Anbox) instead.
I clarified the above comment though; for people not familiar with modules, it might have been missunderstood.
thanks, I found the guide
now using linux-zen
and enabled binder_linux ashmem-linux,
anbox works fine.
When I try to install anbox on Fedora32 and kernel version 5.8 I get this error message