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

ERROR: modpost: "kallsyms_lookup_name" [/var/lib/dkms/anbox-ashmem/1/build/ashmem_linux.ko] undefined!

Open munish259272 opened this issue 4 years ago • 9 comments

sudo dkms install anbox-ashmem/1

[root@centos boot]# sudo dkms install anbox-ashmem/1

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j20 KERNELRELEASE=5.9.13-1.el8.elrepo.x86_64 all KERNEL_SRC=/lib/modules/5.9.13-1.el8.elrepo.x86_64/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.9.13-1.el8.elrepo.x86_64 (x86_64)
Consult /var/lib/dkms/anbox-ashmem/1/build/make.log for more information.
[root@centos boot]# cat /var/lib/dkms/anbox-ashmem/1/build/make.log
DKMS make.log for anbox-ashmem-1 for kernel 5.9.13-1.el8.elrepo.x86_64 (x86_64)
Thu Dec 10 19:16:42 IST 2020
make -C /lib/modules/5.9.13-1.el8.elrepo.x86_64/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/kernels/5.9.13-1.el8.elrepo.x86_64'
  AR      /var/lib/dkms/anbox-ashmem/1/build/built-in.a
  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:111: /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:1697: modules] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.9.13-1.el8.elrepo.x86_64'
make: *** [Makefile:12: all] Error 2

sudo dkms install anbox-binder/1

[root@centos boot]# sudo dkms install anbox-binder/1

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j20 KERNELRELEASE=5.9.13-1.el8.elrepo.x86_64 all KERNEL_SRC=/lib/modules/5.9.13-1.el8.elrepo.x86_64/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.9.13-1.el8.elrepo.x86_64 (x86_64)
Consult /var/lib/dkms/anbox-binder/1/build/make.log for more information.
[root@centos boot]# cat /var/lib/dkms/anbox-binder/1/build/make.log
DKMS make.log for anbox-binder-1 for kernel 5.9.13-1.el8.elrepo.x86_64 (x86_64)
Thu Dec 10 19:27:08 IST 2020
make -C /lib/modules/5.9.13-1.el8.elrepo.x86_64/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/kernels/5.9.13-1.el8.elrepo.x86_64'
  AR      /var/lib/dkms/anbox-binder/1/build/built-in.a
  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 ‘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’?
   down_write(&mm->mmap_sem);
                   ^~~~~~~~
                   mmap_base
/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’?
   up_write(&mm->mmap_sem);
                 ^~~~~~~~
                 mmap_base
/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’?
   up_write(&mm->mmap_sem);
                 ^~~~~~~~
                 mmap_base
make[2]: *** [scripts/Makefile.build:283: /var/lib/dkms/anbox-binder/1/build/binder.o] Error 1
make[1]: *** [Makefile:1784: /var/lib/dkms/anbox-binder/1/build] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.9.13-1.el8.elrepo.x86_64'
make: *** [Makefile:8: all] Error 2

munish259272 avatar Dec 10 '20 13:12 munish259272

This is also happening in Fedora 32.

The logs are identical.

hunkjazz avatar Dec 25 '20 23:12 hunkjazz

Same on openSUSE Tumbleweed

(i just ran make, without dmks)

ashmem:

make -C /lib/modules/5.10.5-1-default/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-5.10.5-1-obj/x86_64/default'
  CC [M]  /tmp/anbox-modules/ashmem/deps.o
  CC [M]  /tmp/anbox-modules/ashmem/ashmem.o
  LD [M]  /tmp/anbox-modules/ashmem/ashmem_linux.o
  MODPOST /tmp/anbox-modules/ashmem/Module.symvers
ERROR: modpost: "kallsyms_lookup_name" [/tmp/anbox-modules/ashmem/ashmem_linux.ko] undefined!
make[3]: *** [/usr/src/linux-5.10.5-1/scripts/Makefile.modpost:116: /tmp/anbox-modules/ashmem/Module.symvers] Error 1
make[3]: *** Deleting file '/tmp/anbox-modules/ashmem/Module.symvers'
make[2]: *** [/usr/src/linux-5.10.5-1/Makefile:1723: modules] Error 2
make[1]: *** [../../../linux-5.10.5-1/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-5.10.5-1-obj/x86_64/default'
make: *** [Makefile:12: all] Error 2

binder:

make -C /lib/modules/5.10.5-1-default/build V=0 M=$PWD
make[1]: Entering directory '/usr/src/linux-5.10.5-1-obj/x86_64/default'
  CC [M]  /tmp/anbox-modules/binder/deps.o
  CC [M]  /tmp/anbox-modules/binder/binder.o
/tmp/anbox-modules/binder/binder.c: In function 'binder_update_page_range':
/tmp/anbox-modules/binder/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
/tmp/anbox-modules/binder/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
/tmp/anbox-modules/binder/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
make[3]: *** [/usr/src/linux-5.10.5-1/scripts/Makefile.build:280: /tmp/anbox-modules/binder/binder.o] Error 1
make[2]: *** [/usr/src/linux-5.10.5-1/Makefile:1819: /tmp/anbox-modules/binder] Error 2
make[1]: *** [../../../linux-5.10.5-1/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-5.10.5-1-obj/x86_64/default'
make: *** [Makefile:8: all] Error 2

sp1ritCS avatar Jan 21 '21 10:01 sp1ritCS

you need to recompile the linux kernel of host. just at kernel/kallsyms.c adding EXPORT_SYMBOL("kallsyms_lookup_name")

sltruman avatar Feb 05 '21 15:02 sltruman

hello @sltruman can you explain where to find kernel/kallsyms.c and then how to recompile the linux kernel host ? I try to install anbox on Raspberry OS and I have the same issue :-(

Christianb233 avatar Feb 16 '21 22:02 Christianb233

If i remember correct if you are using kernel 5.7+ it is not possible anymore to easily build binder and ashmem as some things have been removed from those kernels in mind of security.

The fix is to revert patch your kernel / those kernel things or just compile a kernel with ashmem and binder integrated.

You could try to follow my guide how to do this for yourself: (or download my pre-compiled kernel [ubuntu like linux only] - without any warranty that it will work for you or any other warranties...) https://github.com/anbox/anbox-modules/issues/75#issuecomment-794079944

SoulInfernoDE avatar Mar 26 '21 06:03 SoulInfernoDE

A quick searched revealed this solution elsewhere:

https://github.com/xcellerator/linux_kernel_hacking/issues/3

Is this something we could implement?

mazunki avatar Aug 08 '21 05:08 mazunki

A quick searched revealed this solution elsewhere:

xcellerator/linux_kernel_hacking#3

Is this something we could implement?

I'm just a user but my opinion about such solutions is: The problem i would see here is in the long term. With a kernel hack we try to revert something that has been changed for good. It's unclear how long that patch will last with upcoming new kernel releases and the way they work will change quite fast. So if you want to open up your kernel and are fine with a hack I'd say go for it. If not just build the kernel with the modules inside.

SoulInfernoDE avatar Aug 08 '21 06:08 SoulInfernoDE

How the duck this suppose to work on Ubuntu 22 when there're tons of articles about your cooooliness(esp. performant), but your piece of [shit|cheat] doesn't even included in latest kernel nor compiled from sources? And when bug do exist for almost 2 years without fix, and with reference articles.

Linux, Canonical, how many meters between guys who patch kernel and who develop anbox? Try to shout out loudly sometimes to communicate between each other to fix this. Literally. Motherduckers, people in Ukraine still try your shit.

nehveytnecillim avatar Aug 28 '22 19:08 nehveytnecillim

You're a sincerely idiots, if even your docs aren't updated: "You can enable them, by looking at the following configuration..." Next goes the link to <guess_what>/android/Kconfig

Challenge yourself at least to paste here the link to your non updated docs, software artificial developer.

nehveytnecillim avatar Aug 28 '22 19:08 nehveytnecillim