[Jderobot-dev] Fallo al compilar componentes de jderobot, ¿problema de versión de OpenCV?

Oscar Garcia oscar.robotica en linaresdigital.com
Mie Ene 9 19:45:14 CET 2013


Hola de nuevo,

Por otro lado en un intento desesperado de intentar compilar en Ubuntu 
10.04 desde el svn me aparece lo siguiente (más abajo intento compilar 
sólo un componente):

redstar en greystar:~/Descargas/jderobot/trunk$ cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
-- checking for module 'opencv'
-- found opencv, version 2.0.0

/usr/include/opencv
-- checking for module 'gtk+-2.0'
-- found gtk+-2.0, version 2.20.1
-- checking for module 'gtkgl-2.0'
-- found gtkgl-2.0, version 2.0.1
-- checking for module 'gtkmm-2.4'
-- found gtkmm-2.4, version 2.20.3
-- checking for module 'libglademm-2.4'
-- found libglademm-2.4, version 2.6.7
-- checking for module 'gthread-2.0'
-- found gthread-2.0, version 2.24.1
-- checking for module 'libgnomecanvas-2.0'
-- found libgnomecanvas-2.0, version 2.30.1
-- checking for module 'libgnomecanvasmm-2.6'
-- found libgnomecanvasmm-2.6, version 2.26.0
-- checking for module 'gtkglextmm-1.2'
-- found gtkglextmm-1.2, version 1.2.0
-- checking for module 'gsl'
-- found gsl, version 1.13
*** Gearbox not found
*** Fireware ok
PCL LIBRARY FOUND IN
*** PCL libraries not found. Are needed to KinectServer component
*** OpenNi libraries not found. Are needed to openniServer component
NI:ni_INCLUDE_DIR-NOTFOUND
NITE:nite_INCLUDE_DIR-NOTFOUND
*** Nite libraries: XnVNite or XnVCNITE not found
*** Player libraries not found. Are needed to PlayerServer component
*** *** Xerces libraries: libxerces-c not found
*** ICE ok
-- checking for module 'cwiid'
-- found cwiid, version 0.6.00
*** CWIID LIBRARIES FOUND
*** OpenCV ok
*** Creating CPP interfaces
CMake Error: The following variables are used in this project, but they 
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the 
CMake files:
OpenCV_LIBRARY1
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY11
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY13
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY14
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY2
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY3
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY4
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY5
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY6
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY7
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY8
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob
OpenCV_LIBRARY9
linked by target "colorspaces" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmm" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesmmshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "colorspacesshare" in directory 
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces
linked by target "introrob" in directory 
/home/redstar/Descargas/jderobot/trunk/src/components/introrob

-- Configuring incomplete, errors occurred!


Si intento compilar sólo un componente, cameraserver:

edstar en greystar:~/Descargas/jderobot/trunk/src/components/cameraview$ 
cmake .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
CMake Warning (dev) at CMakeLists.txt:3 (add_definitions):
Policy CMP0005 is not set: Preprocessor definition values are now escaped
automatically. Run "cmake --help-policy CMP0005" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: 
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview
redstar en greystar:~/Descargas/jderobot/trunk/src/components/cameraview$ make
Scanning dependencies of target cameraview
[ 50%] Building CXX object CMakeFiles/cameraview.dir/cameraview.o
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:25:29: 
error: jderobot/camera.h: No existe el fichero o el directorio
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:26:39: 
error: colorspaces/colorspacesmm.h: No existe el fichero o el directorio
In file included from 
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:27:
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:25:19: 
error: gtkmm.h: No existe el fichero o el directorio
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:26:24: 
error: libglademm.h: No existe el fichero o el directorio
In file included from 
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:27:
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:43: 
error: ISO C++ forbids declaration of ‘colorspaces’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:43: 
error: expected ‘,’ or ‘...’ before ‘::’ token
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:46: 
error: ‘Glib’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:46: 
error: ISO C++ forbids declaration of ‘RefPtr’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:46: 
error: expected ‘;’ before ‘<’ token
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:47: 
error: ‘Gtk’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:47: 
error: ISO C++ forbids declaration of ‘Image’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:47: 
error: expected ‘;’ before ‘*’ token
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:48: 
error: ‘Gtk’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:48: 
error: ISO C++ forbids declaration of ‘Window’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:48: 
error: expected ‘;’ before ‘*’ token
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:49: 
error: ‘Gtk’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:49: 
error: ISO C++ forbids declaration of ‘Label’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:49: 
error: expected ‘;’ before ‘*’ token
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:50: 
error: ‘Gtk’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:50: 
error: ISO C++ forbids declaration of ‘Main’ with no type
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/viewer.h:50: 
error: expected ‘;’ before ‘gtkmain’
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp: 
In function ‘int main(int, char**)’:
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:42: 
error: ‘jderobot’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:42: 
error: expected ‘;’ before ‘cprx’
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:43: 
error: ‘cprx’ was not declared in this scope
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:47: 
error: ‘jderobot’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:47: 
error: expected ‘;’ before ‘data’
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:48: 
error: ‘colorspaces’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:48: 
error: expected ‘;’ before ‘fmt’
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:49: 
error: ‘fmt’ was not declared in this scope
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:52: 
error: ‘colorspaces’ has not been declared
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:52: 
error: expected ‘;’ before ‘image’
/home/redstar/Descargas/jderobot/trunk/src/components/cameraview/cameraview.cpp:56: 
error: ‘image’ was not declared in this scope
make[2]: *** [CMakeFiles/cameraview.dir/cameraview.o] Error 1
make[1]: *** [CMakeFiles/cameraview.dir/all] Error 2
make: *** [all] Error 2
redstar en greystar:~/Descargas/jderobot/trunk/src/components/cameraview$ 
sudo apt-get install libglademm-2.4-dev
[sudo] password for redstar:
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
libglademm-2.4-dev ya está en su versión más reciente.


¿Qué estoy haciendo mal? Creo que tengo todas las dependencias 
necesarias (e incluso más). También tengo instalado gearbox aunque cmake 
insiste en decir que no.

Por otro lado creo que está todo preparado para una versión moderna de 
OpenCV, aunque tengo libhighgui-dev instalado no me compilan algunas 
librerías:
redstar en greystar:~/Descargas/jderobot/trunk/src/libs/colorspaces$ make
[ 33%] Built target colorspaces
[ 50%] Building CXX object CMakeFiles/colorspacesmm.dir/imagecv.o
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp:5:39: 
error: opencv2/highgui/highgui.hpp: No existe el fichero o el directorio
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp: 
In static member function ‘static colorspaces::ImageRGB8 
colorspaces::ImageRGB8::read(const std::string&)’:
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp:92: 
error: ‘imread’ is not a member of ‘cv’
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp: 
In member function ‘bool colorspaces::ImageRGB8::write(const 
std::string&, const std::vector<int, std::allocator<int> >&)’:
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp:100: 
error: ‘imwrite’ is not a member of ‘cv’
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp: 
In static member function ‘static colorspaces::ImageGRAY8 
colorspaces::ImageGRAY8::read(const std::string&)’:
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp:257: 
error: ‘imread’ is not a member of ‘cv’
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp: 
In member function ‘bool colorspaces::ImageGRAY8::write(const 
std::string&, const std::vector<int, std::allocator<int> >&)’:
/home/redstar/Descargas/jderobot/trunk/src/libs/colorspaces/imagecv.cpp:261: 
error: ‘imwrite’ is not a member of ‘cv’
make[2]: *** [CMakeFiles/colorspacesmm.dir/imagecv.o] Error 1
make[1]: *** [CMakeFiles/colorspacesmm.dir/all] Error 2
make: *** [all] Error 2

En definitiva, creo que todo apunta a que la versión de OpenCV que viene 
con Ubuntu 10.04 nbo es compatible con la versión actual de jderobot. 
¿Estoy en lo cierto? ¿Se abandona Ubuntu 10.04 como plataforma soportada 
debido a las dependencias?

Si es así querría saberlo para volver a reinstalar, pero en 12.04.

Gracias a todos.


More information about the Jde-developers mailing list