anbox-modules icon indicating copy to clipboard operation
anbox-modules copied to clipboard

Modules build error kernel 5.17

Open Augusto7743 opened this issue 3 years ago • 2 comments

Hello. Thanks for doing Anbox. I have downloaded and extracted anbox-modules-master.zip. All commands below run sudo cp anbox.conf /etc/modules-load.d/ sudo cp 99-anbox.rules /lib/udev/rules.d/ sudo cp -rT ashmem /usr/src/anbox-ashmem-1 sudo cp -rT binder /usr/src/anbox-binder-1

When trying dkms show errors.

sudo dkms install anbox-ashmem/1

Creating symlink /var/lib/dkms/anbox-ashmem/1/source -> /usr/src/anbox-ashmem-1

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j6 KERNELRELEASE=5.17.4-051704-generic all KERNEL_SRC=/lib/modules/5.17.4-051704-generic/build....(bad exit status: 2) ERROR (dkms apport): binary package for anbox-ashmem: 1 not found Error! Bad return status for module build on kernel: 5.17.4-051704-generic (x86_64) Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

sudo dkms install anbox-binder/1

DKMS: add completed.

Kernel preparation unnecessary for this kernel. Skipping...

Building module: cleaning build area... make -j6 KERNELRELEASE=5.17.4-051704-generic all KERNEL_SRC=/lib/modules/5.17.4-051704-generic/build....(bad exit status: 2) ERROR (dkms apport): binary package for anbox-binder: 1 not found Error! Bad return status for module build on kernel: 5.17.4-051704-generic (x86_64) Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.

Using kernel 5.17.4 unsigned. Thanks for read.

The logs are

ashmem.log

DKMS make.log for anbox-ashmem-1 for kernel 5.17.4-051704-generic (x86_64) sáb 23 abr 2022 02:20:03 -03 make -C /lib/modules/5.17.4-051704-generic/build V=0 M=$PWD make[1]: Entering directory '/usr/src/linux-headers-5.17.4-051704-generic' CC [M] /var/lib/dkms/anbox-ashmem/1/build/deps.o CC [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem.o LD [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.o MODPOST /var/lib/dkms/anbox-ashmem/1/build/Module.symvers ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.ko] undefined! make[2]: *** [scripts/Makefile.modpost:134: /var/lib/dkms/anbox-ashmem/1/build/Module.symvers] Error 1 make[2]: *** Deleting file '/var/lib/dkms/anbox-ashmem/1/build/Module.symvers' make[1]: *** [Makefile:1752: modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.17.4-051704-generic' make: *** [Makefile:12: all] Error 2

Binder.log

DKMS make.log for anbox-binder-1 for kernel 5.17.4-051704-generic (x86_64) sáb 23 abr 2022 02:21:17 -03 make -C /lib/modules/5.17.4-051704-generic/build V=0 M=$PWD make[1]: Entering directory '/usr/src/linux-headers-5.17.4-051704-generic' CC [M] /var/lib/dkms/anbox-binder/1/build/deps.o CC [M] /var/lib/dkms/anbox-binder/1/build/binder.o /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_get_unused_fd_flags’: /var/lib/dkms/anbox-binder/1/build/binder.c:444:9: error: implicit declaration of function ‘__alloc_fd’ [-Werror=implicit-function-declaration] 444 | return __alloc_fd(files, 0, rlim_cur, flags); | ^~~~~~~~~~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_fd_install’: /var/lib/dkms/anbox-binder/1/build/binder.c:454:3: error: implicit declaration of function ‘__fd_install’; did you mean ‘fd_install’? [-Werror=implicit-function-declaration] 454 | __fd_install(proc->files, fd, file); | ^~~~~~~~~~~~ | fd_install /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘task_close_fd’: /var/lib/dkms/anbox-binder/1/build/binder.c:467:11: error: implicit declaration of function ‘__close_fd’; did you mean ‘close_fd’? [-Werror=implicit-function-declaration] 467 | retval = __close_fd(proc->files, fd); | ^~~~~~~~~~ | close_fd /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:663:9: error: implicit declaration of function ‘map_kernel_range_noflush’ [-Werror=implicit-function-declaration] 663 | ret = map_kernel_range_noflush((unsigned long)page_addr, | ^~~~~~~~~~~~~~~~~~~~~~~~ /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:701:3: error: implicit declaration of function ‘unmap_kernel_range’ [-Werror=implicit-function-declaration] 701 | unmap_kernel_range((unsigned long)page_addr, PAGE_SIZE); | ^~~~~~~~~~~~~~~~~~ /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 /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_translate_binder’: /var/lib/dkms/anbox-binder/1/build/binder.c:1626:42: error: passing argument 1 of ‘security_binder_transfer_binder’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1626 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) | ~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:264:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 264 | int security_binder_transfer_binder(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1626:60: error: passing argument 2 of ‘security_binder_transfer_binder’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1626 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) | ~~~~~~~~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:265:28: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 265 | const struct cred *to); | ~~~~~~~~~~~~~~~~~~~^~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_translate_handle’: /var/lib/dkms/anbox-binder/1/build/binder.c:1668:42: error: passing argument 1 of ‘security_binder_transfer_binder’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1668 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) | ~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:264:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 264 | int security_binder_transfer_binder(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1668:60: error: passing argument 2 of ‘security_binder_transfer_binder’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1668 | if (security_binder_transfer_binder(proc->tsk, target_proc->tsk)) | ~~~~~~~~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:265:28: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 265 | const struct cred *to); | ~~~~~~~~~~~~~~~~~~~^~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_translate_fd’: /var/lib/dkms/anbox-binder/1/build/binder.c:1740:42: error: passing argument 1 of ‘security_binder_transfer_file’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1740 | ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file); | ~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:266:54: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 266 | int security_binder_transfer_file(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1740:60: error: passing argument 2 of ‘security_binder_transfer_file’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1740 | ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file); | ~~~~~~~~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:267:26: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 267 | const struct cred *to, struct file *file); | ~~~~~~~~~~~~~~~~~~~^~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_transaction’: /var/lib/dkms/anbox-binder/1/build/binder.c:1967:39: error: passing argument 1 of ‘security_binder_transaction’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1967 | if (security_binder_transaction(proc->tsk, | ~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:262:52: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 262 | int security_binder_transaction(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1968:18: error: passing argument 2 of ‘security_binder_transaction’ from incompatible pointer type [-Werror=incompatible-pointer-types] 1968 | target_proc->tsk) < 0) { | ~~~~~~~~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:263:24: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 263 | const struct cred *to); | ~~~~~~~~~~~~~~~~~~~^~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_ioctl_set_ctx_mgr’: /var/lib/dkms/anbox-binder/1/build/binder.c:3262:44: error: passing argument 1 of ‘security_binder_set_context_mgr’ from incompatible pointer type [-Werror=incompatible-pointer-types] 3262 | ret = security_binder_set_context_mgr(proc->tsk); | ~~~~^~~~~ | | | struct task_struct * In file included from /var/lib/dkms/anbox-binder/1/build/binder.c:48: ./include/linux/security.h:261:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 261 | int security_binder_set_context_mgr(const struct cred *mgr); | ~~~~~~~~~~~~~~~~~~~^~~ /var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_mmap’: /var/lib/dkms/anbox-binder/1/build/binder.c:3486:16: error: implicit declaration of function ‘get_files_struct’; did you mean ‘put_files_struct’? [-Werror=implicit-function-declaration] 3486 | proc->files = get_files_struct(current); | ^~~~~~~~~~~~~~~~ | put_files_struct cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:288: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1 make[1]: *** [Makefile:1837: /var/lib/dkms/anbox-binder/1/build] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.17.4-051704-generic' make: *** [Makefile:8: all] Error 2

Augusto7743 avatar Apr 23 '22 05:04 Augusto7743

https://github.com/anbox/anbox-modules/issues/92#issuecomment-1090487224

SoulInfernoDE avatar May 01 '22 10:05 SoulInfernoDE

this version is basically unmaintained, you can get the more up to date and working version here: https://github.com/choff/anbox-modules

Etaash-mathamsetty avatar Aug 12 '22 02:08 Etaash-mathamsetty