typegen, OSX and rtt::rt_string

Ruben Smits <[email protected]> Thu, 3 Apr 2014 16:21:39 +0200
Newsgroups gmane.science.robotics.orocos.devel
Message-ID <CAN8PhbnX=Yt8nOLuNgnDFe9JCdVCQU=0AkfaLPSzPVxuGq7ajQ@mail.gmail.com>
Hello,

I'm trying to create a typekit for a struct that contains and
RTT::rt_string field. Although this works perfectly on my Ubuntu setup
I get the following error when I try this on OSX 10.8:

In file included from
/var/folders/xr/r49mczcs7l1329vqt_h1prrh0000gn/T/orogen_pending_loads20140403-45326-h942zr:1:
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp: In
instantiation of 'boost::ratio_detail::br_mul<1l, 1l>':
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp:284:
instantiated from 'boost::ratio_detail::ratio_divide<boost::ratio<1l,
1000000000l>, boost::ratio<1l, 1l> >'
/opt/local/include/boost/ratio/ratio.hpp:156:   instantiated from
'boost::ratio_divide<boost::ratio<1l, 1000000000l>, boost::ratio<1l,
1l> >'
/opt/local/include/boost/chrono/duration.hpp:305:   instantiated from
'boost::chrono::detail::duration_cast<boost::chrono::duration<long
long int, boost::ratio<1l, 1000000000l> >,
boost::chrono::duration<long long int, boost::ratio<1l, 1l> > >'
/opt/local/include/boost/chrono/duration.hpp:783:   instantiated from
'typename boost::enable_if<boost::chrono::detail::is_duration<Rep>,
ToDuration>::type boost::chrono::duration_cast(const
boost::chrono::duration<Rep2, Period>&) [with ToDuration =
boost::chrono::duration<long long int, boost::ratio<1l, 1l> >, Rep =
long long int, Period = boost::ratio<1l, 1000000000l>]'
/opt/local/include/boost/thread/pthread/timespec.hpp:51:
instantiated from here
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp:145: error:
creating array with negative size ('-0x00000000000000001')
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp: In
instantiation of 'boost::ratio_detail::br_mul<1l, 1000000000l>':
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp:284:
instantiated from 'boost::ratio_detail::ratio_divide<boost::ratio<1l,
1000000000l>, boost::ratio<1l, 1l> >'
/opt/local/include/boost/ratio/ratio.hpp:156:   instantiated from
'boost::ratio_divide<boost::ratio<1l, 1000000000l>, boost::ratio<1l,
1l> >'
/opt/local/include/boost/chrono/duration.hpp:305:   instantiated from
'boost::chrono::detail::duration_cast<boost::chrono::duration<long
long int, boost::ratio<1l, 1000000000l> >,
boost::chrono::duration<long long int, boost::ratio<1l, 1l> > >'
/opt/local/include/boost/chrono/duration.hpp:783:   instantiated from
'typename boost::enable_if<boost::chrono::detail::is_duration<Rep>,
ToDuration>::type boost::chrono::duration_cast(const
boost::chrono::duration<Rep2, Period>&) [with ToDuration =
boost::chrono::duration<long long int, boost::ratio<1l, 1l> >, Rep =
long long int, Period = boost::ratio<1l, 1000000000l>]'
/opt/local/include/boost/thread/pthread/timespec.hpp:51:
instantiated from here
/opt/local/include/boost/ratio/detail/overflow_helpers.hpp:145: error:
creating array with negative size ('-0x00000000000000001')
/Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/typelib/gccxml.rb:600:in
`block in gccxml': cannot load one of the header files
/Users/vm/nasa_ws/src/ssco/big_mockup/Structs.hpp: gccxml returned an
error while parsing
/var/folders/xr/r49mczcs7l1329vqt_h1prrh0000gn/T/orogen_pending_loads20140403-45326-h942zr
(ArgumentError)
from /opt/local/lib/ruby1.9/1.9.1/tempfile.rb:320:in `open'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/typelib/gccxml.rb:597:in
`gccxml'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/typelib/gccxml.rb:624:in
`load_from_gccxml'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/typelib/registry.rb:474:in
`call'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/typelib/registry.rb:474:in
`import'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/x86_64-darwin12/orogen/gen/typekit.rb:1447:in
`do_import'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/x86_64-darwin12/orogen/gen/typekit.rb:1186:in
`block in perform_pending_loads'
from /opt/local/lib/ruby1.9/1.9.1/tempfile.rb:320:in `open'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/x86_64-darwin12/orogen/gen/typekit.rb:1179:in
`perform_pending_loads'
from /Users/vm/orocos_ws/install_isolated/lib/ruby1.9/1.9.1/x86_64-darwin12/orogen/gen/typekit.rb:1606:in
`generate'
from /Users/vm/orocos_ws/install_isolated/bin/typegen:113:in `<main>'

Changing the field from RTT::rt_string into std::string resolves the
issue, but I would really like to use the rt_string option since it
works in Linux. Does anyone have an idea on how to fix this?

I'm using the toolchain-2.7 branch of orogen on OSX 10.8 and ruby 1.9

Ruben

-- 
Ruben Smits, CTO
+32 479 511 786
Intermodalics - Kapeldreef 60, 3001 Heverlee - BELGIUM
www.intermodalics.eu

---------------------------------------------------------------------------------------------------------------------------------------
This email and any attached files are confidential and may be legally
privileged. Any copy, print or forward of this email, without the
agreement of sender or addressee, is strictly prohibited. Misuse is a
violation of the law on personal data protection (D. Lgs. 196/2003)
and on secrecy of correspondence (art. 616 cp). If you have received
this transmission in error please notify the sender immediately and
then delete this email and any attached files.
-- 
Orocos-Dev mailing list
[email protected]
http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev