[Jderobot-dev] Compilar cameraserver y cameraview

gallardo agustin agallard4 en gmail.com
Vie Dic 21 14:06:43 CET 2012


Buenos días,


he ejecutado los comandos y limpiado los directorios pero continuo con el
mismo error.

Estoy con la versión 4.4.7 de gcc y g++.


Un saludo y muchas gracias,
Agustín

2012/12/21 Luis Roberto Morales <lr.morales.iglesias en gmail.com>

> Buenas noches,
>
> he probado a compilar ambos componentes con gcc-4.6 (ubuntu 12.10 amd64) y
> sólo me ha saltado el error de enlazado con dc1394 (referencia a
> dc1394_video_set_transmission** desde cameraserver.cpp.o), que se ha
> solucionado al mover las órdenes de enlace desde CMAKE_CXX_FLAGS a
> TARGET_LINK_LIBRARIES en el CMakeLists.txt de cameraserver. Lo he probado
> con una cámara web USB y los componentes parecen funcionar correctamente.
>
>
> En cuanto al tema de cambiar la versión de gcc, he encontrado unas
> instrucciones [1] que mediante el uso de update-alternatives permiten
> cambiar entre versiones de gcc y g++ más rápidamente. Para aquellas
> personas que utilicen distintas versiones habitualmente creo que les puede
> resultar interesante para no tener que rehacer los enlaces simbólicos.
>
> Un saludo,
> Roberto
>
> [1] http://askubuntu.com/questions/26498/choose-gcc-and-g-version
>
>
> El 20 de diciembre de 2012 18:27, Mikel Gonzalez Baile <
> m.gonzalezbai en gmail.com> escribió:
>
> Buenas,
>>
>> prueba a ejecutar estos comandos uno por uno:
>>
>> sudo apt-get install gcc-4.4
>> sudo apt-get install g++-4.4
>> sudo cd /usr/bin
>> sudo rm gcc
>> sudo rm g++
>> sudo ln -s gcc-4.4 gcc
>> sudo ln -s g++-4.4 g++
>>
>> Tras esto, no olvides ejecutar los scripts "clean.sh" de cada componente
>> para realizar una compilación limpia con los nuevos cambios.
>>
>> Un saludo.
>>
>> Mikel.
>>
>>
>> 2012/12/20 gallardo agustin <agallard4 en gmail.com>
>>
>>>
>>> Hola Mikel,
>>>
>>> antes de anada muchas gracias.
>>>
>>> Ahora obtengo casi el mismo error en cameraview y cameraserver:
>>>
>>> *Cameraserver:*
>>> [100%] Building CXX object
>>> ../CMakeFiles/cameraserver.dir/gstpipeline.cpp.o
>>> Linking CXX executable cameraserver
>>> *build/../../../libs/jderobotice/libjderobotice.so: error: undefined
>>> reference to 'vtable for Glacier2::CannotCreateSessionException'
>>> build/../../../libs/jderobotice/libjderobotice.so: error: undefined
>>> reference to
>>> 'Glacier2::CannotCreateSessionException::~CannotCreateSessionException()'
>>> *
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_init'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_settype'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_setprotocol'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraserver.dir/cameraserver.cpp.o:cameraserver.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>>
>>> collect2: ld returned 1 exit status
>>> make[2]: *** [../cameraserver] Error 1
>>> make[1]: *** [../CMakeFiles/cameraserver.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>>
>>> *CameraView*
>>> [100%] Building CXX object ../CMakeFiles/cameraview.dir/viewer.cpp.o
>>> Linking CXX executable cameraview
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_init'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_settype'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_setprotocol'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>> CMakeFiles/cameraview.dir/cameraview.cpp.o:cameraview.cpp:function
>>> IceUtil::Mutex::init(IceUtil::MutexProtocol): error: undefined reference to
>>> 'pthread_mutexattr_destroy'
>>>
>>> collect2: ld returned 1 exit status
>>> make[2]: *** [../cameraview] Error 1
>>> make[1]: *** [../CMakeFiles/cameraview.dir/all] Error 2
>>> make: *** [all] Error 2
>>>
>>>
>>>
>>> Un saludo y muchas gracias,
>>> Agustín
>>>
>>>
>>> 2012/12/20 Mikel Gonzalez Baile <m.gonzalezbai en gmail.com>
>>>
>>>> Buenas,
>>>>
>>>> he modificado el CMakeLists.txt del componente cameraserver eliminando
>>>> la dependencia a la librería visionlib la cual creo que no es necesaria
>>>> para este componente. Prueba a hacer un update en ese directorio para
>>>> actualizar los cambios en tu copia local.
>>>>
>>>> También he modificado el CMakeLists.txt del componente cameraview para
>>>> que enlace de forma correcta con OpenCV, prueba a ver con los nuevos
>>>> cambios.
>>>>
>>>> Un saludo.
>>>>
>>>> Mikel.
>>>>
>>>>
>>>> On 20 December 2012 16:41, gallardo agustin <agallard4 en gmail.com>wrote:
>>>>
>>>>>
>>>>> Buenos días,
>>>>>
>>>>> no consigo comprilar diferentes componentes de jderobot:
>>>>>
>>>>> *Con cameraserver obtengo el siguiente error:*
>>>>>
>>>>> [ 98%] Built target visionlib
>>>>> Linking CXX executable cameraserver
>>>>> /usr/bin/ld: CMakeFiles/cameraserver.dir/cameraserver.cpp.o: undefined
>>>>> reference to symbol 'dc1394_video_set_transmission'
>>>>> /usr/bin/ld: note: *'dc1394_video_set_**transmission' is defined in
>>>>> DSO /usr/lib/gcc/i686-linux-gnu/4.**6/../../../i386-linux-gnu/**libdc1394.so
>>>>> so try adding it to the linker command line
>>>>> /usr/lib/gcc/i686-linux-gnu/4.**6/../../../i386-linux-gnu/**libdc1394.so:
>>>>> could not read symbols: Invalid operation*
>>>>> collect2: ld returned 1 exit status
>>>>> make[2]: *** [../cameraserver] Error 1
>>>>> make[1]: *** [../CMakeFiles/cameraserver.dir/all] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>> *Con cameraview:*
>>>>>
>>>>> Linking CXX executable cameraview
>>>>> CMakeFiles/cameraview.dir/cameraview.cpp.o: In function
>>>>> `cv::Mat::~Mat()':
>>>>> cameraview.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x2b): undefined
>>>>> reference to `cv::fastFree(void*)'
>>>>> CMakeFiles/cameraview.dir/cameraview.cpp.o: In function
>>>>> `cv::Mat::release()':
>>>>> cameraview.cpp:(.text._ZN2cv3Mat7releaseEv[cv::Mat::release()]+0x3b):
>>>>> undefined reference to `cv::Mat::deallocate()'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::cvtColor(cv::_InputArray const&,
>>>>> cv::_OutputArray const&, int, int)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::copySize(cv::Mat const&)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::imwrite(std::basic_string<char,
>>>>> std::char_traits<char>, std::allocator<char> > const&, cv::_InputArray
>>>>> const&, std::vector<int, std::allocator<int> > const&)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::reshape(int, int, int const*) const'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::mixChannels(cv::Mat const*, unsigned int,
>>>>> cv::Mat*, unsigned int, int const*, unsigned int)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::zeros(int, int, int)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::create(int, int const*, int)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::imread(std::basic_string<char,
>>>>> std::char_traits<char>, std::allocator<char> > const&, int)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `vtable for cv::_OutputArray'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::operator=(cv::Scalar_<double> const&)'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `cv::Mat::convertTo(cv::_OutputArray const&, int,
>>>>> double, double) const'
>>>>> /home/caupolican/robotica/trunk/src/components/cameraview/build/../../../libs/colorspaces/libcolorspacesmm.so:
>>>>> undefined reference to `vtable for cv::_InputArray'
>>>>> collect2: ld returned 1 exit status
>>>>> make[2]: *** [../cameraview] Error 1
>>>>> make[1]: *** [../CMakeFiles/cameraview.dir/all] Error 2
>>>>> make: *** [all] Error 2
>>>>>
>>>>>
>>>>> Estoy instalando sobre Ubuntu 12.04. Inicialmente instalé OpenCV 2.3.1
>>>>> (¿ cuál es la mejor manera de desinstalarlo ?) pero luego he instalado
>>>>> también 2.4.3. y sigue sin funcionar, tras ejecutar "make clean" y los
>>>>> scripts "clean.sh"
>>>>>
>>>>>
>>>>> Un saludo y
>>>>> Gracias!
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Jde-developers mailing list
>>>>> Jde-developers en gsyc.es
>>>>> http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Jde-developers mailing list
>> Jde-developers en gsyc.es
>> http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers
>>
>>
>
> _______________________________________________
> Jde-developers mailing list
> Jde-developers en gsyc.es
> http://gsyc.escet.urjc.es/cgi-bin/mailman/listinfo/jde-developers
>
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://gsyc.escet.urjc.es/pipermail/jde-developers/attachments/20121221/8c487370/attachment.htm 


More information about the Jde-developers mailing list