【问题标题】:Raspberry Pi V4L2 Compile Error How to Fix树莓派 V4L2 编译错误如何修复
【发布时间】:2014-12-07 04:34:48
【问题描述】:

我在树莓派上使用 opencv 和 python,所以根据互联网上的教程,我需要 V4L2 驱动程序。我正在按照本教程安装驱动程序https://www.ics.com/blog/raspberry-pi-camera-module#.VAaCHqM0_YQ

但是,当我编译时,我得到了这个错误。我不知道是什么问题,以前从未遇到过这个问题。我该如何解决。谢谢。

make[3]: Entering directory '/home/pi/v4l-utils/utils/v4l2-compliance'
  CXX    v4l2-test-input-output.o
v4l2-test-input-output.cpp: In function ‘int checkInput(node*, const v4l2_input&, unsigned int)’:
v4l2-test-input-output.cpp:368:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:369:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp: In function ‘int checkOutput(node*, const v4l2_output&, unsigned int)’:
v4l2-test-input-output.cpp:733:3: error: expected primary-expression before ‘.’ token
v4l2-test-input-output.cpp:734:3: error: expected primary-expression before ‘.’ token
Makefile:438: recipe for target 'v4l2-test-input-output.o' failed
make[3]: *** [v4l2-test-input-output.o] Error 1
make[3]: Leaving directory '/home/pi/v4l-utils/utils/v4l2-compliance'
Makefile:373: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/pi/v4l-utils/utils'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/v4l-utils'
Makefile:398: recipe for target 'all' failed
make: *** [all] Error 2

【问题讨论】:

    标签: makefile raspberry-pi v4l2


    【解决方案1】:

    自发布此问题以来的 2 年多时间里,行号发生了一些变化。在 Raspberry Pi 2 或经典 Pi 上使用 Raspbian 7 Wheezy 时,它可能很容易出现更多错误。

    对网页的一个更正是运行./bootstrap.sh 而不是autoreconf 更好。我还写了libjpeg-dev 以避免过于具体的libjpeg62-dev 的依赖性问题。然后今天在 Raspbian 9 Stretch (gcc 6.3) 上构建和安装工作正常:

    sudo apt-get install autoconf gettext libtool libjpeg-dev
    git clone git://git.linuxtv.org/v4l-utils.git
    cd v4l-utils
    ./bootstrap.sh
    ./configure
    make
    sudo make install
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-31
      • 2017-10-29
      • 1970-01-01
      • 2013-07-19
      • 1970-01-01
      • 2013-12-08
      • 2017-06-19
      • 2013-12-12
      相关资源
      最近更新 更多