简体   繁体   English

v4l2在Debian 8上构建错误

[英]v4l2 build error on Debian 8

I am installing video 4 linux following these steps, 我按照以下步骤安装Video 4 Linux,

http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers http://www.linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers

but when build, following error appears. 但是在构建时,出现以下错误。 Debian 8 virtual machine. Debian 8虚拟机。

...
    CC [M]  /media_build/v4l/saa7164-buffer.o
    CC [M]  /media_build/v4l/saa7164-encoder.o
    /media_build/v4l/saa7164-encoder.c: In function 'saa7164_s_frequency':
    /media_build/v4l/saa7164-encoder.c:392:2: error: assignment of read-only variable '__val'
      port->freq = clamp(f->frequency,
      ^
    /usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/media_build/v4l/saa7164-encoder.o' failed
    make[5]: *** [/media_build/v4l/saa7164-encoder.o] Error 1
    /usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/media_build/v4l' failed
    make[4]: *** [_module_/media_build/v4l] Error 2
    Makefile:181: recipe for target 'sub-make' failed
    make[3]: *** [sub-make] Error 2
    Makefile:8: recipe for target 'all' failed
    make[2]: *** [all] Error 2
    make[2]: Leaving directory '/usr/src/linux-headers-3.16.0-4-686-pae'
    Makefile:51: recipe for target 'default' failed
    make[1]: *** [default] Error 2
    make[1]: Leaving directory '/media_build/v4l'
    Makefile:26: recipe for target 'all' failed
    make: *** [all] Error 2
    build failed at ./build line 491.
    root@debian:/media_build#

Check this out, here is the link , this is the different kernel compile log, so you can install the successful version kernel, then clean the compile dictionary, re-compile it. 检查一下,这里是链接 ,这是不同的内核编译日志,因此您可以安装成功的版本内核,然后清理编译字典,然后重新编译。

I think it can solve your problem. 我认为它可以解决您的问题。

In my Ubuntu 14.04.3 x86_64 case, I install Kernel 3.18.7, here is the solution 在我的Ubuntu 14.04.3 x86_64情况下,我安装了内核3.18.7,这是解决方案

 $ cd /tmp

 $ wget \
 kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807_3.18.7-031807.201502110759_all.deb \
 kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-headers-3.18.7-031807-generic_3.18.7-031807.201502110759_amd64.deb \
 kernel.ubuntu.com/~kernel-ppa/mainline/v3.18.7-vivid/linux-image-3.18.7- 031807-generic_3.18.7-031807.201502110759_amd64.deb

 $ sudo dpkg -i linux-headers-3.18*.deb linux-image-3.18*.deb

 $ sudo reboot

Reference Links 参考链接

I had the same problem, my workaround was that I set CONFIG_VIDEO_SAA7164=n in v4l/.config file. 我遇到了同样的问题,我的解决方法是在v4l / .config文件中设置CONFIG_VIDEO_SAA7164 = n After this the compilation was executed correctly. 此后,编译将正确执行。

run make menuconfig and navigate the menus to disable the saa7164 driver from the build. 运行make menuconfig并浏览菜单以从构建中禁用saa7164驱动程序。 The hierarchy should be something like DEVICE DRIVERS -> MULTIMEDIA DRIVERS -> VIDEO4LINUX / DVB DRIVERS -> PCI boards (I don't think theres a separate submenu for PCIe) and then disable the driver for the saa7164. 层次结构应类似于“设备驱动程序”->“多媒体驱动程序”->“ VIDEO4LINUX / DVB驱动程序”->“ PCI板”(我认为PCIe没有单独的子菜单),然后禁用saa7164的驱动程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM