Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

Cannot install the modules with kernel version 5.8 #63

Open
alpham-heepsy opened this issue Oct 19, 2020 · 10 comments
Open

Cannot install the modules with kernel version 5.8 #63

alpham-heepsy opened this issue Oct 19, 2020 · 10 comments

Comments

@alpham-heepsy
Copy link

When I try to install anbox on Fedora32 and kernel version 5.8 I get this error message

$ sudo ./INSTALL.sh                                                      

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.8.9-200.fc32.x86_64 all KERNEL_SRC=/lib/modules/5.8.9-200.fc32.x86_64/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.8.9-200.fc32.x86_64 (x86_64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j12 KERNELRELEASE=5.8.9-200.fc32.x86_64 all KERNEL_SRC=/lib/modules/5.8.9-200.fc32.x86_64/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.8.9-200.fc32.x86_64 (x86_64)
Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.
modprobe: FATAL: Module ashmem_linux not found in directory /lib/modules/5.8.9-200.fc32.x86_64
modprobe: FATAL: Module binder_linux not found in directory /lib/modules/5.8.9-200.fc32.x86_64
ls: cannot access '/dev/binder': No such file or directory
ls: cannot access '/dev/ashmem': No such file or directory
@toby63
Copy link

toby63 commented Oct 22, 2020

@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? 🙂.

@magiruuvelvet
Copy link

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

@toby63
Copy link

toby63 commented Oct 26, 2020

@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: #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:

  • Ubuntu and Debian include the modules in their standard kernel by default.
  • Arch has the linux-zen kernel which includes them (see also: Arch wiki on Anbox).
  • maybe other Distros and Kernels have it as well (check with 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? [...]

@magiruuvelvet
Copy link

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.

@toby63
Copy link

toby63 commented Oct 26, 2020

@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: archlinux/svntogit-packages@d8d13d7#diff-8d0411b338c83cd8cd8ad9d9db127101

Just noticed that Android is set to "y"...but binder and ashmem are set to "m".
No clue, was just a guess 😄.

@PaulCombal
Copy link

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.

@mokurin000

This comment has been minimized.

@toby63
Copy link

toby63 commented Nov 3, 2020

@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.

@mokurin000
Copy link

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@PaulCombal @magiruuvelvet @mokurin000 @toby63 @alpham-heepsy and others