Forum: GNU Radio Error while compiling a processing block

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7fc33270c8ea470963a751c3ef8c44d1?d=identicon&s=25 Francesco B. (Guest)
on 2008-10-31 15:47
(Received via mailing list)
Hello all,

I've been spending the past several weeks getting acquainted with GNU
Radio,
and have reached the point of wanting to go through the task of creating
my
own processing block. To this end, I've written a modified version of
the
signal generating block (gr_sig_source_X.*), and attempted to follow the
tutorial floating about by Dawei Shen in order to compile it. However,
after
proceeding through that (substituting file names used in the tutorial
for my
own), I get the following error message:

' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
configure.ac:126: the top level
autom4te-2.61: /usr/bin/m4 failed with exit status: 1
aclocal-1.10: autom4te failed with exit status: 1
' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
configure.ac:126: the top level
autom4te-2.61: /usr/bin/m4 failed with exit status: 1
' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
configure.ac:126: the top level
autom4te-2.61: /usr/bin/m4 failed with exit status: 1
autoheader-2.61: '/usr/bin/autom4te-2.61' failed with exit status: 1
' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
configure.ac:126: the top level
autom4te-2.61: /usr/bin/m4 failed with exit status: 1
automake-1.10: autoconf failed with exit status: 1

It looks as though it's simply the same error repeated multiple times,
before automake gives up on it. Also appears to be originating from
configure.ac, which makes sense since that was a file that differed in
appearance from the tutorial. I attempted modifying the existing
configure.ac, while only substituting the name of the folder where the
block
is contained [GR_STANDALONE(gr-howto-write-a-block,3.1.svn)], and that's
where the error first showed up. I also tried swapping out the
configure.ac
for one from an earlier version of gr-howto-write-a-block, and change
precisely as the tutorial suggested (modifying just the two lines), but
still got the error. Has anyone encountered something like this before,
or
know a solution to it?

~ Francesco
--
View this message in context:
http://www.nabble.com/Error-while-compiling-a-proc...
Sent from the GnuRadio mailing list archive at Nabble.com.
D0072e69d706bb3ca211d33a1b536e2c?d=identicon&s=25 Johnathan Corgan (Guest)
on 2008-10-31 17:09
(Received via mailing list)
On Fri, 2008-10-31 at 07:44 -0700, Francesco B. wrote:

> To this end, I've written a modified version of the
> signal generating block (gr_sig_source_X.*), and attempted to follow the
> tutorial floating about by Dawei Shen in order to compile it.

That tutorial is rather outdated at this point.

> However, after
> proceeding through that (substituting file names used in the tutorial for my
> own), I get the following error message:
>
> ' is already registered with AC_CONFIG_FILES.

This looks like a syntax error in defining the list of generated files
in configure.ac.

-Johnathan
7fc33270c8ea470963a751c3ef8c44d1?d=identicon&s=25 Francesco B. (Guest)
on 2008-11-01 02:20
(Received via mailing list)
Excellent! I've now got ./bootstrap functioning properly, and have
narrowed
the error messages down to two in make, one of which seems like it may
have
been triggered by the other:

randsig_source_ff.h: In function 'PyObject* _wrap_source_ff(PyObject*,
PyObject*)':
randsig_source_ff.h:74: error: too few arguments to function
'randsig_source_ff_sptr randsig_make_source_ff(double)'

randsig.cc:4335: error: at this point in file


Seems to be expecting another parameter, though I haven't a clue what.
In
every instance randsig_source_ff crops up, it has only the parameter
d_sampling_freq. The rest are determined by pseudo-randomly generated
numbers, or fixed to zero (in the case of offset). The .h and .cc are
attached...

~ Francesco

http://www.nabble.com/file/p20276253/randsig_source_ff.h
randsig_source_ff.h

http://www.nabble.com/file/p20276253/randsig_source_ff.cc
randsig_source_ff.cc

--
View this message in context:
http://www.nabble.com/Error-while-compiling-a-proc...
Sent from the GnuRadio mailing list archive at Nabble.com.
063614dd3613cfd90b6c86b951fcf2a4?d=identicon&s=25 Karthik Vijayraghavan (Guest)
on 2008-11-01 02:51
(Received via mailing list)
On Fri, Oct 31, 2008 at 6:16 PM, Francesco B. <fbivona@wpi.edu> wrote:

> randsig.cc:4335: error: at this point in file
> http://www.nabble.com/file/p20276253/randsig_sourc...
>
> http://www.nabble.com/file/p20276253/randsig_source_ff.cc
> randsig_source_ff.cc


Did you make the appropriate changes to the .i files ? You also need to
include your .h file in Makefile.am if I am not mistaken.

In randsig.i you need to have something like

#include "randsig_source_ff.h"

GR_SWIG_BLOCK_MAGIC(randsig,source_ff);

randsig_source_ff_sptr randsig_make_source_ff(double sampling_freq);

class randsig_source_ff : public gr_sync_block
{
private:

public:
Whatever you want to access from outside
};

Karthik
7fc33270c8ea470963a751c3ef8c44d1?d=identicon&s=25 Francesco B. (Guest)
on 2008-11-01 04:23
(Received via mailing list)
Here's the .i file I was using:
http://www.nabble.com/file/p20277262/randsig.i randsig.i

Based on what you said, I changed the line "randsig_source_ff_sptr
randsig_make_source_ff ();" to "randsig_source_ff_sptr
randsig_make_source_ff (double sampling_freq);", and "randsig_source_ff
();"
to "randsig_source_ff (double sampling_freq);"

The same error messages are present.



Karthik Vijayraghavan wrote:
> randsig_source_ff_sptr randsig_make_source_ff(double sampling_freq);
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>

--
View this message in context:
http://www.nabble.com/Error-while-compiling-a-proc...
Sent from the GnuRadio mailing list archive at Nabble.com.
063614dd3613cfd90b6c86b951fcf2a4?d=identicon&s=25 Karthik Vijayraghavan (Guest)
on 2008-11-01 05:18
(Received via mailing list)
On Fri, Oct 31, 2008 at 8:23 PM, Francesco B. <fbivona@wpi.edu> wrote:

> The same error messages are present.
> > #include "randsig_source_ff.h"
> > Whatever you want to access from outside
> > };
> >
> > Karthik
>

Change it as below

GR_SWIG_BLOCK_MAGIC(randsig,source_ff);

randsig_source_ff_sptr randsig_make_source_ff (double sampling_freq);

class randsig_source_ff : public gr_block
{
private:
  randsig_source_ff (double sampling_freq);
};
7fc33270c8ea470963a751c3ef8c44d1?d=identicon&s=25 Francesco B. (Guest)
on 2008-11-01 06:45
(Received via mailing list)
Made those changes after your first post, but they hadn't taken effect
because I forgot to delete all the generated files from the last make.
It
compiles, passes testing, and installs now. :)

~ Francesco


Karthik Vijayraghavan wrote:
>   randsig_source_ff (double sampling_freq);
> };
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>

--
View this message in context:
http://www.nabble.com/Error-while-compiling-a-proc...
Sent from the GnuRadio mailing list archive at Nabble.com.
This topic is locked and can not be replied to.