Hi all,
I am trying to build opencv on the raspberry pi B running raspbian (Linux raspberrypi 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux). I am following the instructions at
http://ariandy1.wordpress.com/2013/02/1 ... an-opencv/
The build process stops at about 60%. The log of the make process is below. How do I compile opencv on the raspberry pi?
[ 59%] Building CXX object modules/gpu/CMakeFiles/opencv_perf_gpu.dir/perf/perf_objdetect.
cpp.o
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_perf_gpu.dir/perf/perf_matop.cpp.
o
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_perf_gpu.dir/perf/perf_imgproc.cp
p.o
Linking CXX executable ../../bin/opencv_perf_gpu
[ 60%] Built target opencv_perf_gpu
Scanning dependencies of target opencv_test_gpu
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/main.cpp.o
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_nvidia.cpp
.o
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_resize.cpp
.o
[ 60%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_imgproc.cp
p.o
root@raspberrypi:/usr/src/OpenCV-2.4.2/build#
Pranav
- davef21370
- Posts: 897
- Joined: Fri Sep 21, 2012 4:13 pm
- Location: Earth But Not Grounded
Re: Building opencv is failing with a make error
Have a look at this post....
http://www.raspberrypi.org/phpBB3/viewt ... cv#p402953
...took a while but installed okay.
Dave.
http://www.raspberrypi.org/phpBB3/viewt ... cv#p402953
...took a while but installed okay.
Dave.
Apple say... Monkey do !!
Re: Building opencv is failing with a make error
Hi Dave,
Many thanks for the link. It explains how to install opencv on Ubuntu. I have opencv working on Ubuntu but not on Raspbian.
Pranav
Many thanks for the link. It explains how to install opencv on Ubuntu. I have opencv working on Ubuntu but not on Raspbian.
Pranav
- davef21370
- Posts: 897
- Joined: Fri Sep 21, 2012 4:13 pm
- Location: Earth But Not Grounded
Re: Building opencv is failing with a make error
Sorry, wrong link, try this...
http://mitchtech.net/raspberry-pi-opencv/
That's what I used to install on wheezy.
Dave.
http://mitchtech.net/raspberry-pi-opencv/
That's what I used to install on wheezy.
Dave.
Apple say... Monkey do !!
Re: Building opencv is failing with a make error
Hi David,
Thanks for this link. I had already consulted it and keep running into the make errors. As far as I can tell, all dependencies are installed.
I have however installed opencv on arch Linux which is meeting my needs though I am more comfortable using raspbian and would prefer to resolve this.
Pranav
Thanks for this link. I had already consulted it and keep running into the make errors. As far as I can tell, all dependencies are installed.
I have however installed opencv on arch Linux which is meeting my needs though I am more comfortable using raspbian and would prefer to resolve this.
Pranav
Re: Building opencv is failing with a make error
I was having trouble making OpenCV on the Pi, with an internal compiler error about 60% thru the build, but I upgraded gcc to version 4.7 (from 4.6) and the build then succeeded.
Also, I am using a 16GB card, rather than the 4GB card that came with the kit, because otherwise it would run out of space.
Also, I am using a 16GB card, rather than the 4GB card that came with the kit, because otherwise it would run out of space.
Re: Building opencv is failing with a make error
The problem now is that none of the examples seem to run.
Here is an error example:
./cpp-example-drawing
Here is an error example:
./cpp-example-drawing
This program demonstrates OpenCV drawing and text output functions.
Usage:
./drawing
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /home/pi/opencv-2.4.7/modules/highgui/src/window.cpp, line 501
terminate called after throwing an instance of 'cv::Exception'
what(): /home/pi/opencv-2.4.7/modules/highgui/src/window.cpp:501: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage
Aborted
- DougieLawson
- Posts: 40835
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: Building opencv is failing with a make error
Raspbian is a flavour of Debian so you can follow the instructions.
apt-get install libgtk2.0-dev pkg-config(The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script)
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: Building opencv is failing with a make error
Thanks a bunch for that. The high school robotics team is waiting to get started on getting some vision based targeting for their new bot.
The command seemed to mostly succeed. There was one failure.
The command seemed to mostly succeed. There was one failure.
So now run make again (actually "make -B"), or do I need to go back and re-build the make files again using cmake?Failed to fetch http://mirrordirector.raspbian.org/rasp ... _armhf.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Re: Building opencv is failing with a make error
I rebuilt, but get the same error.
Re: Building opencv is failing with a make error
"sudo" in front of that command made a BIG difference.
The make took over 11 hours, rather than the previous 6 hours, and the OpenCV examples now work!
The key (I think) is making sure that the GUI support says "YES" before the make -- specifically the GTK support.
The make took over 11 hours, rather than the previous 6 hours, and the OpenCV examples now work!
The key (I think) is making sure that the GUI support says "YES" before the make -- specifically the GTK support.
Re: Building opencv is failing with a make error
It was failing for me with an internal compiler error. It was because memory had run out. I switched to a 512MB pi and changed the gpu mem share and that fixed it.
Matt
Matt