Error while compiling a processing block

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-processing-block-tp20267377p20267377.html
Sent from the GnuRadio mailing list archive at Nabble.com.

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

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-processing-block-tp20267377p20276253.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Fri, Oct 31, 2008 at 6:16 PM, Francesco B. [email protected] wrote:

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

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

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
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/Error-while-compiling-a-processing-block-tp20267377p20277262.html
Sent from the GnuRadio mailing list archive at Nabble.com.

On Fri, Oct 31, 2008 at 8:23 PM, Francesco B. [email protected] 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);
};

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. :slight_smile:

~ Francesco

Karthik Vijayraghavan wrote:

randsig_source_ff (double sampling_freq);
};


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page


View this message in context:
http://www.nabble.com/Error-while-compiling-a-processing-block-tp20267377p20277759.html
Sent from the GnuRadio mailing list archive at Nabble.com.