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

Both modules fail to build in DKMS #98

Open
fluffeon opened this issue Jul 17, 2022 · 3 comments
Open

Both modules fail to build in DKMS #98

fluffeon opened this issue Jul 17, 2022 · 3 comments

Comments

@fluffeon
Copy link

for ashmem

DKMS make.log for anbox-ashmem-1 for kernel 5.10.129-1-MANJARO (x86_64)
dom 17 jul 2022 02:33:22 -03
make -C /lib/modules/5.10.129-1-MANJARO/build V=0 M=$PWD
make[1]: se entra en el directorio '/usr/lib/modules/5.10.129-1-MANJARO/build'
  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:124: /var/lib/dkms/anbox-ashmem/1/build/Module.symvers] Error 1
make[2]: *** Se borra el archivo '/var/lib/dkms/anbox-ashmem/1/build/Module.symvers'
make[1]: *** [Makefile:1726: modules] Error 2
make[1]: se sale del directorio '/usr/lib/modules/5.10.129-1-MANJARO/build'
make: *** [Makefile:12: all] Error 2

for binder

  263 |                                     const struct cred *to);
      |                                     ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: En la función ‘binder_translate_handle’:
/var/lib/dkms/anbox-binder/1/build/binder.c:1668:49: error: se pasa el argumento 1 de ‘security_binder_transfer_binder’ desde un ti
po de puntero incompatible [-Werror=incompatible-pointer-types]
 1668 |         if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
      |                                             ~~~~^~~~~
      |                                                 |
      |                                                 struct task_struct *
./include/linux/security.h:262:56: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  262 | int security_binder_transfer_binder(const struct cred *from,
      |                                     ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1668:67: error: se pasa el argumento 2 de ‘security_binder_transfer_binder’ desde un ti
po de puntero incompatible [-Werror=incompatible-pointer-types]
 1668 |         if (security_binder_transfer_binder(proc->tsk, target_proc->tsk))
      |                                                        ~~~~~~~~~~~^~~~~
      |                                                                   |
      |                                                                   struct task_struct *
./include/linux/security.h:263:56: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  263 |                                     const struct cred *to);
      |                                     ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: En la función ‘binder_translate_fd’:
/var/lib/dkms/anbox-binder/1/build/binder.c:1740:49: error: se pasa el argumento 1 de ‘security_binder_transfer_file’ desde un tipo
 de puntero incompatible [-Werror=incompatible-pointer-types]
 1740 |         ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file);
      |                                             ~~~~^~~~~
      |                                                 |
      |                                                 struct task_struct *
./include/linux/security.h:264:54: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  264 | int security_binder_transfer_file(const struct cred *from,
      |                                   ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1740:67: error: se pasa el argumento 2 de ‘security_binder_transfer_file’ desde un tipo
 de puntero incompatible [-Werror=incompatible-pointer-types]
 1740 |         ret = security_binder_transfer_file(proc->tsk, target_proc->tsk, file);
      |                                                        ~~~~~~~~~~~^~~~~
      |                                                                   |
      |                                                                   struct task_struct *
./include/linux/security.h:265:54: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  265 |                                   const struct cred *to, struct file *file);
      |                                   ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: En la función ‘binder_transaction’:
/var/lib/dkms/anbox-binder/1/build/binder.c:1967:53: error: se pasa el argumento 1 de ‘security_binder_transaction’ desde un tipo d
e puntero incompatible [-Werror=incompatible-pointer-types]
 1967 |                 if (security_binder_transaction(proc->tsk,
      |                                                 ~~~~^~~~~
      |                                                     |
      |                                                     struct task_struct *
./include/linux/security.h:260:52: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  260 | int security_binder_transaction(const struct cred *from,
      |                                 ~~~~~~~~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:1968:60: error: se pasa el argumento 2 de ‘security_binder_transaction’ desde un tipo d
e puntero incompatible [-Werror=incompatible-pointer-types]
 1968 |                                                 target_proc->tsk) < 0) {
      |                                                 ~~~~~~~~~~~^~~~~
      |                                                            |
      |                                                            struct task_struct *
./include/linux/security.h:261:52: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  261 |                                 const struct cred *to);
      |                                 ~~~~~~~~~~~~~~~~~~~^~
/var/lib/dkms/anbox-binder/1/build/binder.c: En la función ‘binder_ioctl_set_ctx_mgr’:
/var/lib/dkms/anbox-binder/1/build/binder.c:3262:51: error: se pasa el argumento 1 de ‘security_binder_set_context_mgr’ desde un ti
po de puntero incompatible [-Werror=incompatible-pointer-types]
 3262 |         ret = security_binder_set_context_mgr(proc->tsk);
      |                                               ~~~~^~~~~
      |                                                   |
      |                                                   struct task_struct *
./include/linux/security.h:259:56: nota: se esperaba ‘const struct cred *’ pero el argumento es de tipo ‘struct task_struct *’
  259 | int security_binder_set_context_mgr(const struct cred *mgr);
      |                                     ~~~~~~~~~~~~~~~~~~~^~~
cc1: algunos avisos se tratan como errores
make[2]: *** [scripts/Makefile.build:280: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1822: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: se sale del directorio '/usr/lib/modules/5.10.129-1-MANJARO/build'
make: *** [Makefile:8: all] Error 2

I have no idea what is causing this.

@raywang
Copy link

raywang commented Jul 19, 2022

same here

@FailedCaptchx
Copy link

heres my failed build log
DKMS make.log for anbox-binder-1 for kernel 5.15.0-46-generic (x86_64) sáb 13 ago 2022 19:16:25 CDT make -C /lib/modules/5.15.0-46-generic/build V=0 M=$PWD make[1]: se entra en el directorio '/usr/src/linux-headers-5.15.0-46-generic' 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:5, from <command-line>: ./include/generated/autoconf.h:4499: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined 4499 | #define CONFIG_ANDROID_BINDER_DEVICES "" | <command-line>: note: this is the location of the previous definition In file included from ././include/linux/kconfig.h:5, from <command-line>: ./include/generated/autoconf.h:4499: warning: "CONFIG_ANDROID_BINDER_DEVICES" redefined 4499 | #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 ‘task_get_unused_fd_flags’: /var/lib/dkms/anbox-binder/1/build/binder.c:444:16: 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:17: 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:18: 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:33: 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:23: 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:31: 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:17: 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:31: 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:49: 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:389:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 389 | int security_binder_transfer_binder(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1626:67: 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:390:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 390 | 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:49: 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:389:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 389 | int security_binder_transfer_binder(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1668:67: 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:390:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 390 | 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:49: 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:391:54: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 391 | int security_binder_transfer_file(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1740:67: 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:392:54: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 392 | 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:53: 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:387:52: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 387 | int security_binder_transaction(const struct cred *from, | ~~~~~~~~~~~~~~~~~~~^~~~ /var/lib/dkms/anbox-binder/1/build/binder.c:1968:60: 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:388:52: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 388 | 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:51: 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:386:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’ 386 | 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:23: 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:297: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1 make[1]: *** [Makefile:1881: /var/lib/dkms/anbox-binder/1/build] Error 2 make[1]: se sale del directorio '/usr/src/linux-headers-5.15.0-46-generic' make: *** [Makefile:8: all] Error 2
looks to be the same exact problems even though we have different kernel versions so I guess we just have to wait until they fix the issues

@SoulInfernoDE
Copy link

SoulInfernoDE commented Sep 26, 2022

Here is the solution:

#75

If you need this for manjaro search for a similiar manjaro blog write up which guides you through.

Also remove the modules completely from dkms - they won't work with dkms ever again - you need the built in modules from the kernel.

sudo dkms status

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

4 participants