orocos-toolchain / orogen

Code generator for components and type handling in Rock - the Robot Construction Kit - and the Orocos Toolchain
http://rock-robotics.org
Other
4 stars 35 forks source link

orogen generate invalid typlib files (includes are resolved wrongly) #50

Open goldhoorn opened 9 years ago

goldhoorn commented 9 years ago

On rc-build the base/orogen/types cannot be compiled if ocl build is active.

Orogen tries to export all types because it get called with:

orogen --corba --import=std --parallel-build=4 --transports=corba,mqueue,typelib --type-export-policy=all base.orogen

unfourtnalty this causes wrong include for some new files, instead of JointLimitRange the Joint Header get catched which is not related to the JointLimitRange

It seems a problem with these function https://github.com/orocos-toolchain/orogen/blob/master/lib/orogen/gen/typekit.rb#L1321

Error:

/home/goldhoorn/bootstraps/release-nativ/base/orogen/types/.orogen/typekit/transports/corba/__base__NamedVector____base__JointLimitRange__.cpp:59:76: error: 'JointLimitRange' is not a member of 'base'

Header snip:

  1 /* Generated from orogen/lib/orogen/templates/typekit/typelib/Type.cpp */
  2 
  3 #include <base/samples/Joints.hpp>
  4 #include <rtt/typelib/TypelibMarshaller.hpp>
  5 #include "transports/typelib/Registration.hpp"
  6 
  7 orogen_transports::TypelibMarshallerBase* orogen_typekits::base_NamedVector__base_JointLimitRange__TypelibMarshaller(Typelib::Registry const& registry)
  8 {
  9     return new orogen_transports::TypelibMarshaller< ::base::NamedVector< ::base::JointLimitRange > >("/base/NamedVector</base/JointLimitRange>", registry);
 10 }
marvin2k commented 9 years ago

somewhere back in the clang-time i stumpled upon a similar problem... cannot find it right away, but this looks familiar... rant it takes ages to get back into a clean position to debug this... heaps of layers above other heaps of layers...

goldhoorn commented 9 years ago

I created a workaround for the release:

https://github.com/orocos-toolchain/orogen/commit/99c370c02e73c58b115b3adccf3a9ea49fba8193

goldhoorn commented 9 years ago

Sorry this was too fast, i reverted it it causes problems on other datatypes...

goldhoorn commented 9 years ago

Created workaround on the types: https://github.com/rock-core/base-orogen-types/pull/13

doudou commented 9 years ago

FYI, works on my master