compiling rtt-1.12.1 for PowerPC, error when compiling "template_factory_test.cpp"

Hi all,

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::DataSource0::shared_ptr RTT::AdaptDataSource1::operator()(boost::intrusive_ptr<RTT::DataSourceBase>) const [with TResult = std::vector<double, std::allocator2 >&]':
 /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::allocator3 >& ()(std::vector<double, std::allocator4 >&), RTT::detail::FunctorDataSource<boost::function<std::vector<double, std::allocator5 >& ()(std::vector<double, std::allocator6 >&)> > >, arg1_type = std::vector<double, std::allocator7 >&]'
 /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::allocator8 >&'
 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 DataSource9::shared_ptr t2 = DataSource10::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?

Greetings, Lin

compiling rtt-1.12.1 for PowerPC, error when compiling "template

Hi all,

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?

Greetings,
Lin