2014-12-07 45 views
1

我使用opencv與python在樹莓pi上,所以根據互聯網上的教程,我需要V4L2驅動程序。我按照這個教程安裝驅動程序https://www.ics.com/blog/raspberry-pi-camera-module#.VAaCHqM0_YQRaspberry Pi V4L2編譯錯誤如何修復

但是,當我編譯我得到這個錯誤。我不知道有什麼問題,從來沒有遇到過這個問題。我該如何解決。謝謝。

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 

回答

0

自發布此問題以來,行號在2年內有所變化。 Raspbian 7 Wheezy在Raspberry Pi 2或經典Pi上可能容易出現更多bug。

對網頁的一個修正是運行./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