anbox / anbox-modules

Anbox kernel modules
328 stars 228 forks source link

Binder not building on pop os #77

Closed zoeleu closed 3 years ago

zoeleu commented 3 years ago
/build/make.log
DKMS make.log for anbox-binder-1 for kernel 5.8.0-7642-generic (x86_64)
Thu Mar 25 07:58:41 PM -03 2021
make -C /lib/modules/5.8.0-7642-generic/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-7642-generic'
  AR      /var/lib/dkms/anbox-binder/1/build/built-in.a
  CC [M]  /var/lib/dkms/anbox-binder/1/build/deps.o
  CC [M]  /var/lib/dkms/anbox-binder/1/build/binder.o
In file included from ././include/linux/kconfig.h:7,
                 from <command-line>:
./include/generated/autoconf.h:4297: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined
 4297 | #define CONFIG_ANDROID_BINDER_DEVICES ""
      | 
<command-line>: note: this is the location of the previous definition
In file included from ././include/linux/kconfig.h:7,
                 from <command-line>:
./include/generated/autoconf.h:4297: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined
 4297 | #define CONFIG_ANDROID_BINDER_DEVICES ""
      | 
<command-line>: note: this is the location of the previous definition
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_update_page_range’:
/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
make[2]: *** [scripts/Makefile.build:284: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1783: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-7642-generic'
make: *** [Makefile:8: all] Error 2
SoulInfernoDE commented 3 years ago

If i remember correct if you are using kernel 5.7+ it is not possible anymore to easily build binder and ashmem as the some things have been removed from those kernels in mind of security.

The fix is to revert patch your kernel / those kernel things or just compile a kernel with ashmem and binder integrated.

You could try to follow my guide how to do this for yourself: (or download my pre-compiled kernel in that thread - without any warranty that it will work for you or any other warranties...) https://github.com/anbox/anbox-modules/issues/75#issuecomment-794079944

zoeleu commented 3 years ago

5.7+ not possible; installed using built in ashmem and binder on linux-zen kernel.