[Bug 803] New: compiling rtt-1.12.1 for PowerPC, error when compiling "template_factory_test.cpp"

http://bugs.orocos.org/show_bug.cgi?id=803

Summary: compiling rtt-1.12.1 for PowerPC, error when compiling
"template_factory_test.cpp"
Product: RTT
Version: 1.12.1
Platform: AMD 64bit
OS/Version: All
Status: NEW
Severity: minor
Priority: P3
Component: Real-Time Toolkit (RTT)
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

I am trying to build orocos-rtt-1.12.1 for powerpc. I received this error:

[ 83%] Built target orocos-rtt-dynamic_xenomai
Use: make docapi dochtml docpdf to build the documentation.
[ 83%] Built target message
[ 85%] Built target core-test
[ 85%] Built target dev-test
[ 87%] Built target event-test
[ 88%] Built target list-test
[ 90%] Built target main-test
[ 91%] Building CXX object
tests/CMakeFiles/parser-test.dir/template_factory_test.cpp.o

/home/zhanglin/Performer_MK2_HW_SW_Controller/virtex/src/orocos-rtt-1.12.1/src/scripting/../DataSourceAdaptor.hpp:
In member function 'typename RTT::DataSource<T>::shared_ptr
RTT::AdaptDataSource<TResult>::operator()(boost::intrusive_ptr<RTT::DataSourceBase>)
const [with TResult = std::vector<double, std::allocator<double> >&]':
/home/zhanglin/Performer_MK2_HW_SW_Controller/virtex/src/orocos-rtt-1.12.1
/src/OperationFactory.hpp:201: instantiated from 'ResultT
RTT::detail::OperationFactoryPart1<ResultT, FunctorT, arg1_type>::produce(const
std::vector<boost::intrusive_ptr<RTT::DataSourceBase>,
std::allocator<boost::intrusive_ptr<RTT::DataSourceBase> > >&) const [with
ResultT = RTT::DataSourceBase*, FunctorT =
RTT::detail::DataSourceArgsMethod<std::vector<double, std::allocator<double> >&
()(std::vector<double, std::allocator<double> >&),
RTT::detail::FunctorDataSource<boost::function<std::vector<double,
std::allocator<double> >& ()(std::vector<double, std::allocator<double> >&)> >
>, arg1_type = std::vector<double, std::allocator<double> >&]'

/home/zhanglin/Performer_MK2_HW_SW_Controller/virtex/src/orocos-rtt-1.12.1/tests/template_factory_test.cpp:345:
instantiated from here

/home/zhanglin/Performer_MK2_HW_SW_Controller/virtex/src/orocos-rtt-1.12.1/src/scripting/../DataSourceAdaptor.hpp:513:
error: forming reference to reference type 'std::vector<double,
std::allocator<double> >&'
make[2]: *** [tests/CMakeFiles/parser-test.dir/template_factory_test.cpp.o]
Error 1
make[1]: *** [tests/CMakeFiles/parser-test.dir/all] Error 2
make: *** [all] Error 2

Then I edited DataSourceAdaptor.hpp: line 512 - 514 :

Original:
typename DataSource<const Result&>::shared_ptr t2 = DataSource<const
Result&>::narrow( dsb.get() );
if ( t2 )
return new detail::DataSourceAdaptor<const Result&, Result>( t2
);

Modified:
typename DataSource<Result>::shared_ptr t2 =
DataSource<Result>::narrow( dsb.get() );
if ( t2 )
return new detail::DataSourceAdaptor<Result, Result>( t2 );

Then the error dissappeared and the rtt is installed successfully.

This is definitely not a clean way to build rtt for powerpc. I am wondering if
anyone has encountered this problem and what is the solution?