Closed cycool29 closed 2 years ago
Unfortunately this is a linker (gcc / ld) issue. The Makefile (/usr/src/linux-headers-5.10.92-v8+/arch/arm64/Makefile) is part of your kernel headers and it doesn't work with the given gcc version. You can try updating gcc or ask the this particular distro/kernel maintainers.
The OS is armhf, but the kernel is aarch64. @aramg, would there be a way to force the Makefile to compile a 32-bit build?
Not too sure how armhf/aarch64 coexsit, but the Makefile allows you to specify a KERNEL_DIR:
KERNEL_DIR=/lib/modules/?????/build make -C v4l2loopback
By default it was going into /lib/modules/5.10.92-v8+, maybe you have another option in /lib/modules/
Not too sure how armhf/aarch64 coexsit, but the Makefile allows you to specify a KERNEL_DIR:
KERNEL_DIR=/lib/modules/?????/build make -C v4l2loopback
By default it was going into /lib/modules/5.10.92-v8+, maybe you have another option in /lib/modules/
I did try that before, but I got a list of errors.
Here is the full output:
Webcam parameters: '640' and '480'
Building v4l2loopback-dc.ko
make: Entering directory '/home/pi/droidcam/v4l2loopback'
make -C /lib/modules//5.10.92-v7l+/build M=/home/pi/droidcam/v4l2loopback modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.92-v7l+'
CC [M] /home/pi/droidcam/v4l2loopback/v4l2loopback-dc.o
In file included from ./include/asm/atomic.h:12,
from ./include/linux/atomic.h:7,
from ./include/asm-generic/bitops/lock.h:5,
from ./include/asm/bitops.h:32,
from ./include/linux/bitops.h:29,
from ./include/linux/kernel.h:12,
from ./include/linux/list.h:9,
from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:51,
from ./include/linux/vmalloc.h:5,
from /home/pi/droidcam/v4l2loopback/v4l2loopback-dc.c:24:
./include/asm/cmpxchg.h:11:2: error: #error "Cannot use generic cmpxchg on SMP"
11 | #error "Cannot use generic cmpxchg on SMP"
| ^~~~~
[snip]
compilation terminated.
make[2]: *** [scripts/Makefile.build:280: /home/pi/droidcam/v4l2loopback/v4l2loopback-dc.o] Error 1
make[1]: *** [Makefile:1825: /home/pi/droidcam/v4l2loopback] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.92-v7l+'
make: *** [Makefile:8: all] Error 2
make: Leaving directory '/home/pi/droidcam/v4l2loopback'
The linux headers, regular headers, compiler all seem mis-matched. I am not sure what the fix is, sorry. This is on the distro/system, not a droidcam issue.
Probably best to close this issue then. This is a matter of finding a way to compile a 64-bit kernel module on a 32-bit toolchain.
Describe the bug I tried to install droidcam on my Raspberry Pi armhf OS with arm64 kernel enabled. I got the following error when running
sudo ./install-video
:Expected behavior DroidCam installed as usual.