webcamoid / akvcam

akvcam, virtual camera for Linux
GNU General Public License v2.0
626 stars 87 forks source link

Build Errors. #40

Closed plezploz closed 3 years ago

plezploz commented 3 years ago

When I use sudo make on Ubuntu Linux running on AWS it's all fine until it needs to build the modules. Can anyone please help me fix this error.

make -C /lib/modules/5.4.0-1029-aws/build M=/home/ubuntu/akvcam/src  modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-1029-aws'
  CC [M]  /home/ubuntu/akvcam/src/module.o
  CC [M]  /home/ubuntu/akvcam/src/attributes.o
  CC [M]  /home/ubuntu/akvcam/src/buffer.o
  CC [M]  /home/ubuntu/akvcam/src/buffers.o
  CC [M]  /home/ubuntu/akvcam/src/controls.o
  CC [M]  /home/ubuntu/akvcam/src/device.o
  CC [M]  /home/ubuntu/akvcam/src/driver.o
  CC [M]  /home/ubuntu/akvcam/src/events.o
  CC [M]  /home/ubuntu/akvcam/src/file_read.o
  CC [M]  /home/ubuntu/akvcam/src/format.o
  CC [M]  /home/ubuntu/akvcam/src/frame.o
  CC [M]  /home/ubuntu/akvcam/src/global_deleter.o

  CC [M]  /home/ubuntu/akvcam/src/ioctl.o
  CC [M]  /home/ubuntu/akvcam/src/list.o
  CC [M]  /home/ubuntu/akvcam/src/log.o
  CC [M]  /home/ubuntu/akvcam/src/map.o
  CC [M]  /home/ubuntu/akvcam/src/mmap.o
  CC [M]  /home/ubuntu/akvcam/src/node.o
  CC [M]  /home/ubuntu/akvcam/src/rbuffer.o
  CC [M]  /home/ubuntu/akvcam/src/settings.o
  CC [M]  /home/ubuntu/akvcam/src/utils.o
  LD [M]  /home/ubuntu/akvcam/src/akvcam.o
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "video_device_release_empty" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "video_device_release" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "v4l2_device_unregister" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "__video_register_device" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "v4l2_device_register" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "video_device_alloc" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
ERROR: "video_unregister_device" [/home/ubuntu/akvcam/src/akvcam.ko] undefined!
scripts/Makefile.modpost:93: recipe for target '__modpost' failed
make[2]: *** [__modpost] Error 1
Makefile:1670: recipe for target 'modules' failed
make[1]: *** [modules] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-1029-aws'
Makefile:48: recipe for target 'all' failed
make: *** [all] Error 2
hipersayanX commented 3 years ago

Try running the following commands before build:

sudo depmod -a
sudo modprobe v4l2-common
sudo modprobe videobuf2-core
sudo modprobe videobuf2-v4l2
sudo modprobe videobuf2-vmalloc
sudo modprobe videodev

Also check this.

plezploz commented 3 years ago

Thanks