Building all the libraries on the Raspberry Pi

asked 2014-06-10 04:34:41 -0500

marcelobp gravatar image

updated 2014-06-11 03:23:40 -0500

I installed the OpenCV on my Raspberry Pi, however I'm receiving some error messages when I do the command :"./build_all.sh" in the Opencv/samples/c folder:

compiling contours.c contours.c:1:39: fatal error: opencv2/imgproc/imgproc_c.h: No such file or direc tory compilation terminated. compiling convert_cascade.c convert_cascade.c:1:43: fatal error: opencv2/objdetect/objdetect.hpp: No such fi le or directory compilation terminated. compiling delaunay.c delaunay.c:1:39: fatal error: opencv2/imgproc/imgproc_c.h: No such file or direc tory compilation terminated. compiling fback_c.c fback_c.c:1:38: fatal error: opencv2/video/tracking.hpp: No such file or directo ry compilation terminated. compiling morphology.c morphology.c:1:39: fatal error: opencv2/highgui/highgui.hpp: No such file or dir ectory compilation terminated. compiling motempl.c motempl.c:1:38: fatal error: opencv2/video/tracking.hpp: No such file or directo ry compilation terminated. compiling polar_transforms.c polar_transforms.c:1:39: fatal error: opencv2/imgproc/imgproc.hpp: No such file or directory compilation terminated. compiling pyramid_segmentation.c pyramid_segmentation.c:1:39: fatal error: opencv2/imgproc/imgproc.hpp: No such f ile or directory compilation terminated. compiling adaptiveskindetector.cpp adaptiveskindetector.cpp:41:39: fatal error: opencv2/contrib/contrib.hpp: No suc h file or directory compilation terminated. compiling bgfg_codebook.cpp bgfg_codebook.cpp:23:33: fatal error: opencv2/core/core.hpp: No such file or dir ectory compilation terminated. compiling blobtrack_sample.cpp blobtrack_sample.cpp:1:45: fatal error: opencv2/video/background_segm.hpp: No su ch file or directory compilation terminated. compiling facedetect.cpp facedetect.cpp:1:43: fatal error: opencv2/objdetect/objdetect.hpp: No such file or directory compilation terminated. compiling find_obj.cpp find_obj.cpp:7:43: fatal error: opencv2/objdetect/objdetect.hpp: No such file or directory compilation terminated. compiling find_obj_calonder.cpp find_obj_calonder.cpp:1:39: fatal error: opencv2/highgui/highgui.hpp: No such fi le or directory compilation terminated. compiling find_obj_ferns.cpp find_obj_ferns.cpp:1:39: fatal error: opencv2/highgui/highgui.hpp: No such file or directory compilation terminated. compiling latentsvmdetect.cpp latentsvmdetect.cpp:1:43: fatal error: opencv2/objdetect/objdetect.hpp: No such file or directory compilation terminated. compiling mser_sample.cpp mser_sample.cpp:5:39: fatal error: opencv2/highgui/highgui.hpp: No such file or directory compilation terminated. compiling mushroom.cpp mushroom.cpp:1:33: fatal error: opencv2/core/core_c.h: No such file or directory compilation terminated. compiling one_way_sample.cpp one_way_sample.cpp:10:39: fatal error: opencv2/imgproc/imgproc.hpp: No such file or directory compilation terminated. compiling smiledetect.cpp smiledetect.cpp:1:43: fatal error: opencv2/objdetect/objdetect.hpp: No such file or directory compilation terminated. compiling tree_engine.cpp tree_engine.cpp:1:29: fatal error: opencv2/ml/ml.hpp: No such file or directory compilation terminated.

I looked for these files, and they are in the paths:

/home/pi/opencv/modules/core/include/opencv2/

/usr/localĀ -D/include/opencv2/

How can I make for it to find these libraries? I think that the opencv in looking for ... (more)

edit retag flag offensive close merge delete

Comments

/usr/local -D/include/opencv2/ <-- what's the weird -D doing in there ?

berak gravatar imageberak ( 2014-06-11 03:55:46 -0500 )edit

Good question, this folder just appeared, I was think it could be normal. I have both "/usr/local/" and "/usr/local -D/", I checked the content of these folders and they are different. So probrably the OpenCV is looking for the libraries inside "/usr/local/" and is actually in "/usr/local -D/".

Is that it?

Maybe when I executed this command, cmake created a folder with this name:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_OPENGL=ON ..

marcelobp gravatar imagemarcelobp ( 2014-06-11 05:52:40 -0500 )edit
1

Already solved, I just copied the files from "local -D" to "local" and it's working now!

Thanks!

marcelobp gravatar imagemarcelobp ( 2014-06-12 05:06:26 -0500 )edit