[Bug 570] New: problems when trying to load components using the deployer

For more infomation about this bug, visit
Summary: problems when trying to load components using the
deployer
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Deployment
AssignedTo: orocos-dev [..] ...
ReportedBy: ruben [dot] smits [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

I have found some strange behaviour when i try to load a component from a
librart that is linked with another library that also contains deployable
components.

Example:

the orocos-reporting contains tree loadable components: FileReporting,
ConsoleReporting, TcpReporting.

I have created a seperate component, CommandListener, that uses some of the
functionality that is also used in the TcpReporting, therefor i have to link
the CommandListener library with the Reporting library.

This is what happens:

[...]
0.083 [ Debug ][DeploymentComponent::import] Importing
/usr/local/orocos/lib/libtrasys
0.089 [ Debug ][DeploymentComponent::loadLibrary] Storing trasys
0.089 [ Info ][DeploymentComponent::loadLibrary] Loaded multi component
library '/usr/local/orocos/lib/libtrasys-lxrt.so'
0.089 [ Debug ][DeploymentComponent::loadLibrary] Components:
OCL::ConsoleReporting OCL::FileReporting
[...]
0.181 [ ERROR ][DeploymentComponent::loadComponent] Unable to locate Orocos
plugin 'OCL::CommandListener': unknown component type.
0.181 [ Warning][DeploymentComponent::loadComponents] Could not configure
'Listen': No such peer.

Part of the xml-code:

type="string">/usr/local/orocos/lib/libtrasys


0.01
0
type="string">ORO_SCHED_OTHER

1
1

Part of the libtrasys code:

ORO_CREATE_COMPONENT( OCL::CommandListener );

ldd shows:

ldd libtrasys-lxrt.so
linux-gate.so.1 => (0xffffe000)
liborocos-rtt-lxrt.so.1.4 =>
/usr/local/orocos/lib/liborocos-rtt-lxrt.so.1.4 (0xb7a82000)
liblxrt.so.1 => /usr/lib/liblxrt.so.1 (0xb7a51000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7a38000)
liborocos-reporting-lxrt.so.1.4 =>
/usr/local/orocos/lib/liborocos-reporting-lxrt.so.1.4 (0xb79ba000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb78c7000)
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb78a2000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7897000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb774d000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7748000)
/lib/ld-linux.so.2 (0x80000000)

Do i have to make sure that i never link with deployable-component-containing
libraries or is this a bug?

Ruben

[Bug 570] problems when trying to load components using the depl

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.6.0

--- Comment #5 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-06-13 11:43:39 ---
Patch applied on trunk/ocl.

+ sspr@lt00129:~/src/Orocos/trunk/ocl/deployment
$ svn ci -m"Fixes bug #570: problems when trying to load components using the
deployer
> Allows to load linked component libraries.
> "
Sending deployment/DeploymentComponent.cpp
Transmitting file data .
Committed revision 29396.

Ruben Smits's picture

[Bug 570] problems when trying to load components using the depl

For more infomation about this bug, visit

--- Comment #4 from Ruben Smits <ruben [dot] smits [..] ...> 2008-06-13 11:04:03 ---
It does resolve this issue ;)

.109 [ Debug ][DeploymentComponent::import] Importing
/usr/local/orocos/lib/libtrasys
0.115 [ Debug ][DeploymentComponent::loadLibrary] Storing trasys
0.116 [ Info ][DeploymentComponent::loadLibrary] Loaded multi component
library '/usr/local/orocos/lib/libtrasys-lxrt.so'
0.116 [ Debug ][DeploymentComponent::loadLibrary] Components:
OCL::ConsoleReporting OCL::FileReporting OCL::TcpReporting
0.116 [ Info ][DeploymentComponent::loadLibrary] Loaded component type
'OCL::CommandListener'

Perfect :)

Ruben

[Bug 570] problems when trying to load components using the depl

For more infomation about this bug, visit

--- Comment #3 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-06-13 10:23:36 ---
Created an attachment (id=326)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=326)
Could resolve this issue...

Can you revert to your old method of ORO_CREATE_COMPONENT(...) and apply this
patch in trunk/ocl ?

Peter

Ruben Smits's picture

[Bug 570] problems when trying to load components using the depl

For more infomation about this bug, visit

--- Comment #2 from Ruben Smits <ruben [dot] smits [..] ...> 2008-06-13 09:35:13 ---
(In reply to comment #1)
> (In reply to comment #0)
> > I have found some strange behaviour when i try to load a component from a
> > librart that is linked with another library that also contains deployable
> > components.
> >
> > Example:
> >
> > the orocos-reporting contains tree loadable components: FileReporting,
> > ConsoleReporting, TcpReporting.
> >
> > I have created a seperate component, CommandListener, that uses some of the
> > functionality that is also used in the TcpReporting, therefor i have to link
> > the CommandListener library with the Reporting library.
> >
> > This is what happens:
> >
> > [...]
> > 0.083 [ Debug ][DeploymentComponent::import] Importing
> > /usr/local/orocos/lib/libtrasys
> > 0.089 [ Debug ][DeploymentComponent::loadLibrary] Storing trasys
> > 0.089 [ Info ][DeploymentComponent::loadLibrary] Loaded multi component
> > library '/usr/local/orocos/lib/libtrasys-lxrt.so'
> > 0.089 [ Debug ][DeploymentComponent::loadLibrary] Components:
> > OCL::ConsoleReporting OCL::FileReporting
> > [...]
> > 0.181 [ ERROR ][DeploymentComponent::loadComponent] Unable to locate Orocos
> > plugin 'OCL::CommandListener': unknown component type.
> > 0.181 [ Warning][DeploymentComponent::loadComponents] Could not configure
> > 'Listen': No such peer.
> >
> > Part of the xml-code:
> >
> > > > type="string">/usr/local/orocos/lib/libtrasys
> >
> >
> > 0.01
> > 0
> > > > type="string">ORO_SCHED_OTHER
> >

> > 1
> > 1
> >

> >
> > Part of the libtrasys code:
> >
> > ORO_CREATE_COMPONENT( OCL::CommandListener );
>
> I believe you need to use ORO_LIST_COMPONENT_TYPE( ... ) when you link with
> another library already containing components. This will/should add your
> component to the 'factory' of the other library. You need to stick with one
> system.

When i use ORO_LIST_COMPONENT_TYPE() i get the following linking error:

Linking CXX shared library libtrasys-lxrt.so
cd /home/rsmits/trasys/build-lxrt/src && /usr/bin/cmake -P
CMakeFiles/trasys-lxrt.dir/cmake_clean_target.cmake
cd /home/rsmits/trasys/build-lxrt/src && /usr/bin/cmake -E cmake_link_script
CMakeFiles/trasys-lxrt.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -O2 -DNDEBUG -shared -Wl,-soname,libtrasys-lxrt.so.0.1
-o libtrasys-lxrt.so.0.1.0 "CMakeFiles/trasys-lxrt.dir/CommandListener.o"
-L/usr/local/orocos/lib -L/usr/realtime/lib
-L/usr/local/orocos/lib/rtt/lxrt/plugins -lorocos-rtt-lxrt -llxrt -lpthread
-lorocos-reporting-lxrt
-Wl,-rpath,/usr/local/orocos/lib:/usr/realtime/lib:/usr/local/orocos/lib/rtt/lxrt/plugins
CMakeFiles/trasys-lxrt.dir/CommandListener.o: In function
`__static_initialization_and_destruction_0(int, int)':
CommandListener.cpp:(.text+0x307): undefined reference to
`OCL::ComponentFactories::Factories'
CommandListener.cpp:(.text+0x315): undefined reference to
`OCL::ComponentFactories::Factories'
CommandListener.cpp:(.text+0x4a9): undefined reference to
`OCL::ComponentFactories::Factories'
/usr/bin/ld: libtrasys-lxrt.so.0.1.0: hidden symbol
`OCL::ComponentFactories::Factories' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

So that doesn't work either.

Ruben

[Bug 570] problems when trying to load components using the depl

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
CC| |peter [dot] soetens [..] ...

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-06-12 17:15:46 ---
(In reply to comment #0)
> I have found some strange behaviour when i try to load a component from a
> librart that is linked with another library that also contains deployable
> components.
>
> Example:
>
> the orocos-reporting contains tree loadable components: FileReporting,
> ConsoleReporting, TcpReporting.
>
> I have created a seperate component, CommandListener, that uses some of the
> functionality that is also used in the TcpReporting, therefor i have to link
> the CommandListener library with the Reporting library.
>
> This is what happens:
>
> [...]
> 0.083 [ Debug ][DeploymentComponent::import] Importing
> /usr/local/orocos/lib/libtrasys
> 0.089 [ Debug ][DeploymentComponent::loadLibrary] Storing trasys
> 0.089 [ Info ][DeploymentComponent::loadLibrary] Loaded multi component
> library '/usr/local/orocos/lib/libtrasys-lxrt.so'
> 0.089 [ Debug ][DeploymentComponent::loadLibrary] Components:
> OCL::ConsoleReporting OCL::FileReporting
> [...]
> 0.181 [ ERROR ][DeploymentComponent::loadComponent] Unable to locate Orocos
> plugin 'OCL::CommandListener': unknown component type.
> 0.181 [ Warning][DeploymentComponent::loadComponents] Could not configure
> 'Listen': No such peer.
>
> Part of the xml-code:
>
> > type="string">/usr/local/orocos/lib/libtrasys
>
>
> 0.01
> 0
> > type="string">ORO_SCHED_OTHER
>

> 1
> 1
>

>
> Part of the libtrasys code:
>
> ORO_CREATE_COMPONENT( OCL::CommandListener );

I believe you need to use ORO_LIST_COMPONENT_TYPE( ... ) when you link with
another library already containing components. This will/should add your
component to the 'factory' of the other library. You need to stick with one
system.

Peter