Error importing KDL typekit

Hi

I am trying to install the Orocos toolchain and KDL without ROS. I have installed the toolchain without problems using the bootstrap script. I have installed KDL checking out http://www.orocos.org/forum/orocos/orocos-users/rttlua-error-import-kdltypekit and building.

The problems start when I try to build the typekit. I cloned http://git.mech.kuleuven.be/robotics/rtt_geometry.git, as suggested here http://www.orocos.org/forum/orocos/orocos-users/deployment-components-inside-component-composition. I compiled onlt the typekit and installed. This went fine, but when I started the deployer I got the error:

0.067 [ ERROR  ][DeploymentComponent::configure] Could not load library '/usr/local/lib/orocos/xenomai/kdl_typekit/types/libkdl_typekit-xenomai.so':
0.067 [ ERROR  ][DeploymentComponent::configure] /usr/local/lib/orocos/xenomai/kdl_typekit/types/libkdl_typekit-xenomai.so: undefined symbol: _ZN3KDL5ChainD1Ev
   Switched to : Deployer

Apparently the library is unable to link to liborocos-kdl.so. It is because it's not specified in the typekit library:

objdump -p libkdl_typekit-xenomai.so 
 
libkdl_typekit-xenomai.so:     file format elf32-i386
 
Program Header:
    LOAD off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12
         filesz 0x012adcfb memsz 0x012adcfb flags r-x
    LOAD off    0x012ae000 vaddr 0x012ae000 paddr 0x012ae000 align 2**12
         filesz 0x0006eda0 memsz 0x0006fe78 flags rw-
 DYNAMIC off    0x012f0694 vaddr 0x012f0694 paddr 0x012f0694 align 2**2
         filesz 0x00000138 memsz 0x00000138 flags rw-
    NOTE off    0x000000f4 vaddr 0x000000f4 paddr 0x000000f4 align 2**2
         filesz 0x00000024 memsz 0x00000024 flags r--
EH_FRAME off    0x0105a94c vaddr 0x0105a94c paddr 0x0105a94c align 2**2
         filesz 0x0006cda4 memsz 0x0006cda4 flags r--
   STACK off    0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2
         filesz 0x00000000 memsz 0x00000000 flags rw-
 
Dynamic Section:
  NEEDED               liborocos-rtt-xenomai.so.2.5
  NEEDED               libboost_filesystem.so.1.42.0
  NEEDED               libboost_system.so.1.42.0
  NEEDED               libboost_serialization.so.1.42.0
  NEEDED               libxenomai.so.0
  NEEDED               libnative.so.3
  NEEDED               libpthread.so.0
  NEEDED               libdl.so.2
  NEEDED               libpthread_rt.so.1
  NEEDED               libstdc++.so.6
  NEEDED               libm.so.6
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  SONAME               libkdl_typekit-xenomai.so
  RPATH                /usr/xenomai/lib:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  INIT                 0x00a79344
  FINI                 0x00fd84c8
  HASH                 0x00000118
  GNU_HASH             0x00063d08
  STRTAB               0x001e629c
  SYMTAB               0x000d732c
  STRSZ                0x007ac241
  SYMENT               0x00000010
  PLTGOT               0x012f42a0
  PLTRELSZ             0x00050c48
  PLTREL               0x00000011
  JMPREL               0x00a286fc
  REL                  0x009b438c
  RELSZ                0x00074370
  RELENT               0x00000008
  VERNEED              0x009b42cc
  VERNEEDNUM           0x00000005
  VERSYM               0x009924de
  RELCOUNT             0x0000003e
 
Version References:
  required from libpthread.so.0:
    0x0d696910 0x00 07 GLIBC_2.0
  required from libgcc_s.so.1:
    0x0b792650 0x00 06 GCC_3.0
  required from libc.so.6:
    0x09691f73 0x00 08 GLIBC_2.1.3
    0x0d696910 0x00 05 GLIBC_2.0
  required from libm.so.6:
    0x0d696910 0x00 04 GLIBC_2.0
  required from libstdc++.so.6:
    0x056bafd3 0x00 03 CXXABI_1.3
    0x08922974 0x00 02 GLIBCXX_3.4

But the missing symbol is in fact in the orocos-kdl library:

objdump -x liborocos-kdl.so | grep _ZN3KDL5ChainD1Ev
0001fc70 g     F .text    00000077              _ZN3KDL5ChainD1Ev

I don't know if this is a bug, but I fixed it by adding the line

target_link_libraries(${PROJECT_NAME} orocos-kdl)

in rtt_geometry/kdl_typekit/CMakeList.txt

Now I get a new error message:

0.104 [ ERROR  ][DeploymentComponent::configure] Unloading /usr/local/lib/orocos/xenomai/kdl_typekit/types/libkdl_typekit-xenomai.so: not a valid component library:
0.104 [ ERROR  ][DeploymentComponent::configure]    /usr/local/lib/orocos/xenomai/kdl_typekit/types/libkdl_typekit-xenomai.so: undefined symbol: createComponent
0.104 [ ERROR  ][DeploymentComponent::configure]    /usr/local/lib/orocos/xenomai/kdl_typekit/types/libkdl_typekit-xenomai.so: undefined symbol: getComponentType

This is very strange. Why doesn't the typekit have these symbols? Anyone that can help me out?

SOLUTION

Hi

Found the error. Added the wrong path to RTT_COMPONENT_PATH. I added '/usr/local/lib/orocos/xenomai/kdl_typekit/types', but when I add '/usr/local/lib/orocos' instead the error disappears and KDL imports without an error.