hey,
I am working to make a detector block in gnuradio 3.7.1 using gr-how
“out-of-tree module”. I am stuck with an error during make command
abhishek@abhishek-Inspiron-N5110:~/gr-howto/build$ make
Scanning dependencies of target gnuradio-howto
[ 5%] Building CXX object
lib/CMakeFiles/gnuradio-howto.dir/howto_detect_ff_impl.cc.o
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:37:5: error:
‘howto_detect_ff_sptr’ does not name a type
howto_detect_ff_sptr
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc: In constructor
‘gr::howto::howto_detect_ff_impl::howto_detect_ff_impl(float, int,
int)’:
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:59:17: error:
expression cannot be used as a function
d_pfa(pfa), d_L(L), d_samples(samples)
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:59:25: error:
expression cannot be used as a function
d_pfa(pfa), d_L(L), d_samples(samples)
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:59:45: error:
expression cannot be used as a function
d_pfa(pfa), d_L(L), d_samples(samples)
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:185:1: error:
expected
‘{’ before ‘}’ token
} /* namespace howto */
^
make[2]: ***
[lib/CMakeFiles/gnuradio-howto.dir/howto_detect_ff_impl.cc.o]
Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-howto.dir/all] Error 2
make: *** [all] Error 2
Os is ubuntu 14.04. Even i have attached howto_detect_ff_impl.h,
howto_detect_ff_impl.cc and howto_swig.i file.
It seems that some mistake is there in howto_detect_ff.h file whose path
is
gr-howto/include/howto. But i am not getting what exactly it is
Any solution to sort an error will be appreciated.
Thanks in advance,
Abhishek.
Hi Abhishek,
your _impl.cc is using old-style naming in out-of-tree-modules and their
components, whilst your detect_ff.h uses the consistent new way.
I think this could be the result of using gr_modtool to generate the
module skeleton, and then copy/pasting over lines from a pre-3.7 code
example. Is that possible?
Also, I already pointed you to the newer guided tutorials[1], which
don’t build on the unmaintained gr-howto example. Please use these to
get used to GNU Radio.
Greetings,
Marcus
[1] https://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials
hey marcus,
here error given is, could not insert function, but we can according to
“http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Public-Header-Files”.
Even i am not able to get last and second last error of expected “(” and
“{”, but in the code all brackets are up to the mark and used properly.
abhishek@abhishek-Inspiron-N5110:~/gr-howto/build$ make
Scanning dependencies of target gnuradio-howto
[ 5%] Building CXX object
lib/CMakeFiles/gnuradio-howto.dir/howto_detect_ff_impl.cc.o
In file included from
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:27:0:
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.h:40:7: error:
???gr::howto::howto_detect_ff_impl::howto_detect_ff_impl(float, int,
int)???
cannot be overloaded
howto_detect_ff_impl(float pfa, int L, int samples);
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.h:37:6: error: with
???gr::howto::howto_detect_ff_impl::howto_detect_ff_impl(float, int,
int)???
howto_detect_ff_impl (float pfa, int L, int samples);
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:37:27: error:
prototype for ???gr::howto::howto_detect_ff::sptr
gr::howto::howto_detect_ff::make(float, int, int)??? does not match any
in
class ???gr::howto::howto_detect_ff???
howto_detect_ff::sptr howto_detect_ff::make(float pfa, int L, int
samples)
^
In file included from
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.h:24:0,
from
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:27:
/home/abhishek/gr-howto/include/howto/howto_detect_ff.h:49:19: error:
candidate is: static gr::howto::howto_detect_ff::sptr
gr::howto::howto_detect_ff::make()
static sptr make();
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc: In constructor
???gr::howto::howto_detect_ff_impl::howto_detect_ff_impl(float, int,
int)???:
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:57:71: warning:
extended initializer lists only available with -std=c++11 or
-std=gnu++11 [enabled by default]
gr::io_signature::make (MIN_OUT, MAX_OUT,
sizeof(float)),
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:66:5: error:
expected ???)??? before ???(??? token
(howto_detect_ff_impl()::~howto_detect_ff_impl())
^
/home/abhishek/gr-howto/lib/howto_detect_ff_impl.cc:187:1: error:
expected ???{??? before ???}??? token
} /* namespace howto */
^
make[2]: ***
[lib/CMakeFiles/gnuradio-howto.dir/howto_detect_ff_impl.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-howto.dir/all] Error 2
make: *** [all] Error 2
Could you please help me out with all individual errors. Attachment of
al the 3 files are provided.
Thanks in advance,
Abhishek.
hey Marcus,
Now, I am able to import detect_ff block. But while running an example
using that block, i am stuck with a runtime error
File “/usr/local/lib/python2.7/dist-packages/howto/howto_swig.py”,
line
24, in swig_import_helper
_mod = imp.load_module(‘_howto_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-howto.so: undefined symbol:
gsl_matrix_alloc
Done
Hence not able to generate flow graph. Screen shot of given example is
attached.
Also i have attached .cc file of detect_ff block.
Would you please help me out with this error.
Thanks in advance,
Abhishek
On Wed, Apr 1, 2015 at 1:44 PM, Marcus Müller [email protected]
Hey Abishek,
happy easter. How did you you generate your module? gr_modtool? Does it
use any matrix methods from GSL?
Greetings,
Marcus
Hi Abhishek,
that guide refers to a somewhat outdated API, so it doesn’t apply to
your case (that guide refers to an architecture where there was no
separate _impl class).
Have you read the guided tutorials and their chapter on C++ blocks? It’s
explaining how you can add functions to blocks.
I’d personally recommend just starting anew, sticking to the guided
tutorials; wherever you got your guidance from, it mixes things that
apply to different versions of GNU Radio, and debugging this is really
not worth it when you could as well just start with a clean slate and
learn things right.
Best regards,
Marcus