anbox / anbox-modules

Anbox kernel modules
324 stars 223 forks source link

Unable to use "dmks" command to install modules #109

Open FangcatChina opened 11 months ago

FangcatChina commented 11 months ago

Here's the console output:

pi@raspberrypi:~ $ sudo dkms install anbox-ashmem/1

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.1.21-v8+ all KERNEL_SRC=/lib/modules/6.1.21-v8+/build....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.21-v8+ (aarch64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.

Logs:

KMS make.log for anbox-ashmem-1 for kernel 6.1.21-v8+ (aarch64)
2023年 08月 14日 星期一 10:03:25 CST
make -C /lib/modules/6.1.21-v8+/build V=0 M=$PWD
make[1]: 进入目录“/usr/src/linux-headers-6.1.21-v8+”
  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_init’:
/var/lib/dkms/anbox-ashmem/1/build/ashmem.c:877:2: 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 ./arch/arm64/include/asm/elf.h:141,
                 from ./include/linux/elf.h:6,
                 from ./include/linux/module.h:19,
                 from /var/lib/dkms/anbox-ashmem/1/build/ashmem.c:21:
./include/linux/shrinker.h:99:27: note: declared here
   99 | extern int __printf(2, 3) register_shrinker(struct shrinker *shrinker,
      |                           ^~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:250:/var/lib/dkms/anbox-ashmem/1/build/ashmem.o] 错误 1
make[1]: *** [Makefile:2012:/var/lib/dkms/anbox-ashmem/1/build] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-6.1.21-v8+”

Running on Raspberry Pi OS(64-bit)(just Debian Bullseye,Aarch64)

FangcatChina commented 11 months ago

Oh,I can't use add-apt-repository too

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 102, in _get_https_content_py3
    lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 327, in get_ppa_info
    ret = get_ppa_info_from_lp(user, ppa)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
    return get_info_from_lp(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
    return _get_https_content_py3(lp_url)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 108, in _get_https_content_py3
    raise PPAException("Error reading %s: %s" % (lp_url, reason), e)
softwareproperties.ppa.PPAException: 'Error reading https://launchpad.net/api/1.0/~staging/+archive/ubuntu/anbox-support: Not Found'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 393, in shortcut_handler
    return PPAShortcutHandler(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 356, in __init__
    info = get_ppa_info(self.shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 338, in get_ppa_info
    raise ShortcutException('\n'.join(msg) + "\n" +
softwareproperties.shortcuts.ShortcutException: Cannot add PPA: 'ppa:~staging/ubuntu/anbox-support'.
The user named '~staging' does not have any PPA
Error: 'ppa:staging/anbox-support' invalid

Is it cause' of my network?

xing133 commented 11 months ago

I have exactly the same problem :

error: too few arguments to function ‘register_shrinker’

ubuntu 22.04, 6.2.0-32-generic

frenzymadness commented 9 months ago

I have exactly the same error:

/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/kernels/6.5.10-200.fc38.x86_64/Makefile:2046: /var/lib/dkms/anbox-ashmem/1/build] Error 2

and one more:

  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);
      |                       ^~

Building on Fedora 38 with kernel 6.5.10-200.fc38.x86_64.

cb1986ster commented 7 months ago

[BUMP] Distributor ID: Linuxmint Description: Linux Mint 21 Release: 21 Codename: vanessa