vladimirvivien / go4vl

A Go library for working with the Video for Linux API (V4L2).
MIT License
245 stars 45 forks source link

v4l2/capability.go:48:33: could not determine kind of name for C.V4L2_CAP_IO_MC #17

Closed wubigo closed 2 years ago

wubigo commented 2 years ago
uname -r
5.11.0-1022-aws

sudo find / -name videodev2.h
/usr/include/linux/videodev2.h

go version
go version go1.17.8 linux/amd64

GCC

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04)
 make
CGO_ENABLED=1 GO111MODULE=on go build -ldflags "-X github.com/edgexfoundry/device-usb-camera.Version=0.0.0" -o cmd/device-usb-camera ./cmd
# github.com/vladimirvivien/go4vl/v4l2
../go/pkg/mod/github.com/vladimirvivien/go4vl@v0.0.2-0.20211216162907-40b41ba86c5c/v4l2/capability.go:48:33: could not determine kind of name for C.V4L2_CAP_IO_MC
make: *** [Makefile:21: cmd/device-usb-camera] Error 2
wubigo commented 2 years ago

it reports same error on my local linux desktop:

ubuntu@server:~/go/src/github.com/wubigo/device-usb-camera$ uname -r
5.10.5-051005-generic
ubuntu@server:~/go/src/github.com/wubigo/device-usb-camera$ make
CGO_ENABLED=1 GO111MODULE=on go build -ldflags "-X github.com/edgexfoundry/device-usb-camera.Version=0.0.0" -o cmd/device-usb-camera ./cmd
# github.com/vladimirvivien/go4vl/v4l2
../../../../pkg/mod/github.com/vladimirvivien/go4vl@v0.0.2-0.20211216162907-40b41ba86c5c/v4l2/capability.go:48:33: could not determine kind of name for C.V4L2_CAP_IO_MC
make: *** [Makefile:21: cmd/device-usb-camera] Error 2
wubigo commented 2 years ago

sudo dpkg -i linux-libc-dev_5.10.0-14.15_amd64.deb

vladimirvivien commented 2 years ago

@wubigo thanks for reporting this and posting your solution!!