Str1101
Str1101

Reputation: 899

opencv 2.4.5 compilation errors (gpu_info.cpp)

first of all I want to congratulate all the people that helps to make this site so unique and helpful as it is.

After that little introduction here is my question:

I'm trying to compile the last OpenCV version on Ubuntu 12.04 (32 bits) and I'm always getting the next errors:

  **/home/srt/opencv/modules/core/src/gpu_info.cpp:468:34: error: no hay una función miembro ‘int cv::gpu::DeviceInfo::minor() const’ declarada en la clase ‘cv::gpu::DeviceInfo’**
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-unnamed-type-template-args" [activado por defecto]
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-delete-non-virtual-dtor" [activado por defecto]
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-narrowing" [activado por defecto]
  make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/gpu_info.cpp.o] Error 1
  make[2]: *** Se espera a que terminen otras tareas....
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-unnamed-type-template-args" [activado por defecto]
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-delete-non-virtual-dtor" [activado por defecto]
  cc1plus: aviso: no se reconoce la opción de línea de órdenes "-Wno-narrowing" [activado por defecto]
  make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
  make: *** [all] Error 2

I tried uninstalling FFMPEG and using different cmake flags but nothing changes. I also tried searching on the web for related problems but I only found the FFMPEG recommendation but nothing about the gpu_info.cpp. Is this file necessary for the compilation or I should try to exclude it from it somehow?

(I followed this tutorial for installing all the necessary files: http://www.ozbotz.org/opencv-installation/ and here I found a similar question but none of the recommendations worked for me: http://stackoverflow.com/questions/16321616/opencv-2-4-5-make-error )

Thanks in advance.

Upvotes: 1

Views: 780

Answers (1)

vinograd47
vinograd47

Reputation: 6420

You are using master branch. This a developer branch for next major release. So it contain new features, API changes and can be unstable. If you want to use stable version of OpenCV use 2.4 branch or 2.4.x releases.

As for this error, there is a pull request with patch to fix gpu_info.cpp compilation: https://github.com/Itseez/opencv/pull/1036. But it isn't merged yet.

UPDATE

You can merge this fix in your repository:

git remote add jet47 [email protected]:jet47/opencv.git 
git fetch jet47 
git merge jet47/fix-gpu-deviceinfo

Upvotes: 2

Related Questions