我的 Ubuntu 的 Prop.
PRETTY_NAME="Ubuntu 23.10"
uname -r
5.15.0-72-generic
将内核更新至 6.5 版本时出错
日志:
dkms/anbox-ashmem/1/build/make.log
DKMS make.log for anbox-ashmem-1 for kernel 6.5.0-060500-generic (x86_64)
Wed Feb 28 12:16:29 AM CST 2024
make -C /lib/modules/6.5.0-060500-generic/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-060500-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-6ubuntu1) 13.2.0
You are using: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
CC [M] /var/lib/dkms/anbox-ashmem/1/build/deps.o
CC [M] /var/lib/dkms/anbox-ashmem/1/build/ashmem.o
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c: In function ‘ashmem_mmap’:
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c:393:23: error: assignment of read-only member ‘vm_flags’
393 | vma->vm_flags &= ~calc_vm_may_flags(~asma->prot_mask);
| ^~
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c: In function ‘ashmem_init’:
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c:877:9: error: too few arguments to function ‘register_shrinker’
877 | register_shrinker(&ashmem_shrinker);
| ^~~~~~~~~~~~~~~~~
In file included from ./include/linux/list_lru.h:13,
from ./include/linux/fs.h:13,
from /var/lib/dkms/anbox-ashmem/1/build/ashmem.c:25:
./include/linux/shrinker.h:102:27: note: declared here
102 | extern int __printf(2, 3) register_shrinker(struct shrinker *shrinker,
| ^~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/anbox-ashmem/1/build/ashmem.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-060500-generic/Makefile:2038: /var/lib/dkms/anbox-ashmem/1/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-060500-generic'
make: *** [Makefile:12: all] Error 2
dkms/anbox-binder/1/build/make.log
DKMS make.log for anbox-binder-1 for kernel 6.5.0-060500-generic (x86_64)
Wed Feb 28 12:16:31 AM CST 2024
make -C /lib/modules/6.5.0-060500-generic/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-060500-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-6ubuntu1) 13.2.0
You are using: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
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:694:25: error: implicit declaration of function ‘zap_page_range’; did you mean ‘copy_page_range’? [-Werror=implicit-function-declaration]
694 | zap_page_range(vma, (uintptr_t)page_addr +
| ^~~~~~~~~~~~~~
| copy_page_range
/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:268:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
268 | 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 *
./include/linux/security.h:269:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
269 | 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 *
./include/linux/security.h:268:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
268 | 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 *
./include/linux/security.h:269:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
269 | 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 *
./include/linux/security.h:270:54: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
270 | 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 *
./include/linux/security.h:271:54: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
271 | 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 *
./include/linux/security.h:266:52: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
266 | 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 *
./include/linux/security.h:267:52: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
267 | 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 *
./include/linux/security.h:265:56: note: expected ‘const struct cred *’ but argument is of type ‘struct task_struct *’
265 | 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:3436:23: error: assignment of read-only member ‘vm_flags’
3436 | vma->vm_flags = (vma->vm_flags | VM_DONTCOPY) & ~VM_MAYWRITE;
| ^
/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
In file included from ./include/linux/linkage.h:7,
from ./include/linux/printk.h:8,
from ./include/asm-generic/bug.h:22,
from ./arch/x86/include/asm/bug.h:87,
from ./include/linux/bug.h:5,
from ./include/linux/mmdebug.h:5,
from ./include/linux/mm.h:6,
from ./arch/x86/include/asm/cacheflush.h:5,
from /var/lib/dkms/anbox-binder/1/build/binder.c:20:
/var/lib/dkms/anbox-binder/1/build/binder.c: In function ‘binder_init’:
./include/linux/export.h:29:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
29 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/var/lib/dkms/anbox-binder/1/build/binder.c:4371:37: note: in expansion of macro ‘THIS_MODULE’
4371 | binder_class = class_create(THIS_MODULE, "binder");
| ^~~~~~~~~~~
In file included from ./include/linux/device.h:31,
from ./include/linux/cdev.h:8,
from /var/lib/dkms/anbox-binder/1/build/binder.c:21:
./include/linux/device/class.h:230:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
230 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/var/lib/dkms/anbox-binder/1/build/binder.c:4371:24: error: too many arguments to function ‘class_create’
4371 | binder_class = class_create(THIS_MODULE, "binder");
| ^~~~~~~~~~~~
./include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:243: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-060500-generic/Makefile:2038: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-060500-generic'
make: *** [Makefile:8: all] Error 2