Orocos pre 1.0.0, boost 1.4.0, gcc 4.4

Hi all,

I'm having this problem compiling a old(er) orocos version with gcc 4.4 on windows.

It has todo with the boost::intrusive_ptr o be more specific .

This is my compiler output:

[ 69%] _[32mBuilding CXX object Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj
In file included from c:/nios2/tools/boost_1_40_0/boost/intrusive_ptr.hpp:16,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:42,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/PropertyBase.hpp:33,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Property.hpp:33,
from c:/svn/MC21/gcc-4.4/Framework/inc/VDWProperty.h:13,
from c:/svn/MC21/gcc-4.4/Framework/inc/CCycledEvent.h:37,
from c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:30:
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In destructor 'boost::intrusive_ptr<T>::~intrusive_ptr() [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:313: instantiated from 'bool RTT::ListLockFree<T>::append(T) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:600: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:101: error: no matching function for call to 'intrusive_ptr_release(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:40: note: candidates are: void intrusive_ptr_release(const RTT::DataSourceBase*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:90: note: void RTT::detail::intrusive_ptr_release(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:97: note: void RTT::detail::intrusive_ptr_release(RTT::detail::connection_base*)
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In copy constructor 'boost::intrusive_ptr<T>::intrusive_ptr(const boost::intrusive_ptr<T>&) [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233: instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204: instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:96: error: no matching function for call to 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39: note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In constructor 'boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:120: instantiated from 'boost::intrusive_ptr<RTT::ListLockFree c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233: instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204: instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:72: error: no matching function for call to 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39: note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
_[0m
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)

make[3]: *** [Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj] Error 1

The problem goes away if I change the intrusive_ptr for a shared_ptr in the ListLockFree header. But then it appears some where else...

Everything compiled just fine with GCC 3.x.

Any ideas?

Kind regards,

Sander.

Orocos pre 1.0.0, boost 1.4.0, gcc 4.4

On Jun 14, 2012, at 03:25 , Vandenbroucke Sander wrote:

> Hi all,
>
> I’m having this problem compiling a old(er) orocos version with gcc 4.4 on windows.
> It has todo with the boost::intrusive_ptr o be more specific .

Newer versions of gcc and/or clang don't play well with later versions of boost (nor later versions of Orocos just FYI). Check the ML for further details. I'm not sure whether these errors have been fixed - I know that some similar ones were fixed.
S

Orocos pre 1.0.0, boost 1.4.0, gcc 4.4

On Thu, Jun 14, 2012 at 9:25 AM, Vandenbroucke Sander <
Sander [dot] Vandenbroucke [..] ...> wrote:

> Hi all,****
>
> ** **
>
> I’m having this problem compiling a old(er) orocos version with gcc 4.4 on
> windows.****
>
> It has todo with the boost::intrusive_ptr o be more specific .****
>
> This is my compiler output:****
>
> ** **
>
> [ 69%] _[32mBuilding CXX object
> Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj****
>
> In file included from
> c:/nios2/tools/boost_1_40_0/boost/intrusive_ptr.hpp:16,****
>
> from
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:42,****
>
> from
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/PropertyBase.hpp:33,****
>
> from
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Property.hpp:33,****
>
> from c:/svn/MC21/gcc-4.4/Framework/inc/VDWProperty.h:13,*
> ***
>
> from c:/svn/MC21/gcc-4.4/Framework/inc/CCycledEvent.h:37,
> ****
>
> from
> c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:30:****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In
> destructor 'boost::intrusive_ptr<T>::~intrusive_ptr() [with T =
> RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:313:
> instantiated from 'bool RTT::ListLockFree<T>::append(T) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:600:
> instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555:
> instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199:
> instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*,
> RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from
> 'RTT::Handle VDWEvent<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT =
> void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from
> 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*,
> RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'*
> ***
>
> c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from
> 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(),
> T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'****
>
> c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from
> here****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:101: error:
> no matching function for call to
> 'intrusive_ptr_release(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
> ****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:40:
> note: candidates are: void intrusive_ptr_release(const RTT::DataSourceBase*)
> ****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:90:
> note: void
> RTT::detail::intrusive_ptr_release(RTT::detail::EventCatcher*)****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:97:
> note: void
> RTT::detail::intrusive_ptr_release(RTT::detail::connection_base*)****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In copy
> constructor 'boost::intrusive_ptr<T>::intrusive_ptr(const
> boost::intrusive_ptr<T>&) [with T =
> RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233:
> instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204:
> instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599:
> instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555:
> instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199:
> instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*,
> RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from
> 'RTT::Handle VDWEvent<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT =
> void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from
> 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*,
> RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'*
> ***
>
> c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from
> 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(),
> T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'****
>
> c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from
> here****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:96: error:
> no matching function for call to
> 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
> ****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39:
> note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
> ****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89:
> note: void
> RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96:
> note: void
> RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In
> constructor 'boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T =
> RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:120:
> instantiated from 'boost::intrusive_ptr<RTT::ListLockFree > RTT::ListLockFree<T>::newStorage(size_t, size_t, bool) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233:
> instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204:
> instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T =
> RTT::detail::EventCatcher*]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599:
> instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555:
> instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename
> SignalType::SlotFunction&, SignalType&,
> RTT::EventProcessor::AsynStorageType) [with SignalType =
> RTT::Event<void()>]'****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199:
> instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*,
> RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from
> 'RTT::Handle VDWEvent<SignatureT>::connect(const
> boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT =
> void()]'****
>
> c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from
> 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*,
> RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'*
> ***
>
> c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from
> 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(),
> T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'****
>
> c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from
> here****
>
> c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:72: error:
> no matching function for call to
> 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
> ****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39:
> note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
> ****
>
> _[0m****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89:
> note: void
> RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)****
>
> c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96:
> note: void
> RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)****
>
> make[3]: *** [Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj]
> Error 1****
>
> ** **
>
> The problem goes away if I change the intrusive_ptr for a shared_ptr in
> the ListLockFree header. But then it appears some where else…****
>
> ** **
>
> Everything compiled just fine with GCC 3.x.****
>
> ** **
>
> Any ideas?
>

It looks like a namespace thing. The intrusive_ptr requires two functions
to be available which it calls to increment/decrement the
refcount: intrusive_ptr_add_ref and intrusive_ptr_release

Aparantly you need to move them into another namespace in order for the
compiler to find them, or use a using directive. You might get a hint by
looking at the current code in RTT 2 using intrusive pointers.

Peter

Orocos pre 1.0.0, boost 1.4.0, gcc 4.4

Hi all,

Just to let you know, I’ve put the ref counting functions for the DataObjectBase in the RTT namespace. Doing so resolved my issue. Thanks for the hint!

Kind regards,
Sander.

From: Peter Soetens [mailto:peter [..] ...]
Sent: donderdag 14 juni 2012 16:14
To: Vandenbroucke Sander
Cc: orocos-dev [..] ...
Subject: Re: [Orocos-Dev] Orocos pre 1.0.0, boost 1.4.0, gcc 4.4

On Thu, Jun 14, 2012 at 9:25 AM, Vandenbroucke Sander <Sander [dot] Vandenbroucke [..] ...Sander [dot] Vandenbroucke [..] ...>> wrote:

Hi all,

I’m having this problem compiling a old(er) orocos version with gcc 4.4 on windows.

It has todo with the boost::intrusive_ptr o be more specific .

This is my compiler output:

[ 69%] _[32mBuilding CXX object Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj
In file included from c:/nios2/tools/boost_1_40_0/boost/intrusive_ptr.hpp:16,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:42,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/PropertyBase.hpp:33,
from c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Property.hpp:33,
from c:/svn/MC21/gcc-4.4/Framework/inc/VDWProperty.h:13,
from c:/svn/MC21/gcc-4.4/Framework/inc/CCycledEvent.h:37,
from c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:30:
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In destructor 'boost::intrusive_ptr<T>::~intrusive_ptr() [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:313: instantiated from 'bool RTT::ListLockFree<T>::append(T) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:600: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:101: error: no matching function for call to 'intrusive_ptr_release(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:40: note: candidates are: void intrusive_ptr_release(const RTT::DataSourceBase*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:90: note: void RTT::detail::intrusive_ptr_release(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:97: note: void RTT::detail::intrusive_ptr_release(RTT::detail::connection_base*)
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In copy constructor 'boost::intrusive_ptr<T>::intrusive_ptr(const boost::intrusive_ptr<T>&) [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233: instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204: instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:96: error: no matching function for call to 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39: note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp: In constructor 'boost::intrusive_ptr<T>::intrusive_ptr(T*, bool) [with T = RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl]':
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:120: instantiated from 'boost::intrusive_ptr<RTT::ListLockFree c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:233: instantiated from 'void RTT::ListLockFree<T>::reserve(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/../ListLockFree.hpp:204: instantiated from 'void RTT::ListLockFree<T>::grow(size_t) [with T = RTT::detail::EventCatcher*]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:599: instantiated from 'RTT::Handle RTT::EventProcessor::setup(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:555: instantiated from 'RTT::Handle RTT::EventProcessor::connect(const typename SignalType::SlotFunction&, SignalType&, RTT::EventProcessor::AsynStorageType) [with SignalType = RTT::Event<void()>]'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/Event.hpp:199: instantiated from 'RTT::Handle RTT::Event<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*, RTT::EventProcessor::AsynStorageType) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:361: instantiated from 'RTT::Handle VDWEvent<SignatureT>::connect(const boost::function<Signature>&, RTT::EventProcessor*) [with SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/VDWEvent.h:379: instantiated from 'void VDWEvent<SignatureT>::connect(void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner, SignatureT = void()]'
c:/svn/MC21/gcc-4.4/Framework/inc/CTrigger.h:393: instantiated from 'EventFunction* ConstructTriggerEvent(const std::string&, void (T::*)(), T*, RTT::EventProcessor*) [with T = CCycledEventRunner]'
c:/svn/MC21/gcc-4.4/Framework/src/CCycledEvent.cpp:67: instantiated from here
c:/nios2/tools/boost_1_40_0/boost/smart_ptr/intrusive_ptr.hpp:72: error: no matching function for call to 'intrusive_ptr_add_ref(RTT::ListLockFree<RTT::detail::EventCatcher*>::StorageImpl*&)'
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/DataSourceBase.hpp:39: note: candidates are: void intrusive_ptr_add_ref(const RTT::DataSourceBase*)
_[0m
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/EventProcessor.hpp:89: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::EventCatcher*)
c:/svn/MC21/gcc-4.4/build_win32/orocos/inc/rtt/impl/signal_base.hpp:96: note: void RTT::detail::intrusive_ptr_add_ref(RTT::detail::connection_base*)

make[3]: *** [Framework/CMakeFiles/Framework.dir/src/CCycledEvent.obj] Error 1

The problem goes away if I change the intrusive_ptr for a shared_ptr in the ListLockFree header. But then it appears some where else…

Everything compiled just fine with GCC 3.x.

Any ideas?

It looks like a namespace thing. The intrusive_ptr requires two functions to be available which it calls to increment/decrement the refcount: intrusive_ptr_add_ref and intrusive_ptr_release

Aparantly you need to move them into another namespace in order for the compiler to find them, or use a using directive. You might get a hint by looking at the current code in RTT 2 using intrusive pointers.

Peter