# Message passing error

**URL:** <https://www.ruby-forum.com/t/message-passing-error/238719>\
**Category:** GNU Radio\
**Created:** [January 25, 2014, 3:23pm UTC](https://www.ruby-forum.com/t/message-passing-error/238719 "2014-01-25T15:23:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 25, 2014, 3:23pm UTC](https://www.ruby-forum.com/t/message-passing-error/238719/1 "2014-01-25T15:23:05Z")

</div>

## Dear Sir When I trying to implement message passing between 2 blocks called a1\_ff and a2\_ff following error comes when comiling. I cannot trace it. Thanks Neil

Scanning dependencies of target gnuradio-avg  
[5%] Building CXX object  
lib/CMakeFiles/gnuradio-avg.dir/a1\_ff\_impl.cc.o  
In file included from /usr/include/boost/bind.hpp:22:0,  
from /usr/include/boost/thread/detail/thread.hpp:29,  
from /usr/include/boost/thread/thread.hpp:22,  
from /usr/local/include/gnuradio/thread/thread.h:26,  
from /usr/local/include/gnuradio/basic\_block.h:31,  
from /usr/local/include/gnuradio/block.h:27,  
from /usr/local/include/gnuradio/sync\_block.h:27,  
from /home/neil/gr-avg/include/avg/a1\_ff.h:26,  
from /home/neil/gr-avg/lib/a1\_ff\_impl.h:23,  
from /home/neil/gr-avg/lib/a1\_ff\_impl.cc:26:  
/usr/include/boost/bind/bind.hpp: In instantiation of struct  
boost::\_bi::result\_traits\<boost::\_bi::unspecified, void  
(gr::avg::a1\_ff\_impl::_)()\>:  
/usr/include/boost/bind/bind\_template.hpp:15:48: required from class  
boost::\_bi::bind\_t\<boost::\_bi::unspecified, void  
(gr::avg::a1\_ff\_impl::_)(),  
boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>

> >

/home/neil/gr-avg/lib/a1\_ff\_impl.cc:49:43: required from here  
/usr/include/boost/bind/bind.hpp:69:37: error: void  
(gr::avg::a1\_ff\_impl::_)() is not a class, struct, or union type  
typedef typename F::result\_type type;  
^  
In file included from  
/usr/include/boost/function/detail/maybe\_include.hpp:18:0,  
from  
/usr/include/boost/function/detail/function\_iterate.hpp:14,  
from  
/usr/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52,  
from /usr/include/boost/function.hpp:64,  
from /usr/local/include/gnuradio/basic\_block.h:33,  
from /usr/local/include/gnuradio/block.h:27,  
from /usr/local/include/gnuradio/sync\_block.h:27,  
from /home/neil/gr-avg/include/avg/a1\_ff.h:26,  
from /home/neil/gr-avg/lib/a1\_ff\_impl.h:23,  
from /home/neil/gr-avg/lib/a1\_ff\_impl.cc:26:  
/usr/include/boost/function/function\_template.hpp: In instantiation of  
static  
void boost::detail::function::void\_function\_obj\_invoker1\<FunctionObj, R,  
T0\>::invoke(boost::detail::function::function\_buffer&, T0) [with  
FunctionObj =  
boost::\_bi::bind\_t\<boost::\_bi::unspecified, void  
(gr::avg::a1\_ff\_impl::_)(),  
boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>

> > ;  
> > R = void; T0 = boost::intrusive\_ptrpmt::pmt\_base]:  
> > /usr/include/boost/function/function\_template.hpp:934:38: required  
> > from  
> > void boost::function1\<R, T1\>::assign\_to(Functor) [with Functor =  
> > boost::\_bi::bind\_t\<boost::\_bi::unspecified, void  
> > (gr::avg::a1\_ff\_impl::\*)(),  
> > boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>
> 
> > ;  
> > R = void; T0 = boost::intrusive\_ptrpmt::pmt\_base]  
> > /usr/include/boost/function/function\_template.hpp:722:7: required from  
> > boost::function1\<R, T1\>::function1(Functor, typename  
> > boost::enable\_if\_c\<boost::type\_traits::ice\_not\<boost::is\_integral::value\>::value,  
> > int\>::type) [with Functor = boost::\_bi::bind\_t\<boost::\_bi::unspecified,  
> > void  
> > (gr::avg::a1\_ff\_impl::\*)(),  
> > boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>
> 
> > ;  
> > R = void; T0 = boost::intrusive\_ptrpmt::pmt\_base; typename  
> > boost::enable\_if\_c\<boost::type\_traits::ice\_not\<boost::is\_integral::value\>::value,  
> > int\>::type = int]  
> > /usr/include/boost/function/function\_template.hpp:1069:16: required  
> > from  
> > boost::function\<R(T0)\>::function(Functor, typename  
> > boost::enable\_if\_c\<boost::type\_traits::ice\_not\<boost::is\_integral::value\>::value,  
> > int\>::type) [with Functor = boost::\_bi::bind\_t\<boost::\_bi::unspecified,  
> > void  
> > (gr::avg::a1\_ff\_impl::\*)(),  
> > boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>
> 
> > ;  
> > R = void; T0 = boost::intrusive\_ptrpmt::pmt\_base; typename  
> > boost::enable\_if\_c\<boost::type\_traits::ice\_not\<boost::is\_integral::value\>::value,  
> > int\>::type = int]  
> > /usr/local/include/gnuradio/basic\_block.h:344:34: required from void  
> > gr::basic\_block::set\_msg\_handler(pmt::pmt\_t, T) [with T =  
> > boost::\_bi::bind\_t\<boost::\_bi::unspecified, void  
> > (gr::avg::a1\_ff\_impl::\*)(),  
> > boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>
> 
> > ;  
> > pmt::pmt\_t = boost::intrusive\_ptrpmt::pmt\_base]  
> > /home/neil/gr-avg/lib/a1\_ff\_impl.cc:49:44: required from here  
> > /usr/include/boost/function/function\_template.hpp:153:11: error: no  
> > match for  
> > call to (boost::\_bi::bind\_t\<boost::\_bi::unspecified, void  
> > (gr::avg::a1\_ff\_impl::\*)(),  
> > boost::\_bi::list2\<boost::\_bi::valuegr::avg::a1\_ff\_impl\*, boost::arg\<1\>
> 
> > )  
> > (boost::intrusive\_ptrpmt::pmt\_base&)  
> > BOOST\_FUNCTION\_RETURN((\*f)(BOOST\_FUNCTION\_ARGS));  
> > ^  
> > make[2]: \*\*\* [lib/CMakeFiles/gnuradio-avg.dir/a1\_ff\_impl.cc.o] Error 1  
> > make[1]: \*\*\* [lib/CMakeFiles/gnuradio-avg.dir/all] Error 2  
> > make: \*\*\* [all] Error 2  
> > neil@neil-pc:~/gr-avg/build$

---

<div class="post-metadata">

**Author:** ![MHMND\_Herath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@MHMND\_Herath](https://www.ruby-forum.com/u/MHMND_Herath)\
**Post date:** [January 25, 2014, 3:42pm UTC](https://www.ruby-forum.com/t/message-passing-error/238719/2 "2014-01-25T15:42:57Z")

</div>

Looks like a a C++ or boost question?

Are you experienced in using C++ templates?

Regards,  
Johan

---

<div class="post-metadata">

**Author:** ![MHMND\_Herath](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ecccb3/32.png) [@MHMND\_Herath](https://www.ruby-forum.com/u/MHMND_Herath)\
**Post date:** [January 26, 2014, 1:20pm UTC](https://www.ruby-forum.com/t/message-passing-error/238719/3 "2014-01-26T13:20:28Z")

</div>

Looks like there’s something wrong with how you try to instantiate a  
struct from a trait. Possibly wrong template parameters?

The problem has nothing to do with GNU Radio per se.

You should check the boost documentation or some C++ resource, e.g.  
[http://www.parashift.com/c++-faq/index.html](http://www.parashift.com/c++-faq/index.html)

HTH, Johan
