Open MohammedMehdiTBER opened 2 years ago
Same problem on Fedora 35:
$ sudo dkms install anbox-ashmem/1
Building module:
cleaning build area...
make -j16 KERNELRELEASE=5.16.11-200.fc35.x86_64 all KERNEL_SRC=/lib/modules/5.16.11-200.fc35.x86_64/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.16.11-200.fc35.x86_64 (x86_64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.
/var/lib/dkms/anbox-ashmem/1/build/make.log:
DKMS make.log for anbox-ashmem-1 for kernel 5.16.11-200.fc35.x86_64 (x86_64)
Di 1. Mär 13:51:42 CET 2022
make -C /lib/modules/5.16.11-200.fc35.x86_64/build V=0 M=$PWD
make[1]: Verzeichnis „/usr/src/kernels/5.16.11-200.fc35.x86_64“ wird betreten
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] Fehler 1
make[2]: *** Datei „/var/lib/dkms/anbox-ashmem/1/build/Module.symvers“ wird gelöscht
make[1]: *** [Makefile:1765: modules] Fehler 2
make[1]: Verzeichnis „/usr/src/kernels/5.16.11-200.fc35.x86_64“ wird verlassen
make: *** [Makefile:12: all] Fehler 2
similar problem on Pop!_OS 21.10. It seems that this problem was caused by using a newer kernel. I finally solve it by using a modified version for 5.15 kernel https://github.com/choff/anbox-modules/
$ sudo dkms install anbox-ashmem/1
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j16 KERNELRELEASE=5.15.23-76051523-generic all KERNEL_SRC=/lib/modules/5.15.23-76051523-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.15.23-76051523-generic (x86_64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.
/var/lib/dkms/anbox-ashmem/1/build/make.log
DKMS make.log for anbox-binder-1 for kernel 5.15.23-76051523-generic (x86_64)
Thu Mar 3 04:34:06 PM CST 2022
make -C /lib/modules/5.15.23-76051523-generic/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-5.15.23-76051523-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: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: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: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:265:56: 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: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: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: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:265:56: 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: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: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: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:267:54: 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: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: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: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:263:52: 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: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: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: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:277: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1874: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.23-76051523-generic'
make: *** [Makefile:8: all] Error 2
I have read in another issue that the modules are now part of newer kernels, but they are not compiled in by distribution kernels. So the solution was to recompile the distribution kernel with the parameters turned on.
I have read in another issue that the modules are now part of newer kernels, but they are not compiled in by distribution kernels. So the solution was to recompile the distribution kernel with the parameters turned on.
How did you do that? I'm trying to set up anbox on my Bedrock box.
uninstall modules and reinstall a kernel with the modules compiled into it: (Adapt wrote up steps for your distribution) https://github.com/anbox/anbox-modules/issues/75#issuecomment-794079944
CAN SOMEONE HELP ME WITH THIS PLEASE
Building module: cleaning build area... 'make' KVER=5.18.0-kali5-amd64......................................................................................................................(bad exit status: 2) Error! Bad return status for module build on kernel: 5.18.0-kali5-amd64 (x86_64) Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information.
Building module: cleaning build area... 'make' KVER=5.18.0-kali5-amd64........................................................................................................................(bad exit status: 2) Error! Bad return status for module build on kernel: 5.18.0-kali5-amd64 (x86_64) Consult /var/lib/dkms/rtl8821CU/5.4.1/build/make.log for more information. Finished running dkms install steps.
You need to find a working driver for your RTL8821CU for kernel version 5.18 if it is not already included in the new kernel.
First of all remove the module build information from the dkms auto build system. Check with:
sudo dkms status
then remove the module with the dkms remove syntax:
sudo dkms remove -m"modulemane" -v"version number"
now check if your wifi/stick is still working. If yes normally no need to do anything..
ls /lib/modules/$(uname -r)/kernel/drivers/net/wireless/realtek/rtl8821cu
..if no you may need to find a working driver for 5.18 kernel on github.
MAYBE: https://github.com/brektrou/rtl8821CU#build-and-install-without-dkms I cannot test it so it is just a guess if that would be the working one.. ..Good luck
Still not working with Kali sadly. WSA wins
For Kali and for many other Linux distros you need to rebuild the kernel from source and include binderfs. Also you need to use the latest build from Anbox to use binderfs instead of binder. For ASHMEM you need to patch the anbox ashmem modules source on the newer kernel versions. So "still not working" is not true. It is most likely is working. But not as is. You are working with beta/alpha software and need to investigate to get it working ... If you want to use newer Android version than Android 7 then it is recommended to use Waydroid instead. It is also using binderfs so make sure your kernel does support binderfs. Binder is Android specific. Just that linux can understood binder it doesn't mean it's included by default.. -Am 15.11.22, 01:53 schrieb Mohammed Mehdi TBER @.***>:
Still not working with Kali sadly. WSA wins —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>