Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build with open cv installed #52

Open
FlYnN91 opened this issue Jan 29, 2019 · 4 comments
Open

Unable to build with open cv installed #52

FlYnN91 opened this issue Jan 29, 2019 · 4 comments

Comments

@FlYnN91
Copy link

FlYnN91 commented Jan 29, 2019

dainius@dainius-VirtualBox:/ProjectFiles/Utilities/raspicam/build$ cmake .. && make
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- -------------------------------------------------------------------------------
-- GNU COMPILER
-- -------------------------------------------------------------------------------
-- Adding cv library
-- 
-- -------------------------------------------------------------------------------
-- General configuration for raspicam 0.1.2
-- -------------------------------------------------------------------------------
-- 
    Built as dynamic libs?:ON
    Compiler:/usr/bin/c++
-- C++ flags (Release):        -Wno-pedantic -Wall -Wno-variadic-macros -std=c++0x -Wl,--no-as-needed  -Wall -Wno-long-long -ffunction-sections   -fomit-frame-pointer -O3 -ffast-math -mmmx -msse -msse2 -msse3 -DNDEBUG  -lpthread
-- C++ flags (Debug):          -Wno-pedantic -Wall -Wno-variadic-macros -std=c++0x -Wl,--no-as-needed  -Wall -Wno-long-long -ffunction-sections  -g3 -O0 -DDEBUG -D_DEBUG -W -Wextra -Wno-return-type  -lpthread
-- CMAKE_CXX_FLAGS:          -Wno-pedantic -Wall -Wno-variadic-macros -std=c++0x -Wl,--no-as-needed  -Wall -Wno-long-long -ffunction-sections 
-- CMAKE_BINARY_DIR:         /ProjectFiles/Utilities/raspicam/build
-- 
-- CMAKE_SYSTEM_PROCESSOR = x86_64
-- BUILD_SHARED_LIBS = ON
-- BUILD_UTILS = ON
-- CMAKE_INSTALL_PREFIX = /usr/local
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_MODULE_PATH = /usr/local/lib/cmake/;/usr/lib/cmake
-- 
-- CREATE OPENCV MODULE=1
-- CMAKE_INSTALL_PREFIX=/usr/local
-- REQUIRED_LIBRARIES=
-- 
-- 
-- Change a value with: cmake -D<Variable>=<Value>
-- 
-- Configuring done
-- Generating done
-- Build files have been written to: /ProjectFiles/Utilities/raspicam/build
Scanning dependencies of target raspicam
[  4%] Building CXX object src/CMakeFiles/raspicam.dir/raspicam.cpp.o
[  8%] Building CXX object src/CMakeFiles/raspicam.dir/raspicam_still.cpp.o
[ 12%] Building CXX object src/CMakeFiles/raspicam.dir/private/private_impl.cpp.o
[ 16%] Building CXX object src/CMakeFiles/raspicam.dir/private/threadcondition.cpp.o
[ 20%] Building CXX object src/CMakeFiles/raspicam.dir/private_still/private_still_impl.cpp.o
[ 25%] Building CXX object src/CMakeFiles/raspicam.dir/private/fake_mmal_dependencies.cpp.o
[ 29%] Linking CXX shared library libraspicam.so
[ 29%] Built target raspicam
Scanning dependencies of target raspicam_cv
[ 33%] Building CXX object src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp: In constructor ‘raspicam::RaspiCam_Cv::RaspiCam_Cv()’:
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:46:6: error: ‘CAP_PROP_FORMAT’ is not a member of ‘cv’
  set(cv::CAP_PROP_FORMAT,CV_8UC3);
      ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp: In member function ‘double raspicam::RaspiCam_Cv::get(int)’:
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:95:14: error: ‘CAP_PROP_MODE’ is not a member of ‘cv’
         case cv::CAP_PROP_MODE:
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:97:14: error: ‘CAP_PROP_FRAME_WIDTH’ is not a member of ‘cv’
         case cv::CAP_PROP_FRAME_WIDTH :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:99:14: error: ‘CAP_PROP_FRAME_HEIGHT’ is not a member of ‘cv’
         case cv::CAP_PROP_FRAME_HEIGHT :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:101:14: error: ‘CAP_PROP_FPS’ is not a member of ‘cv’
         case cv::CAP_PROP_FPS:
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:103:14: error: ‘CAP_PROP_FORMAT’ is not a member of ‘cv’
         case cv::CAP_PROP_FORMAT :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:105:14: error: ‘CAP_PROP_BRIGHTNESS’ is not a member of ‘cv’
         case cv::CAP_PROP_BRIGHTNESS :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:107:14: error: ‘CAP_PROP_CONTRAST’ is not a member of ‘cv’
         case cv::CAP_PROP_CONTRAST :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:109:14: error: ‘CAP_PROP_SATURATION’ is not a member of ‘cv’
         case cv::CAP_PROP_SATURATION :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:112:14: error: ‘CAP_PROP_GAIN’ is not a member of ‘cv’
         case cv::CAP_PROP_GAIN :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:114:14: error: ‘CAP_PROP_EXPOSURE’ is not a member of ‘cv’
         case cv::CAP_PROP_EXPOSURE :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp: In member function ‘bool raspicam::RaspiCam_Cv::set(int, double)’:
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:130:14: error: ‘CAP_PROP_MODE’ is not a member of ‘cv’
         case cv::CAP_PROP_MODE:
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:134:14: error: ‘CAP_PROP_FRAME_WIDTH’ is not a member of ‘cv’
         case cv::CAP_PROP_FRAME_WIDTH :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:137:14: error: ‘CAP_PROP_FRAME_HEIGHT’ is not a member of ‘cv’
         case cv::CAP_PROP_FRAME_HEIGHT :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:140:14: error: ‘CAP_PROP_FORMAT’ is not a member of ‘cv’
         case cv::CAP_PROP_FORMAT :{
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:153:14: error: ‘CAP_PROP_BRIGHTNESS’ is not a member of ‘cv’
         case cv::CAP_PROP_BRIGHTNESS :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:156:14: error: ‘CAP_PROP_CONTRAST’ is not a member of ‘cv’
         case cv::CAP_PROP_CONTRAST : 
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:159:14: error: ‘CAP_PROP_SATURATION’ is not a member of ‘cv’
         case cv::CAP_PROP_SATURATION :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:163:14: error: ‘CAP_PROP_GAIN’ is not a member of ‘cv’
         case cv::CAP_PROP_GAIN :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:166:14: error: ‘CAP_PROP_EXPOSURE’ is not a member of ‘cv’
         case cv::CAP_PROP_EXPOSURE :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:174:14: error: ‘CAP_PROP_CONVERT_RGB’ is not a member of ‘cv’
         case cv::CAP_PROP_CONVERT_RGB :
              ^
/ProjectFiles/Utilities/raspicam/src/raspicam_cv.cpp:177:14: error: ‘CAP_PROP_FPS’ is not a member of ‘cv’
         case cv::CAP_PROP_FPS:
              ^
src/CMakeFiles/raspicam_cv.dir/build.make:62: recipe for target 'src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o' failed
make[2]: *** [src/CMakeFiles/raspicam_cv.dir/raspicam_cv.cpp.o] Error 1
CMakeFiles/Makefile2:156: recipe for target 'src/CMakeFiles/raspicam_cv.dir/all' failed
make[1]: *** [src/CMakeFiles/raspicam_cv.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
@Satansseed6
Copy link

👍

@andreh7
Copy link

andreh7 commented Mar 3, 2019

I suspect that raspicam is meant to built against OpenCV 3 while e.g. on my Raspberry Pi (Raspbian 9) I only have OpenCV 2.4 .

@Sedwin97
Copy link

Sedwin97 commented Jul 2, 2019

So @andreh7 is the only option to build opencv3 from source to build raspicam?

@philliihd
Copy link

The easiest solution is to build an earlier commit of raspicam. If you revert to the commit on Jan 27, 2018 then raspicam will build with OpenCV 2.4: 59d92e6

OpenCV 2.4 works prior to a recent pull request (#43) and commit (35ace99) that switched to using OpenCV 3 or higher with no backwards comparability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants