1

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.

Str1101
  • 859
  • 2
  • 12
  • 22

1 Answers1

2

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 git@github.com:jet47/opencv.git 
git fetch jet47 
git merge jet47/fix-gpu-deviceinfo
vinograd47
  • 6,320
  • 28
  • 30
  • Thank you very much for your quick answer, I was afraid that the cause could be something like this. By the way, I am only a git beginner so I would like to know if there is some way to merge this commit with my OpenCV directory manually. I tried using some commands shown here: [link](http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/1350157#1350157) but I'm not able to make them work – Str1101 Jun 24 '13 at 12:24
  • Thanks, it worked fine! (at the first moment I thought that there was some mistake but after some research I noticed that I hadn't the SSH keys configured and I finally managed to fix it. If someone have problems with the same may find useful: [link](https://help.github.com/articles/generating-ssh-keys) and [link](https://drupal.org/node/1066928) ) – Str1101 Jun 24 '13 at 13:38