Compilation problem when using orocos in rosbuild system

Hi,

I have created my package in the ROS system using the orocos_toolchain_ros.
I am trying to code my TaskContext of which all my component will
inheritate.

One of its aim is to load the scripting and marshalling plugins. My code
compile but failed to link. I may have forgotten to link to something but I
don't see what. Could someone help me please ?

the potential extract of faulty code :

bool ARDTaskContext::loadPlugins()
> {
> bool res = true;
>
> //ajout du plugin de scripting
> scripting = this->getProvider<RTT::Scripting>("scripting");
> if( scripting == NULL )
> {
> LOG(Error) << "Interface de scripting non chargée" << endlog();
> res &= false;
> }
>
> //ajout du plugin de marshalling
> marshalling = this->getProvider<RTT::Marshalling>("marshalling");
> if( marshalling == NULL )
> {
> LOG(Error) << "Interface de marschalling non chargée" <<
> endlog();
> res &= false;
> }
>
> return res;
> }

extract of cmake list :

file(
GLOB_RECURSE
source_files
*.cpp
)

orocos_library(arp-core ${source_files} )
link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
link_libraries(arp_core librtt-marshalling-gnulinux.so )
link_libraries(arp_core librtt-scripting-gnulinux.so )

the make output :

[ 83%] Building CXX object src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> `boost::shared_ptr<RTT::Scripting>
> boost::dynamic_pointer_cast<RTT::Scripting,
> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>
> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
> boost::dynamic_pointer_cast<RTT::Scripting,
> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> `boost::shared_ptr<RTT::Marshalling>
> boost::dynamic_pointer_cast<RTT::Marshalling,
> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>
> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
> boost::dynamic_pointer_cast<RTT::Marshalling,
> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> const&)]+0x26): undefined reference to `typeinfo for RTT::Marshalling'
> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
> RTT::TaskContext*>(RTT::TaskContext* const&)':
>
> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
> boost::make_shared<RTT::Scripting, RTT::TaskContext*>(RTT::TaskContext*
> const&)]+0x164): undefined reference to
> `RTT::Scripting::Scripting(RTT::TaskContext*)'
> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> `boost::shared_ptr<RTT::Marshalling> boost::make_shared<RTT::Marshalling,
> RTT::TaskContext*>(RTT::TaskContext* const&)':
>
> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
> boost::make_shared<RTT::Marshalling, RTT::TaskContext*>(RTT::TaskContext*
> const&)]+0x164): undefined reference to
> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global constructors
> keyed to ARDTest.cpp':
> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
> boost::unit_test::unit_test_log_t'
> collect2: ld returned 1 exit status
> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
> make[3]: quittant le répertoire «
> /media/DD_data/home/ard/ros/ard/arp_core/build »
> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
> make[2]: quittant le répertoire «
> /media/DD_data/home/ard/ros/ard/arp_core/build »
> make[1]: *** [all] Erreur 2
> make[1]: quittant le répertoire «
> /media/DD_data/home/ard/ros/ard/arp_core/build »
>

I also have similar kind of problem when trying to set up the
OCL::logging::Category* logger , is this page up to date :
http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...?
It seems some option are automaticaly set up now by default in Orocos.
Is
it an official released feature ?

Compilation problem when using orocos in rosbuild system

2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>

> Hi,
>
> I have created my package in the ROS system using the orocos_toolchain_ros.
> I am trying to code my TaskContext of which all my component will
> inheritate.
>
> One of its aim is to load the scripting and marshalling plugins. My code
> compile but failed to link. I may have forgotten to link to something but I
> don't see what. Could someone help me please ?
>
> the potential extract of faulty code :
>
> bool ARDTaskContext::loadPlugins()
>> {
>> bool res = true;
>>
>> //ajout du plugin de scripting
>> scripting = this->getProvider<RTT::Scripting>("scripting");
>> if( scripting == NULL )
>> {
>> LOG(Error) << "Interface de scripting non chargée" <<
>> endlog();
>> res &= false;
>> }
>>
>> //ajout du plugin de marshalling
>> marshalling = this->getProvider<RTT::Marshalling>("marshalling");
>> if( marshalling == NULL )
>> {
>> LOG(Error) << "Interface de marschalling non chargée" <<
>> endlog();
>> res &= false;
>> }
>>
>> return res;
>> }
>
>
>
> extract of cmake list :
>
> file(
> GLOB_RECURSE
> source_files
> *.cpp
> )
>
> orocos_library(arp-core ${source_files} )
> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> link_libraries(arp_core librtt-scripting-gnulinux.so )
>
>
there where a typo here ( "_" instead of "-"), but it is not the problem :
orocos_library(arp-core ${source_files} )
link_libraries(arp-core orocos-log4cpp-gnulinux )
link_libraries(arp-core rtt-marshalling-gnulinux )
link_libraries(arp-core rtt-scripting-gnulinux )

>
> the make output :
>
> [ 83%] Building CXX object src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
>> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> `boost::shared_ptr<RTT::Scripting>
>> boost::dynamic_pointer_cast<RTT::Scripting,
>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>>
>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
>> boost::dynamic_pointer_cast<RTT::Scripting,
>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> `boost::shared_ptr<RTT::Marshalling>
>> boost::dynamic_pointer_cast<RTT::Marshalling,
>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>>
>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
>> boost::dynamic_pointer_cast<RTT::Marshalling,
>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> const&)]+0x26): undefined reference to `typeinfo for RTT::Marshalling'
>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>
>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
>> boost::make_shared<RTT::Scripting, RTT::TaskContext*>(RTT::TaskContext*
>> const&)]+0x164): undefined reference to
>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> `boost::shared_ptr<RTT::Marshalling> boost::make_shared<RTT::Marshalling,
>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>
>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
>> boost::make_shared<RTT::Marshalling, RTT::TaskContext*>(RTT::TaskContext*
>> const&)]+0x164): undefined reference to
>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global constructors
>> keyed to ARDTest.cpp':
>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
>> boost::unit_test::unit_test_log_t'
>> collect2: ld returned 1 exit status
>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
>> make[3]: quittant le répertoire «
>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
>> make[2]: quittant le répertoire «
>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>> make[1]: *** [all] Erreur 2
>> make[1]: quittant le répertoire «
>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>
>
>
>
> I also have similar kind of problem when trying to set up the
> OCL::logging::Category* logger , is this page up to date :
> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...? It seems some option are automaticaly set up now by default in Orocos. Is
> it an official released feature ?
>
>
>

Compilation problem when using orocos in rosbuild system

2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
>
>
> 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
>>
>> Hi,
>>
>> I have created my package in the ROS system using the
>> orocos_toolchain_ros. I am trying to code my TaskContext of which all my
>> component will inheritate.
>>
>> One of its aim is to load the scripting and marshalling plugins. My code
>> compile but failed to link. I may have forgotten to link to something but I
>> don't see what. Could someone help me please ?
>>
>> the potential extract of faulty code :
>>
>>> bool ARDTaskContext::loadPlugins()
>>>     {
>>>         bool res = true;
>>>
>>>         //ajout du plugin de scripting
>>>         scripting = this->getProvider<RTT::Scripting>("scripting");
>>>         if( scripting == NULL )
>>>         {
>>>             LOG(Error) << "Interface de scripting non chargée" <<
>>> endlog();
>>>             res &= false;
>>>         }
>>>
>>>         //ajout du plugin de marshalling
>>>         marshalling = this->getProvider<RTT::Marshalling>("marshalling");
>>>         if( marshalling == NULL )
>>>         {
>>>             LOG(Error) << "Interface de marschalling non chargée" <<
>>> endlog();
>>>             res &= false;
>>>         }
>>>
>>>         return res;
>>>     }
>>
>> extract of cmake list :
>>
>>     file(
>>         GLOB_RECURSE
>>         source_files
>>         *.cpp
>>     )
>>
>> orocos_library(arp-core ${source_files} )
>> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
>> link_libraries(arp_core librtt-marshalling-gnulinux.so )
>> link_libraries(arp_core librtt-scripting-gnulinux.so )
>
> there where a typo here ( "_" instead of "-"), but it  is not the problem :
> orocos_library(arp-core ${source_files} )
> link_libraries(arp-core orocos-log4cpp-gnulinux )
> link_libraries(arp-core rtt-marshalling-gnulinux )
> link_libraries(arp-core rtt-scripting-gnulinux )

You have to link with the marshalling library explicitly, according to
this post of Peter :

<quote>
Yes, you need to link explicitly. We added a link flag such that each
component must be linked correctly at build-time.

You can do:

find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
and then add after your orocos_component( MasterControl ) :
target_link_libraries( MasterControl ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )

See this file for all docs :
http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config...

We're working on it to make this linking automatic, but the above will
always work, also in the future.

<quote>

regards,

Steven

>
>
>
>
>>
>> the make output :
>>
>>> [ 83%] Building CXX object src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
>>>   Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
>>>   CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> `boost::shared_ptr<RTT::Scripting>
>>> boost::dynamic_pointer_cast<RTT::Scripting,
>>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>>>
>>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
>>> boost::dynamic_pointer_cast<RTT::Scripting,
>>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
>>>   CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> `boost::shared_ptr<RTT::Marshalling>
>>> boost::dynamic_pointer_cast<RTT::Marshalling,
>>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester> const&)':
>>>
>>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
>>> boost::dynamic_pointer_cast<RTT::Marshalling,
>>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> const&)]+0x26): undefined reference to `typeinfo for RTT::Marshalling'
>>>   CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
>>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>>
>>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
>>> boost::make_shared<RTT::Scripting, RTT::TaskContext*>(RTT::TaskContext*
>>> const&)]+0x164): undefined reference to
>>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
>>>   CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> `boost::shared_ptr<RTT::Marshalling> boost::make_shared<RTT::Marshalling,
>>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>>
>>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
>>> boost::make_shared<RTT::Marshalling, RTT::TaskContext*>(RTT::TaskContext*
>>> const&)]+0x164): undefined reference to
>>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
>>>   CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global constructors
>>> keyed to ARDTest.cpp':
>>>   ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
>>> boost::unit_test::unit_test_log_t'
>>>   collect2: ld returned 1 exit status
>>>   make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
>>>   make[3]: quittant le répertoire «
>>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>>   make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
>>>   make[2]: quittant le répertoire «
>>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>>   make[1]: *** [all] Erreur 2
>>>   make[1]: quittant le répertoire «
>>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>
>>
>>
>> I also have similar kind of problem when trying to set up the
>> OCL::logging::Category* logger , is this page up to date :
>> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...
>> ? It seems some option are automaticaly set up now by default in Orocos. Is
>> it an official released feature ?
>>
>>
>
>

Compilation problem when using orocos in rosbuild system

2011/2/27 Steven Bellens <steven [dot] bellens [..] ...>

> 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
> >
> >
> > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
> >>
> >> Hi,
> >>
> >> I have created my package in the ROS system using the
> >> orocos_toolchain_ros. I am trying to code my TaskContext of which all my
> >> component will inheritate.
> >>
> >> One of its aim is to load the scripting and marshalling plugins. My code
> >> compile but failed to link. I may have forgotten to link to something
> but I
> >> don't see what. Could someone help me please ?
> >>
> >> the potential extract of faulty code :
> >>
> >>> bool ARDTaskContext::loadPlugins()
> >>> {
> >>> bool res = true;
> >>>
> >>> //ajout du plugin de scripting
> >>> scripting = this->getProvider<RTT::Scripting>("scripting");
> >>> if( scripting == NULL )
> >>> {
> >>> LOG(Error) << "Interface de scripting non chargée" <<
> >>> endlog();
> >>> res &= false;
> >>> }
> >>>
> >>> //ajout du plugin de marshalling
> >>> marshalling =
> this->getProvider<RTT::Marshalling>("marshalling");
> >>> if( marshalling == NULL )
> >>> {
> >>> LOG(Error) << "Interface de marschalling non chargée" <<
> >>> endlog();
> >>> res &= false;
> >>> }
> >>>
> >>> return res;
> >>> }
> >>
> >> extract of cmake list :
> >>
> >> file(
> >> GLOB_RECURSE
> >> source_files
> >> *.cpp
> >> )
> >>
> >> orocos_library(arp-core ${source_files} )
> >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> >> link_libraries(arp_core librtt-scripting-gnulinux.so )
> >
> > there where a typo here ( "_" instead of "-"), but it is not the problem
> :
> > orocos_library(arp-core ${source_files} )
> > link_libraries(arp-core orocos-log4cpp-gnulinux )
> > link_libraries(arp-core rtt-marshalling-gnulinux )
> > link_libraries(arp-core rtt-scripting-gnulinux )
>
> You have to link with the marshalling library explicitly, according to
> this post of Peter :
>
> <quote>
> Yes, you need to link explicitly. We added a link flag such that each
> component must be linked correctly at build-time.
>
> You can do:
>
>

> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> and then add after your orocos_component( MasterControl ) :
> target_link_libraries( MasterControl ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY}
> )
> 

> See this file for all docs :
>
> http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config...
>
> We're working on it to make this linking automatic, but the above will
> always work, also in the future.
>
> <quote>
>

Sorry for asking a pre-posted question, I did not research, my bad. It did
not solve the problem, the find package doesn't seems to work

Here is my new cmake file extract

rosbuild_find_ros_package( rtt )
set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
message("#####!!######### marshalling : ${OROCOS-RTT_RTT-MARSHALLING_FOUND}
| ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} ############")

here is the output

Orocos-RTT found in
/home/ard/ros/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
-- Found orocos-rtt 2.2.1 for the gnulinux target. Available transports:
mqueue
#####!!######### marshalling : | ############

>
> regards,
>
> Steven
>
>
> >
> >
> >
> >
> >>
> >> the make output :
> >>
> >>> [ 83%] Building CXX object
> src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
> >>> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>> `boost::shared_ptr<RTT::Scripting>
> >>> boost::dynamic_pointer_cast<RTT::Scripting,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> const&)':
> >>>
> >>>
> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
> >>> boost::dynamic_pointer_cast<RTT::Scripting,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>> `boost::shared_ptr<RTT::Marshalling>
> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> const&)':
> >>>
> >>>
> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Marshalling'
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> >>>
> >>>
> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
> >>> boost::make_shared<RTT::Scripting, RTT::TaskContext*>(RTT::TaskContext*
> >>> const&)]+0x164): undefined reference to
> >>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>> `boost::shared_ptr<RTT::Marshalling>
> boost::make_shared<RTT::Marshalling,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> >>>
> >>>
> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
> >>> boost::make_shared<RTT::Marshalling,
> RTT::TaskContext*>(RTT::TaskContext*
> >>> const&)]+0x164): undefined reference to
> >>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
> >>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global
> constructors
> >>> keyed to ARDTest.cpp':
> >>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
> >>> boost::unit_test::unit_test_log_t'
> >>> collect2: ld returned 1 exit status
> >>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
> >>> make[3]: quittant le répertoire «
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
> >>> make[2]: quittant le répertoire «
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>> make[1]: *** [all] Erreur 2
> >>> make[1]: quittant le répertoire «
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>
> >>
> >>
> >> I also have similar kind of problem when trying to set up the
> >> OCL::logging::Category* logger , is this page up to date :
> >>
> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...
> >> ? It seems some option are automaticaly set up now by default in Orocos.
> Is
> >> it an official released feature ?
> >>
> >>
> >
> >
>

Compilation problem when using orocos in rosbuild system

On Sunday 27 February 2011 12:53:41 Willy Lambert wrote:
> 2011/2/27 Steven Bellens <steven [dot] bellens [..] ...>
>
> > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
> > > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
> > >
> > >> Hi,
> > >>
> > >> I have created my package in the ROS system using the
> > >> orocos_toolchain_ros. I am trying to code my TaskContext of which all
> > >> my component will inheritate.
> > >>
> > >> One of its aim is to load the scripting and marshalling plugins. My
> > >> code compile but failed to link. I may have forgotten to link to
> > >> something
> >
> > but I
> >
> > >> don't see what. Could someone help me please ?
> > >>
> > >> the potential extract of faulty code :
> > >>> bool ARDTaskContext::loadPlugins()
> > >>>
> > >>> {
> > >>>
> > >>> bool res = true;
> > >>>
> > >>> //ajout du plugin de scripting
> > >>> scripting = this->getProvider<RTT::Scripting>("scripting");
> > >>> if( scripting == NULL )
> > >>> {
> > >>>
> > >>> LOG(Error) << "Interface de scripting non chargée" <<
> > >>>
> > >>> endlog();
> > >>>
> > >>> res &= false;
> > >>>
> > >>> }
> > >>>
> > >>> //ajout du plugin de marshalling
> > >>> marshalling =
> >
> > this->getProvider<RTT::Marshalling>("marshalling");
> >
> > >>> if( marshalling == NULL )
> > >>> {
> > >>>
> > >>> LOG(Error) << "Interface de marschalling non chargée" <<
> > >>>
> > >>> endlog();
> > >>>
> > >>> res &= false;
> > >>>
> > >>> }
> > >>>
> > >>> return res;
> > >>>
> > >>> }
> > >>
> > >> extract of cmake list :
> > >> file(
> > >>
> > >> GLOB_RECURSE
> > >> source_files
> > >> *.cpp
> > >>
> > >> )
> > >>
> > >> orocos_library(arp-core ${source_files} )
> > >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> > >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> > >> link_libraries(arp_core librtt-scripting-gnulinux.so )
> > >
> > > there where a typo here ( "_" instead of "-"), but it is not the
> > > problem
> > >
> > > orocos_library(arp-core ${source_files} )
> > > link_libraries(arp-core orocos-log4cpp-gnulinux )
> > > link_libraries(arp-core rtt-marshalling-gnulinux )
> > > link_libraries(arp-core rtt-scripting-gnulinux )
> >
> > You have to link with the marshalling library explicitly, according to
> > this post of Peter :
> >
> > <quote>
> > Yes, you need to link explicitly. We added a link flag such that each
> > component must be linked correctly at build-time.
> >
> > You can do:
> >
> >

> > find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> > and then add after your orocos_component( MasterControl ) :
> > target_link_libraries( MasterControl
> > ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )
> > 

> > See this file for all docs :
> >
> > http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config.
> > cmake
> >
> > We're working on it to make this linking automatic, but the above will
> > always work, also in the future.
> >
> > <quote>
>
> Sorry for asking a pre-posted question, I did not research, my bad. It did
> not solve the problem, the find package doesn't seems to work
>
> Here is my new cmake file extract
>
> rosbuild_find_ros_package( rtt )
> set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
> find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
> include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})

These two lines are bogus. They will do nothing. You can only invoke
find_package once, since once it is found, a next call will return immediately.

You should at least have written:

find_package(OROCOS-RTT REQUIRED rtt-marshalling rtt-scripting ${RTT_HINTS})

We'll print a warning message when users use find_package like this, instead of
silently returning...

Peter

Compilation problem when using orocos in rosbuild system

2011/2/28 Peter Soetens <peter [..] ...>

> On Sunday 27 February 2011 12:53:41 Willy Lambert wrote:
> > 2011/2/27 Steven Bellens <steven [dot] bellens [..] ...>
> >
> > > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
> > > > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
> > > >
> > > >> Hi,
> > > >>
> > > >> I have created my package in the ROS system using the
> > > >> orocos_toolchain_ros. I am trying to code my TaskContext of which
> all
> > > >> my component will inheritate.
> > > >>
> > > >> One of its aim is to load the scripting and marshalling plugins. My
> > > >> code compile but failed to link. I may have forgotten to link to
> > > >> something
> > >
> > > but I
> > >
> > > >> don't see what. Could someone help me please ?
> > > >>
> > > >> the potential extract of faulty code :
> > > >>> bool ARDTaskContext::loadPlugins()
> > > >>>
> > > >>> {
> > > >>>
> > > >>> bool res = true;
> > > >>>
> > > >>> //ajout du plugin de scripting
> > > >>> scripting = this->getProvider<RTT::Scripting>("scripting");
> > > >>> if( scripting == NULL )
> > > >>> {
> > > >>>
> > > >>> LOG(Error) << "Interface de scripting non chargée" <<
> > > >>>
> > > >>> endlog();
> > > >>>
> > > >>> res &= false;
> > > >>>
> > > >>> }
> > > >>>
> > > >>> //ajout du plugin de marshalling
> > > >>> marshalling =
> > >
> > > this->getProvider<RTT::Marshalling>("marshalling");
> > >
> > > >>> if( marshalling == NULL )
> > > >>> {
> > > >>>
> > > >>> LOG(Error) << "Interface de marschalling non chargée"
> <<
> > > >>>
> > > >>> endlog();
> > > >>>
> > > >>> res &= false;
> > > >>>
> > > >>> }
> > > >>>
> > > >>> return res;
> > > >>>
> > > >>> }
> > > >>
> > > >> extract of cmake list :
> > > >> file(
> > > >>
> > > >> GLOB_RECURSE
> > > >> source_files
> > > >> *.cpp
> > > >>
> > > >> )
> > > >>
> > > >> orocos_library(arp-core ${source_files} )
> > > >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> > > >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> > > >> link_libraries(arp_core librtt-scripting-gnulinux.so )
> > > >
> > > > there where a typo here ( "_" instead of "-"), but it is not the
> > > > problem
> > > >
> > > > orocos_library(arp-core ${source_files} )
> > > > link_libraries(arp-core orocos-log4cpp-gnulinux )
> > > > link_libraries(arp-core rtt-marshalling-gnulinux )
> > > > link_libraries(arp-core rtt-scripting-gnulinux )
> > >
> > > You have to link with the marshalling library explicitly, according to
> > > this post of Peter :
> > >
> > > <quote>
> > > Yes, you need to link explicitly. We added a link flag such that each
> > > component must be linked correctly at build-time.
> > >
> > > You can do:
> > >
> > >

> > > find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> > > and then add after your orocos_component( MasterControl ) :
> > > target_link_libraries( MasterControl
> > > ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )
> > > 

> > > See this file for all docs :
> > >
> > >
> http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config.
> > > cmake
> > >
> > > We're working on it to make this linking automatic, but the above will
> > > always work, also in the future.
> > >
> > > <quote>
> >
> > Sorry for asking a pre-posted question, I did not research, my bad. It
> did
> > not solve the problem, the find package doesn't seems to work
> >
> > Here is my new cmake file extract
> >
> > rosbuild_find_ros_package( rtt )
> > set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
> > find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
> > include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
> > find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> > find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
>
> These two lines are bogus. They will do nothing. You can only invoke
> find_package once, since once it is found, a next call will return
> immediately.
>
> You should at least have written:
>
> find_package(OROCOS-RTT REQUIRED rtt-marshalling rtt-scripting
> ${RTT_HINTS})
>

It works better when using the system in the rigth way :) It works with

find_package(OROCOS-RTT REQUIRED rtt-marshalling rtt-scripting
${RTT_HINTS})
orocos_library(arp-core ${source_files} )
target_link_libraries( arp-core ${OROCOS-RTT_RTT-MARSHALLING_
LIBRARY} )
target_link_libraries( arp-core ${OROCOS-RTT_RTT-SCRIPTING_
LIBRARY} )

thanks all.

>
> We'll print a warning message when users use find_package like this,
> instead of
> silently returning...
>

yes please, for guys like that don't understand anything in find_package ^^

>
> Peter
>

Compilation problem when using orocos in rosbuild system

2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/2/27 Steven Bellens <steven [dot] bellens [..] ...>
>
> 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
>> >
>> >
>> > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
>> >>
>> >> Hi,
>> >>
>> >> I have created my package in the ROS system using the
>> >> orocos_toolchain_ros. I am trying to code my TaskContext of which all
>> my
>> >> component will inheritate.
>> >>
>> >> One of its aim is to load the scripting and marshalling plugins. My
>> code
>> >> compile but failed to link. I may have forgotten to link to something
>> but I
>> >> don't see what. Could someone help me please ?
>> >>
>> >> the potential extract of faulty code :
>> >>
>> >>> bool ARDTaskContext::loadPlugins()
>> >>> {
>> >>> bool res = true;
>> >>>
>> >>> //ajout du plugin de scripting
>> >>> scripting = this->getProvider<RTT::Scripting>("scripting");
>> >>> if( scripting == NULL )
>> >>> {
>> >>> LOG(Error) << "Interface de scripting non chargée" <<
>> >>> endlog();
>> >>> res &= false;
>> >>> }
>> >>>
>> >>> //ajout du plugin de marshalling
>> >>> marshalling =
>> this->getProvider<RTT::Marshalling>("marshalling");
>> >>> if( marshalling == NULL )
>> >>> {
>> >>> LOG(Error) << "Interface de marschalling non chargée" <<
>> >>> endlog();
>> >>> res &= false;
>> >>> }
>> >>>
>> >>> return res;
>> >>> }
>> >>
>> >> extract of cmake list :
>> >>
>> >> file(
>> >> GLOB_RECURSE
>> >> source_files
>> >> *.cpp
>> >> )
>> >>
>> >> orocos_library(arp-core ${source_files} )
>> >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
>> >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
>> >> link_libraries(arp_core librtt-scripting-gnulinux.so )
>> >
>> > there where a typo here ( "_" instead of "-"), but it is not the
>> problem :
>> > orocos_library(arp-core ${source_files} )
>> > link_libraries(arp-core orocos-log4cpp-gnulinux )
>> > link_libraries(arp-core rtt-marshalling-gnulinux )
>> > link_libraries(arp-core rtt-scripting-gnulinux )
>>
>> You have to link with the marshalling library explicitly, according to
>> this post of Peter :
>>
>> <quote>
>> Yes, you need to link explicitly. We added a link flag such that each
>> component must be linked correctly at build-time.
>>
>> You can do:
>>
>>

>> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
>> and then add after your orocos_component( MasterControl ) :
>> target_link_libraries( MasterControl ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY}
>> )
>> 

>> See this file for all docs :
>>
>> http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config...
>>
>> We're working on it to make this linking automatic, but the above will
>> always work, also in the future.
>>
>> <quote>
>>
>
>
>
> Sorry for asking a pre-posted question, I did not research, my bad. It did
> not solve the problem, the find package doesn't seems to work
>
> Here is my new cmake file extract
>
> rosbuild_find_ros_package( rtt )
> set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
> find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
> include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
> message("#####!!######### marshalling : ${OROCOS-RTT_RTT-MARSHALLING_FOUND}
> | ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} ############")
>
> here is the output
>
> Orocos-RTT found in
> /home/ard/ros/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
> -- Found orocos-rtt 2.2.1 for the gnulinux target. Available transports:
> mqueue
> #####!!######### marshalling : | ############
>
>
>
I tried this in a proper orocreated-pkg package to be sure I is not my
Cmakefile that are badly writtent.

I added the suggested lines
I commented the typegen line (its a known issue)
I uncomment the orocos_library(support) and put my TaskContext heritance
into it.

I have the same behavior, so it is easily testable

Adding to did the trick. I is not perfect but working :
target_link_libraries(arp-core
${rtt_PACKAGE_PATH}/install/lib/orocos/plugins/librtt-marshalling-${OROCOS_TARGET}.so)
target_link_libraries(arp-core
${rtt_PACKAGE_PATH}/rtt/install/lib/orocos/plugins/librtt-scripting-${OROCOS_TARGET}.so)

>
>
>
>
>>
>> regards,
>>
>> Steven
>>
>>
>> >
>> >
>> >
>> >
>> >>
>> >> the make output :
>> >>
>> >>> [ 83%] Building CXX object
>> src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
>> >>> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> >>> `boost::shared_ptr<RTT::Scripting>
>> >>> boost::dynamic_pointer_cast<RTT::Scripting,
>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> const&)':
>> >>>
>> >>>
>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
>> >>> boost::dynamic_pointer_cast<RTT::Scripting,
>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> >>> `boost::shared_ptr<RTT::Marshalling>
>> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> const&)':
>> >>>
>> >>>
>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
>> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Marshalling'
>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> >>> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
>> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>> >>>
>> >>>
>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
>> >>> boost::make_shared<RTT::Scripting,
>> RTT::TaskContext*>(RTT::TaskContext*
>> >>> const&)]+0x164): undefined reference to
>> >>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>> >>> `boost::shared_ptr<RTT::Marshalling>
>> boost::make_shared<RTT::Marshalling,
>> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>> >>>
>> >>>
>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
>> >>> boost::make_shared<RTT::Marshalling,
>> RTT::TaskContext*>(RTT::TaskContext*
>> >>> const&)]+0x164): undefined reference to
>> >>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
>> >>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global
>> constructors
>> >>> keyed to ARDTest.cpp':
>> >>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
>> >>> boost::unit_test::unit_test_log_t'
>> >>> collect2: ld returned 1 exit status
>> >>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
>> >>> make[3]: quittant le répertoire «
>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>> >>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
>> >>> make[2]: quittant le répertoire «
>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>> >>> make[1]: *** [all] Erreur 2
>> >>> make[1]: quittant le répertoire «
>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>> >>
>> >>
>> >>
>> >> I also have similar kind of problem when trying to set up the
>> >> OCL::logging::Category* logger , is this page up to date :
>> >>
>> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...
>> >> ? It seems some option are automaticaly set up now by default in
>> Orocos. Is
>> >> it an official released feature ?
>> >>
>> >>
>> >
>> >
>>
>
>

Compilation problem when using orocos in rosbuild system

2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>

>
>
> 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
>
>>
>>
>> 2011/2/27 Steven Bellens <steven [dot] bellens [..] ...>
>>
>> 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>:
>>> >
>>> >
>>> > 2011/2/27 Willy Lambert <lambert [dot] willy [..] ...>
>>> >>
>>> >> Hi,
>>> >>
>>> >> I have created my package in the ROS system using the
>>> >> orocos_toolchain_ros. I am trying to code my TaskContext of which all
>>> my
>>> >> component will inheritate.
>>> >>
>>> >> One of its aim is to load the scripting and marshalling plugins. My
>>> code
>>> >> compile but failed to link. I may have forgotten to link to something
>>> but I
>>> >> don't see what. Could someone help me please ?
>>> >>
>>> >> the potential extract of faulty code :
>>> >>
>>> >>> bool ARDTaskContext::loadPlugins()
>>> >>> {
>>> >>> bool res = true;
>>> >>>
>>> >>> //ajout du plugin de scripting
>>> >>> scripting = this->getProvider<RTT::Scripting>("scripting");
>>> >>> if( scripting == NULL )
>>> >>> {
>>> >>> LOG(Error) << "Interface de scripting non chargée" <<
>>> >>> endlog();
>>> >>> res &= false;
>>> >>> }
>>> >>>
>>> >>> //ajout du plugin de marshalling
>>> >>> marshalling =
>>> this->getProvider<RTT::Marshalling>("marshalling");
>>> >>> if( marshalling == NULL )
>>> >>> {
>>> >>> LOG(Error) << "Interface de marschalling non chargée" <<
>>> >>> endlog();
>>> >>> res &= false;
>>> >>> }
>>> >>>
>>> >>> return res;
>>> >>> }
>>> >>
>>> >> extract of cmake list :
>>> >>
>>> >> file(
>>> >> GLOB_RECURSE
>>> >> source_files
>>> >> *.cpp
>>> >> )
>>> >>
>>> >> orocos_library(arp-core ${source_files} )
>>> >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
>>> >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
>>> >> link_libraries(arp_core librtt-scripting-gnulinux.so )
>>> >
>>> > there where a typo here ( "_" instead of "-"), but it is not the
>>> problem :
>>> > orocos_library(arp-core ${source_files} )
>>> > link_libraries(arp-core orocos-log4cpp-gnulinux )
>>> > link_libraries(arp-core rtt-marshalling-gnulinux )
>>> > link_libraries(arp-core rtt-scripting-gnulinux )
>>>
>>> You have to link with the marshalling library explicitly, according to
>>> this post of Peter :
>>>
>>> <quote>
>>> Yes, you need to link explicitly. We added a link flag such that each
>>> component must be linked correctly at build-time.
>>>
>>> You can do:
>>>
>>>

>>> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
>>> and then add after your orocos_component( MasterControl ) :
>>> target_link_libraries( MasterControl
>>> ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )
>>> 

>>> See this file for all docs :
>>>
>>> http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config...
>>>
>>> We're working on it to make this linking automatic, but the above will
>>> always work, also in the future.
>>>
>>> <quote>
>>>
>>
>>
>>
>> Sorry for asking a pre-posted question, I did not research, my bad. It did
>> not solve the problem, the find package doesn't seems to work
>>
>> Here is my new cmake file extract
>>
>> rosbuild_find_ros_package( rtt )
>> set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
>> find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
>> include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
>> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
>> find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
>> message("#####!!######### marshalling :
>> ${OROCOS-RTT_RTT-MARSHALLING_FOUND} | ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY}
>> ############")
>>
>> here is the output
>>
>> Orocos-RTT found in
>> /home/ard/ros/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-rtt-gnulinux-libraries.cmake
>> -- Found orocos-rtt 2.2.1 for the gnulinux target. Available transports:
>> mqueue
>> #####!!######### marshalling : | ############
>>
>>
>>
> I tried this in a proper orocreated-pkg package to be sure I is not my
> Cmakefile that are badly writtent.
>
> I added the suggested lines
> I commented the typegen line (its a known issue)
> I uncomment the orocos_library(support) and put my TaskContext heritance
> into it.
>
> I have the same behavior, so it is easily testable
>
> Adding to did the trick. I is not perfect but working :
> target_link_libraries(arp-core
> ${rtt_PACKAGE_PATH}/install/lib/orocos/plugins/librtt-marshalling-${OROCOS_TARGET}.so)
> target_link_libraries(arp-core
> ${rtt_PACKAGE_PATH}/rtt/install/lib/orocos/plugins/librtt-scripting-${OROCOS_TARGET}.so)
>

I was lurred by a commented line in the upper CMakeLists, it didn't solved
anything :(

I tried to play with other Cmake commands as far as I may understand the
cmake documentation, but without success

>
>
>
>
>>
>>
>>
>>
>>>
>>> regards,
>>>
>>> Steven
>>>
>>>
>>> >
>>> >
>>> >
>>> >
>>> >>
>>> >> the make output :
>>> >>
>>> >>> [ 83%] Building CXX object
>>> src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
>>> >>> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
>>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> >>> `boost::shared_ptr<RTT::Scripting>
>>> >>> boost::dynamic_pointer_cast<RTT::Scripting,
>>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> const&)':
>>> >>>
>>> >>>
>>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9ScriptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Scripting>
>>> >>> boost::dynamic_pointer_cast<RTT::Scripting,
>>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
>>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> >>> `boost::shared_ptr<RTT::Marshalling>
>>> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
>>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> const&)':
>>> >>>
>>> >>>
>>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11MarshallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boost::shared_ptr<RTT::Marshalling>
>>> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
>>> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
>>> >>> const&)]+0x26): undefined reference to `typeinfo for
>>> RTT::Marshalling'
>>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> >>> `boost::shared_ptr<RTT::Scripting> boost::make_shared<RTT::Scripting,
>>> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>> >>>
>>> >>>
>>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Scripting>
>>> >>> boost::make_shared<RTT::Scripting,
>>> RTT::TaskContext*>(RTT::TaskContext*
>>> >>> const&)]+0x164): undefined reference to
>>> >>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
>>> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
>>> >>> `boost::shared_ptr<RTT::Marshalling>
>>> boost::make_shared<RTT::Marshalling,
>>> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
>>> >>>
>>> >>>
>>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingEPNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::Marshalling>
>>> >>> boost::make_shared<RTT::Marshalling,
>>> RTT::TaskContext*>(RTT::TaskContext*
>>> >>> const&)]+0x164): undefined reference to
>>> >>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
>>> >>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global
>>> constructors
>>> >>> keyed to ARDTest.cpp':
>>> >>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
>>> >>> boost::unit_test::unit_test_log_t'
>>> >>> collect2: ld returned 1 exit status
>>> >>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
>>> >>> make[3]: quittant le répertoire «
>>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>> >>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
>>> >>> make[2]: quittant le répertoire «
>>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>> >>> make[1]: *** [all] Erreur 2
>>> >>> make[1]: quittant le répertoire «
>>> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
>>> >>
>>> >>
>>> >>
>>> >> I also have similar kind of problem when trying to set up the
>>> >> OCL::logging::Category* logger , is this page up to date :
>>> >>
>>> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-time-...
>>> >> ? It seems some option are automaticaly set up now by default in
>>> Orocos. Is
>>> >> it an official released feature ?
>>> >>
>>> >>
>>> >
>>> >
>>>
>>
>>
>

Ruben Smits's picture

Compilation problem when using orocos in rosbuild system

On Sunday 27 February 2011 20:57:46 Willy Lambert wrote:
> 2011/2/27 Willy Lambert
> <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
>
>
> 2011/2/27 Willy Lambert
> <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
>
>
> 2011/2/27 Steven Bellens
> <steven [dot] bellens [..] ...steven [dot] bellens [..] ...>>
>
> 2011/2/27 Willy Lambert
<lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>:
> > 2011/2/27 Willy Lambert
> > <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
> >
> >> Hi,
> >>
> >> I have created my package in the ROS system using the
> >> orocos_toolchain_ros. I am trying to code my TaskContext of which all
> >> my
> >> component will inheritate.
> >>
> >> One of its aim is to load the scripting and marshalling plugins. My
> >> code
> >> compile but failed to link. I may have forgotten to link to something
> >> but I don't see what. Could someone help me please ?
> >>
> >> the potential extract of faulty code :
> >>> bool ARDTaskContext::loadPlugins()
> >>>
> >>> {
> >>>
> >>> bool res = true;
> >>>
> >>> //ajout du plugin de scripting
> >>> scripting =
> >>> this->getProvider<RTT::Scripting>("scripting");
> >>> if( scripting == NULL )
> >>> {
> >>>
> >>> LOG(Error) << "Interface de scripting non
> >>> chargée" <<
> >>>
> >>> endlog();
> >>>
> >>> res &= false;
> >>>
> >>> }
> >>>
> >>> //ajout du plugin de marshalling
> >>> marshalling =
> >>> this->getProvider<RTT::Marshalling>("marshalling");
> >>> if( marshalling == NULL )
> >>> {
> >>>
> >>> LOG(Error) << "Interface de marschalling non
> >>> chargée" <<
> >>>
> >>> endlog();
> >>>
> >>> res &= false;
> >>>
> >>> }
> >>>
> >>> return res;
> >>>
> >>> }
> >>
> >> extract of cmake list :
> >> file(
> >>
> >> GLOB_RECURSE
> >> source_files
> >> *.cpp
> >>
> >> )
> >>
> >> orocos_library(arp-core ${source_files} )
> >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> >> link_libraries(arp_core librtt-scripting-gnulinux.so )
> >
> > there where a typo here ( "_" instead of "-"), but it is not the
> > problem : orocos_library(arp-core ${source_files} )
> > link_libraries(arp-core orocos-log4cpp-gnulinux )
> > link_libraries(arp-core rtt-marshalling-gnulinux )
> > link_libraries(arp-core rtt-scripting-gnulinux )
>
> You have to link with the marshalling library explicitly, according to
> this post of Peter :
>
> <quote>
> Yes, you need to link explicitly. We added a link flag such that each
> component must be linked correctly at build-time.
>
> You can do:
>
>

> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> and then add after your orocos_component( MasterControl ) :
> target_link_libraries( MasterControl ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} )
> 

> See this file for all docs :
> http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config...
> ke
>
> We're working on it to make this linking automatic, but the above will
> always work, also in the future.
>
> <quote>
>
>
>
> Sorry for asking a pre-posted question, I did not research, my bad. It did
> not solve the problem, the find package doesn't seems to work
>
> Here is my new cmake file extract
>
> rosbuild_find_ros_package( rtt )
> set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
> find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
> include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
> find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
> message("#####!!######### marshalling : ${OROCOS-RTT_RTT-MARSHALLING_FOUND}
> | ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} ############")
>
> here is the output
>
> Orocos-RTT found in
> /home/ard/ros/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/orocos-
> rtt-gnulinux-libraries.cmake -- Found orocos-rtt 2.2.1 for the gnulinux
> target. Available transports: mqueue #####!!######### marshalling : |
> ############
>
>
>
> I tried this in a proper orocreated-pkg package to be sure I is not my
> Cmakefile that are badly writtent.
>
> I added the suggested lines
> I commented the typegen line (its a known issue)
> I uncomment the orocos_library(support) and put my TaskContext heritance
> into it.
>
> I have the same behavior, so it is easily testable
>
> Adding to did the trick. I is not perfect but working :
> target_link_libraries(arp-core
> ${rtt_PACKAGE_PATH}/install/lib/orocos/plugins/librtt-marshalling-${OROCOS_
> TARGET}.so) target_link_libraries(arp-core
> ${rtt_PACKAGE_PATH}/rtt/install/lib/orocos/plugins/librtt-scripting-${OROCO
> S_TARGET}.so)
>
> I was lurred by a commented line in the upper CMakeLists, it didn't solved
> anything :(
>
> I tried to play with other Cmake commands as far as I may understand the
> cmake documentation, but without success
>

In the rtt_ros_param package I use the following to get it working:

find_package(RTTPlugin REQUIRED rtt-marshalling)
target_link_libraries(rtt_ros_param-service ${RTT_PLUGIN_rtt-
marshalling_LIBRARIES})

That should do it.

-- Ruben.
>
>
>
>
>
>
> regards,
>
> Steven
>
> >> the make output :
> >>> [ 83%] Building CXX object
> >>> src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
> >>>
> >>> Linking CXX shared library ../../../lib/libarp-core-gnulinux.so
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>>
> >>> `boost::shared_ptr<RTT::Scripting>
> >>> boost::dynamic_pointer_cast<RTT::Scripting,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)':
> >>>
> >>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9Scri
> >>> ptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[boos
> >>> t::shared_ptr<RTT::Scripting>
> >>> boost::dynamic_pointer_cast<RTT::Scripting,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)]+0x26): undefined reference to `typeinfo for RTT::Scripting'
> >>>
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>>
> >>> `boost::shared_ptr<RTT::Marshalling>
> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)':
> >>>
> >>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT11Mar
> >>> shallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[b
> >>> oost::shared_ptr<RTT::Marshalling>
> >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> >>> const&)]+0x26): undefined reference to `typeinfo for
> >>> RTT::Marshalling'
> >>>
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>>
> >>> `boost::shared_ptr<RTT::Scripting>
> >>> boost::make_shared<RTT::Scripting,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> >>>
> >>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9ScriptingEPNS
> >>> 1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT::S
> >>> cripting> boost::make_shared<RTT::Scripting,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)]+0x164): undefined
> >>> reference to
> >>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
> >>>
> >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> >>>
> >>> `boost::shared_ptr<RTT::Marshalling>
> >>> boost::make_shared<RTT::Marshalling,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> >>>
> >>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11MarshallingE
> >>> PNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RTT
> >>> ::Marshalling> boost::make_shared<RTT::Marshalling,
> >>> RTT::TaskContext*>(RTT::TaskContext* const&)]+0x164): undefined
> >>> reference to
> >>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
> >>>
> >>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global
> >>> constructors
> >>>
> >>> keyed to ARDTest.cpp':
> >>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
> >>>
> >>> boost::unit_test::unit_test_log_t'
> >>>
> >>> collect2: ld returned 1 exit status
> >>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
> >>> make[3]: quittant le répertoire «
> >>>
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>>
> >>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
> >>> make[2]: quittant le répertoire «
> >>>
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>>
> >>> make[1]: *** [all] Erreur 2
> >>> make[1]: quittant le répertoire «
> >>>
> >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> >>
> >> I also have similar kind of problem when trying to set up the
> >> OCL::logging::Category* logger , is this page up to date :
> >> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real-tim
> >> e-logging ? It seems some option are automaticaly set up now by
> >> default in Orocos. Is it an official released feature ?

Ruben Smits's picture

Compilation problem when using orocos in rosbuild system

On Monday 28 February 2011 09:42:02 Ruben Smits wrote:
> On Sunday 27 February 2011 20:57:46 Willy Lambert wrote:
> > 2011/2/27 Willy Lambert
> > <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
> >
> >
> > 2011/2/27 Willy Lambert
> > <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
> >
> >
> > 2011/2/27 Steven Bellens
> > <steven [dot] bellens [..] ...steven [dot] bellens [..] ...>
> > >
> >
> > 2011/2/27 Willy Lambert
>
> <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>:
> > > 2011/2/27 Willy Lambert
> > > <lambert [dot] willy [..] ...lambert [dot] willy [..] ...>>
> > >
> > >> Hi,
> > >>
> > >> I have created my package in the ROS system using the
> > >> orocos_toolchain_ros. I am trying to code my TaskContext of which
> > >> all
> > >> my
> > >> component will inheritate.
> > >>
> > >> One of its aim is to load the scripting and marshalling plugins.
> > >> My
> > >> code
> > >> compile but failed to link. I may have forgotten to link to
> > >> something
> > >> but I don't see what. Could someone help me please ?
> > >>
> > >> the potential extract of faulty code :
> > >>> bool ARDTaskContext::loadPlugins()
> > >>>
> > >>> {
> > >>>
> > >>> bool res = true;
> > >>>
> > >>> //ajout du plugin de scripting
> > >>> scripting =
> > >>> this->getProvider<RTT::Scripting>("scripting");
> > >>> if( scripting == NULL )
> > >>> {
> > >>>
> > >>> LOG(Error) << "Interface de scripting
> > >>> non
> > >>> chargée" <<
> > >>>
> > >>> endlog();
> > >>>
> > >>> res &= false;
> > >>>
> > >>> }
> > >>>
> > >>> //ajout du plugin de marshalling
> > >>> marshalling =
> > >>> this->getProvider<RTT::Marshalling>("marshalling
> > >>> ");
> > >>> if( marshalling == NULL )
> > >>> {
> > >>>
> > >>> LOG(Error) << "Interface de marschalling
> > >>> non
> > >>> chargée" <<
> > >>>
> > >>> endlog();
> > >>>
> > >>> res &= false;
> > >>>
> > >>> }
> > >>>
> > >>> return res;
> > >>>
> > >>> }
> > >>
> > >> extract of cmake list :
> > >> file(
> > >>
> > >> GLOB_RECURSE
> > >> source_files
> > >> *.cpp
> > >>
> > >> )
> > >>
> > >> orocos_library(arp-core ${source_files} )
> > >> link_libraries(arp_core liborocos-log4cpp-gnulinux.so )
> > >> link_libraries(arp_core librtt-marshalling-gnulinux.so )
> > >> link_libraries(arp_core librtt-scripting-gnulinux.so )
> > >
> > > there where a typo here ( "_" instead of "-"), but it is not the
> > > problem : orocos_library(arp-core ${source_files} )
> > > link_libraries(arp-core orocos-log4cpp-gnulinux )
> > > link_libraries(arp-core rtt-marshalling-gnulinux )
> > > link_libraries(arp-core rtt-scripting-gnulinux )
> >
> > You have to link with the marshalling library explicitly, according to
> > this post of Peter :
> >
> > <quote>
> > Yes, you need to link explicitly. We added a link flag such that each
> > component must be linked correctly at build-time.
> >
> > You can do:
> >
> >

> > find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> > and then add after your orocos_component( MasterControl ) :
> > target_link_libraries( MasterControl
> > ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} ) 

> > See this file for all docs :
> > http://gitorious.org/orocos-toolchain/rtt/blobs/master/orocos-rtt-config
> > .cma ke
> >
> > We're working on it to make this linking automatic, but the above will
> > always work, also in the future.
> >
> > <quote>
> >
> >
> >
> > Sorry for asking a pre-posted question, I did not research, my bad. It
> > did not solve the problem, the find package doesn't seems to work
> >
> > Here is my new cmake file extract
> >
> > rosbuild_find_ros_package( rtt )
> > set( RTT_HINTS HINTS ${rtt_PACKAGE_PATH}/install )
> > find_package(OROCOS-RTT REQUIRED ${RTT_HINTS})
> > include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake)
> > find_package(OROCOS-RTT REQUIRED rtt-marshalling ${RTT_HINTS})
> > find_package(OROCOS-RTT REQUIRED rtt-scripting ${RTT_HINTS})
> > message("#####!!######### marshalling :
> > ${OROCOS-RTT_RTT-MARSHALLING_FOUND}
> >
> > | ${OROCOS-RTT_RTT-MARSHALLING_LIBRARY} ############")
> >
> > here is the output
> >
> > Orocos-RTT found in
> > /home/ard/ros/orocos_toolchain_ros/rtt/install/lib/cmake/orocos-rtt/oroc
> > os- rtt-gnulinux-libraries.cmake -- Found orocos-rtt 2.2.1 for the
> > gnulinux target. Available transports: mqueue #####!!#########
> > marshalling : | ############
> >
> >
> >
> > I tried this in a proper orocreated-pkg package to be sure I is not my
> > Cmakefile that are badly writtent.
> >
> > I added the suggested lines
> > I commented the typegen line (its a known issue)
> > I uncomment the orocos_library(support) and put my TaskContext heritance
> > into it.
> >
> > I have the same behavior, so it is easily testable
> >
> > Adding to did the trick. I is not perfect but working :
> > target_link_libraries(arp-core
> > ${rtt_PACKAGE_PATH}/install/lib/orocos/plugins/librtt-marshalling-${OROC
> > OS_ TARGET}.so) target_link_libraries(arp-core
> > ${rtt_PACKAGE_PATH}/rtt/install/lib/orocos/plugins/librtt-scripting-${OR
> > OCO S_TARGET}.so)
> >
> > I was lurred by a commented line in the upper CMakeLists, it didn't
> > solved anything :(
> >
> > I tried to play with other Cmake commands as far as I may understand the
> > cmake documentation, but without success
>
> In the rtt_ros_param package I use the following to get it working:

You will also need to add the following for the RTTPlugin to work:

rosbuild_find_ros_package(ocl )
list(APPEND CMAKE_MODULE_PATH ${ocl_PACKAGE_PATH}/config)

> find_package(RTTPlugin REQUIRED rtt-marshalling)
> target_link_libraries(rtt_ros_param-service ${RTT_PLUGIN_rtt-
> marshalling_LIBRARIES})
>
>
> That should do it.
>

-- Ruben.
>
> > regards,
> >
> > Steven
> >
> > >> the make output :
> > >>> [ 83%] Building CXX object
> > >>> src/core/CMakeFiles/arp-core.dir/ARDTest.cpp.o
> > >>>
> > >>> Linking CXX shared library
> > >>> ../../../lib/libarp-core-gnulinux.so
> > >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> > >>>
> > >>> `boost::shared_ptr<RTT::Scripting>
> > >>> boost::dynamic_pointer_cast<RTT::Scripting,
> > >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> > >>> const&)':
> > >>>
> > >>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT9
> > >>> Scri
> > >>> ptingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_EE[
> > >>> boos
> > >>> t::shared_ptr<RTT::Scripting>
> > >>> boost::dynamic_pointer_cast<RTT::Scripting,
> > >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> > >>> const&)]+0x26): undefined reference to `typeinfo for
> > >>> RTT::Scripting'
> > >>>
> > >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> > >>>
> > >>> `boost::shared_ptr<RTT::Marshalling>
> > >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> > >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> > >>> const&)':
> > >>>
> > >>> ARDTaskContext.cpp:(.text._ZN5boost20dynamic_pointer_castIN3RTT1
> > >>> 1Mar
> > >>> shallingENS1_16ServiceRequesterEEENS_10shared_ptrIT_EERKNS4_IT0_
> > >>> EE[b
> > >>> oost::shared_ptr<RTT::Marshalling>
> > >>> boost::dynamic_pointer_cast<RTT::Marshalling,
> > >>> RTT::ServiceRequester>(boost::shared_ptr<RTT::ServiceRequester>
> > >>> const&)]+0x26): undefined reference to `typeinfo for
> > >>> RTT::Marshalling'
> > >>>
> > >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> > >>>
> > >>> `boost::shared_ptr<RTT::Scripting>
> > >>> boost::make_shared<RTT::Scripting,
> > >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> > >>>
> > >>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT9Scripting
> > >>> EPNS
> > >>> 1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr<RT
> > >>> T::S
> > >>> cripting> boost::make_shared<RTT::Scripting,
> > >>> RTT::TaskContext*>(RTT::TaskContext* const&)]+0x164): undefined
> > >>> reference to
> > >>> `RTT::Scripting::Scripting(RTT::TaskContext*)'
> > >>>
> > >>> CMakeFiles/arp-core.dir/ARDTaskContext.cpp.o: In function
> > >>>
> > >>> `boost::shared_ptr<RTT::Marshalling>
> > >>> boost::make_shared<RTT::Marshalling,
> > >>> RTT::TaskContext*>(RTT::TaskContext* const&)':
> > >>>
> > >>> ARDTaskContext.cpp:(.text._ZN5boost11make_sharedIN3RTT11Marshall
> > >>> ingE
> > >>> PNS1_11TaskContextEEENS_10shared_ptrIT_EERKT0_[boost::shared_ptr
> > >>> <RTT
> > >>>
> > >>> ::Marshalling> boost::make_shared<RTT::Marshalling,
> > >>>
> > >>> RTT::TaskContext*>(RTT::TaskContext* const&)]+0x164): undefined
> > >>> reference to
> > >>> `RTT::Marshalling::Marshalling(RTT::TaskContext*)'
> > >>>
> > >>> CMakeFiles/arp-core.dir/ARDTest.cpp.o: In function `global
> > >>> constructors
> > >>>
> > >>> keyed to ARDTest.cpp':
> > >>> ARDTest.cpp:(.text+0x56): undefined reference to `vtable for
> > >>>
> > >>> boost::unit_test::unit_test_log_t'
> > >>>
> > >>> collect2: ld returned 1 exit status
> > >>> make[3]: *** [../lib/libarp-core-gnulinux.so] Erreur 1
> > >>> make[3]: quittant le répertoire «
> > >>>
> > >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> > >>>
> > >>> make[2]: *** [src/core/CMakeFiles/arp-core.dir/all] Erreur 2
> > >>> make[2]: quittant le répertoire «
> > >>>
> > >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> > >>>
> > >>> make[1]: *** [all] Erreur 2
> > >>> make[1]: quittant le répertoire «
> > >>>
> > >>> /media/DD_data/home/ard/ros/ard/arp_core/build »
> > >>
> > >> I also have similar kind of problem when trying to set up the
> > >> OCL::logging::Category* logger , is this page up to date :
> > >> http://www.orocos.org/wiki/rtt/rtt-20/real-time-logging/using-real
> > >> -tim
> > >> e-logging ? It seems some option are automaticaly set up now by
> > >> default in Orocos. Is it an official released feature ?
>
> --
> Orocos-Users mailing list
> Orocos-Users [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-users