Opencv Make Error 2
Contents |
I have no experience with
/usr/local/lib/libavcodec.a: Error Adding Symbols: Bad Value
OpenCV. I'm trying to install OpenCV on Ubuntu 12.04 make * * * all error 2 but am encountering errors. To install OpenCV, I am following instructions at http://karytech.blogspot.com/2012/05/.... opencv install I get errors after I issue the 'make' command. I haven't been able to figure out how to get past these errors.
Install Opencv Ubuntu
Can someone help me? Here are the errors I am getting: ...@Caterina:~/Downloads/opencv-3.0.0/build$ make [ 5%] Built target libwebp [ 6%] Built target opencv_hal_pch_dephelp [ 7%] Built target pch_Generate_opencv_hal [ 7%] Built target opencv_hal [ 7%] Built target opencv_core_pch_dephelp [ 7%] Built target pch_Generate_opencv_core [
Ffmpeg
12%] Built target opencv_core [ 12%] Built target opencv_ts_pch_dephelp [ 12%] Built target pch_Generate_opencv_ts [ 12%] Built target opencv_imgproc_pch_dephelp [ 12%] Built target pch_Generate_opencv_imgproc [ 18%] Built target opencv_imgproc [ 18%] Built target opencv_imgcodecs_pch_dephelp [ 18%] Built target pch_Generate_opencv_imgcodecs [ 20%] Built target opencv_imgcodecs [ 20%] Built target opencv_videoio_pch_dephelp [ 21%] Built target pch_Generate_opencv_videoio [ 21%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o In file included from /home/.../Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:0: /home/.../Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1546:71: error: use of enum ‘AVCodecID’ without previous declaration /home/.../Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1556:83: error: use of enum ‘AVCodecID’ without previous declaration make[2]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1 make[1]: * [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2 make: * [all] Error 2 ...@Caterina:~/Downloads/opencv-3.0.0/build$ edit retag flag offensive close merge delete CommentsI have the same error on debian 7. But i trying install emgucv 3:[ 19%] Building CXX object opencv/modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o In file included from /root/opencv/emgucv/opencv/modules/videoio/sr
all, I had downloaded opencv 3.0 master branch. (Before I had installed basic required packages for installing opencv) After cmake it, and make, I came across the following build error : ================================================================== [ 61%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/posit.cpp.o [ 61%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/homography_decomp.cpp.o [ 61%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/p3p.cpp.o [ 61%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/ptsetreg.cpp.o [ 61%] Building CXX object modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/dls.cpp.o /root/Downloads/opencv-3.0/modules/calib3d/src/dls.cpp:11:31: fatal error: Eigen/Eigenvalues: No such file or directory compilation terminated. make[2]: * [modules/calib3d/CMakeFiles/opencv_calib3d.dir/src/dls.cpp.o] http://answers.opencv.org/question/66928/errors-with-installing-opencv-300-on-ubuntu-1204/ Error 1 make[1]: * [modules/calib3d/CMakeFiles/opencv_calib3d.dir/all] Error 2 make: * [all] Error 2 root@ubuntu:~/Downloads/opencv-3.0/release# ================================================================== It seems that the package cannot find "Eigen/Eigenvalues". Does it mean that I missed some prerequisites in my system? Hope someone could give me some suggestion to fix it? P.S. My system is Ubuntu 12.04 Best regards, Milton edit retag flag offensive close http://answers.opencv.org/question/40137/opencv-30-build-error/ merge delete Comments2Hello Milton, I faced the same issue, even with EIGEN on the correct location it didn't seem to build. Solution is to build with -D WITH_EIGEN=OFF for now. However there are several other errors popping up. Already provided some fixes for it.. take a look here!StevenPuttemans( 2014-08-23 04:30:23 -0500 )editjust to add to the confusion, i don't have eigen (well, not where cmake can see it), and even leaving the switch ON compiles fine. seems to be a prob only if the eigen lib is actually present ?berak( 2014-08-23 04:49:15 -0500 )edithmmm I even had the problem when eigen wasn't installed. I did built with CUDA QT SAMPLES ... probably a dependency throwing up?StevenPuttemans( 2014-08-23 04:52:10 -0500 )edit1oh, neither qt, nor cuda here, maybe that narrows it downberak( 2014-08-23 04:56:52 -0500 )edit1Thanks the suggestions from all of you. I shifted to build the opencv-3.0-alpha, rather than master branch on github repositories. Then the building process succeeded.amiltonwong( 2014-08-24 03:49:52 -0500 )editAbout the EIGEN problem, just fixed it o
INSTALL OPENCV FROM THE UBUNTU OR DEBIAN REPOSITORY You can install OpenCV from the Ubuntu or Debian repository: sudo http://milq.github.io/install-opencv-ubuntu-debian/ apt-get install libopencv-dev python-opencv However, you will probably not have installed the latest version of OpenCV and you may miss some features (for example: Python 3 bindings do not exist in the repository). OPTION 2: INSTALL OPENCV FROM THE OFFICIAL SITE To install the latest version of OpenCV be sure that you have removed the library from the repository with error 2 sudo apt-get autoremove libopencv-dev python-opencv and follow the steps below. 2.1. RUN AN INSTALLATION SCRIPT The most simple and elegant way to install a library is running an installation script. Download the installation script install-opencv.sh, open your terminal and execute: bash install-opencv.sh Type your sudo password and you will have installed OpenCV. This operation may take a long time due opencv make error to the packages to be installed and the compilation process. This script has been tested on Ubuntu 14.04 LTS, Ubuntu 16.04 LTS and Debian 8.0 "Jessie", with OpenCV 3.0.0 and OpenCV 3.1.0. You can freely change this script as you like or adapt it to other OS or OpenCV version. 2.2. EXECUTE SOME OPENCV EXAMPLES Go to your OpenCV directory and execute a C++ example: cd build/bin ./cpp-example-edge ../../samples/data/fruits.jpg Now, go to your OpenCV directory and execute a Python example: cd samples/python python3 video.py Finally, go to your OpenCV directory and execute a Java example: cd samples/java/ant ant -DocvJarDir=../../../build/bin -DocvLibDir=../../../build/lib 2.3. COMPILE A DEMONSTRATION Download the files demo.cpp and CMakeLists.txt and put them into a folder. Now, open your terminal, go to the folder and execute: mkdir build && cd build && cmake .. && make Finally, run the demo: ./demo. And that's it! You have installed OpenCV, run some examples, and compiled OpenCV code! Do you like this article? Share it with this link. Thanks for reading! All content created by Manuel Ignacio López Quintero under this license.