Re: [Discuss-gnuradio] Making and Installing a New Block

2007-10-05 Thread Franklin Sands
I'm running the python code squaredaudio.py in its own directory.  Make 
install with the additional files is what breaks the entire howto module.  The 
only thing that changes between when squaredaudio.py runs and doesn't are those 
files I attached and then running ./configure, make, make install.  Returning 
the build tree back to the way it came in the tar.gz file and then going 
through ./configure, make, make install fixes the howto module so that 
squaredaudio.py runs.  Of course this means that howto_square3_ff isn't 
available.  

I hope I replied to the list correctly this time.

Keith

 - Original Message -
 From: Eric Blossom [EMAIL PROTECTED]
 To: Franklin Sands [EMAIL PROTECTED]
 Subject: Re: [Discuss-gnuradio] Making and Installing a New Block
 Date: Thu, 4 Oct 2007 08:47:49 -0700
 
 
 On Thu, Oct 04, 2007 at 10:24:51AM -0500, Franklin Sands wrote:
  OK I did some more trouble shooting to narrow down the problem.  I
  decided to start with C++ code from a block that I knew already
  worked.
 
  I extracted the file gr-howto-write-a-block-3.0.4.tar.gz.  I then
  installed the block using the normal configure, make, and make
  install procedure.  I then created a python program called
  squaredaudio.py to test the howto_square2_ff block.  It worked
  correctly.  I've attached this file.
 
  Then I created new c++ source files in the topdir/src/lib/
  directory.  They were howto_square3_ff.cc and howto_square3_ff.h.
  The goal here was to create a copy of the howto_square2_ff block
  only under another name.  I copied the source files for the square
  2 block into the source files for the square 3 block.  I changed
  the names from square2 to square3.I modified the howto.i with
  the additional lines of codes for the new block.  I based these off
  of what was already in the file for square_ff and square2_ff.
 
  Next I modifed the file topdir/src/lib/makefile.am.  I added the
  file names howto_square3_ff.cc and howto_square3_ff.h next to the
  places where the file names for the other blocks were.
 
  All other files were left as they came in the tar.gz file.  When
  the block is installed I don't get an error.  However when I run my
  test program I get an error which I've included in error.txt.
 
 
  The main part seems to be:
 
  /usr/local/lib/python2.5/site-packages/gnuradio/_howto.so: undefined
  symbol: _Z21howto_make_square3_ffv
 
 
  This error is the same whether I try to use the howto_square2_ff or
  howto_square3_ff block in squaredaudio.py.
 
  I get the feeling I'm supposed to modify some other files but I 
  can't figure out what to change.  Any ideas? Thanks, Keith
 
 
 What directory are you in when you try to run your program?
 Be sure to NOT be in the directory containing the code.  This avoid
 potential problems with how python resolves imported files.
 
 Have your done a make install?  Note that the error message above
 indicates that it's looking in the installed path.  If you haven't
 installed the code yet with make install it'll be pulling in the old
 libs.
 
 Let me know if this helps.
 
 Eric





___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Making and Installing a New Block

2007-10-04 Thread Franklin Sands
OK I did some more trouble shooting to narrow down the problem.  I
decided to start with C++ code from a block that I knew already
worked.

I extracted the file gr-howto-write-a-block-3.0.4.tar.gz.  I then
installed the block using the normal configure, make, and make
install procedure.  I then created a python program called
squaredaudio.py to test the howto_square2_ff block.  It worked
correctly.  I've attached this file.

Then I created new c++ source files in the topdir/src/lib/
directory.  They were howto_square3_ff.cc and howto_square3_ff.h.
The goal here was to create a copy of the howto_square2_ff block
only under another name.  I copied the source files for the square
2 block into the source files for the square 3 block.  I changed
the names from square2 to square3.I modified the howto.i with
the additional lines of codes for the new block.  I based these off
of what was already in the file for square_ff and square2_ff.

Next I modifed the file topdir/src/lib/makefile.am.  I added the
file names howto_square3_ff.cc and howto_square3_ff.h next to the
places where the file names for the other blocks were.

All other files were left as they came in the tar.gz file.  When
the block is installed I don't get an error.  However when I run my
test program I get an error which I've included in error.txt.

The main part seems to be:
/usr/local/lib/python2.5/site-packages/gnuradio/_howto.so: undefined symbol: 
_Z21howto_make_square3_ffv

This error is the same whether I try to use the howto_square2_ff or 
howto_square3_ff block in squaredaudio.py.  

I get the feeling I'm supposed to modify some other files but I can't figure 
out what to change.  Any ideas? 

Thanks, 
Keith


squaredaudio.py
Description: Binary data


Makefile.am
Description: Binary data


howto.i
Description: Binary data


howto_square3_ff.cc
Description: Binary data


howto_square3_ff.h
Description: Binary data
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Problem Making and Installing New Block

2007-09-27 Thread Franklin Sands
OK I goofed.  I forgot to attach the the command line output.  Here it is.

Thanks,

Keith

bash-3.2# make
make  all-recursive
make[1]: Entering directory `/home/franklin/gr-howto-write-a-block-3.0.4'
Making all in config
make[2]: Entering directory `/home/franklin/gr-howto-write-a-block-3.0.4/config'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/franklin/gr-howto-write-a-block-3.0.4/config'
Making all in src
make[2]: Entering directory `/home/franklin/gr-howto-write-a-block-3.0.4/src'
Making all in lib
make[3]: Entering directory 
`/home/franklin/gr-howto-write-a-block-3.0.4/src/lib'
make  all-am
make[4]: Entering directory 
`/home/franklin/gr-howto-write-a-block-3.0.4/src/lib'
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I../.. -pthread -I/usr/local/include/gnuradio-I/usr/include/python2.5
-g -O2 -Wall -Woverloaded-virtual -pthread -MT howto.lo -MD -MP -MF 
.deps/howto.Tpo -c -o howto.lo howto.cc; \
then mv -f .deps/howto.Tpo .deps/howto.Plo; else rm -f 
.deps/howto.Tpo; exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I../.. -pthread -I/usr/local/include/gnuradio 
-I/usr/include/python2.5 -g -O2 -Wall -Woverloaded-virtual -pthread -MT 
howto.lo -MD -MP -MF .deps/howto.Tpo -c howto.cc  -fPIC -DPIC -o .libs/howto.o
howto.cc:4226: error: expected initializer before '.' token
howto.cc: In function 'PyObject* 
_wrap_howto_file_modulator_ff_sampling_freq(PyObject*, PyObject*)':
howto.cc:5288: error: 'howto_file_modulator_ff' was not declared in this scope
howto.cc:5288: error: 'arg1' was not declared in this scope
howto.cc:5288: error: expected primary-expression before ')' token
howto.cc:5288: error: expected `;' before numeric constant
howto.cc:5299: error: expected type-specifier before 'howto_file_modulator_ff'
howto.cc:5299: error: expected `' before 'howto_file_modulator_ff'
howto.cc:5299: error: expected `(' before 'howto_file_modulator_ff'
howto.cc:5299: error: expected primary-expression before '' token
howto.cc:5299: error: expected `)' before ';' token
howto.cc:5300: error: expected primary-expression before 'double'
howto.cc:5300: error: expected `)' before 'double'
howto.cc: In function 'PyObject* 
_wrap_howto_file_modulator_ff_data_rate(PyObject*, PyObject*)':
howto.cc:5310: error: 'howto_file_modulator_ff' was not declared in this scope
howto.cc:5310: error: 'arg1' was not declared in this scope
howto.cc:5310: error: expected primary-expression before ')' token
howto.cc:5310: error: expected `;' before numeric constant
howto.cc:5321: error: expected type-specifier before 'howto_file_modulator_ff'
howto.cc:5321: error: expected `' before 'howto_file_modulator_ff'
howto.cc:5321: error: expected `(' before 'howto_file_modulator_ff'
howto.cc:5321: error: expected primary-expression before '' token
howto.cc:5321: error: expected `)' before ';' token
howto.cc:5322: error: expected primary-expression before 'double'
howto.cc:5322: error: expected `)' before 'double'
howto.cc: In function 'PyObject* 
_wrap_howto_file_modulator_ff_mark_value(PyObject*, PyObject*)':
howto.cc:5332: error: 'howto_file_modulator_ff' was not declared in this scope
howto.cc:5332: error: 'arg1' was not declared in this scope
howto.cc:5332: error: expected primary-expression before ')' token
howto.cc:5332: error: expected `;' before numeric constant
howto.cc:5343: error: expected type-specifier before 'howto_file_modulator_ff'
howto.cc:5343: error: expected `' before 'howto_file_modulator_ff'
howto.cc:5343: error: expected `(' before 'howto_file_modulator_ff'
howto.cc:5343: error: expected primary-expression before '' token
howto.cc:5343: error: expected `)' before ';' token
howto.cc:5344: error: expected primary-expression before 'double'
howto.cc:5344: error: expected `)' before 'double'
howto.cc: In function 'PyObject* 
_wrap_howto_file_modulator_ff_space_value(PyObject*, PyObject*)':
howto.cc:5354: error: 'howto_file_modulator_ff' was not declared in this scope
howto.cc:5354: error: 'arg1' was not declared in this scope
howto.cc:5354: error: expected primary-expression before ')' token
howto.cc:5354: error: expected `;' before numeric constant
howto.cc:5365: error: expected type-specifier before 'howto_file_modulator_ff'
howto.cc:5365: error: expected `' before 'howto_file_modulator_ff'
howto.cc:5365: error: expected `(' before 'howto_file_modulator_ff'
howto.cc:5365: error: expected primary-expression before '' token
howto.cc:5365: error: expected `)' before ';' token
howto.cc:5366: error: expected primary-expression before 'double'
howto.cc:5366: error: expected `)' before 'double'
howto.cc: In function 'PyObject* 
_wrap_howto_file_modulator_ff_file_name(PyObject*, PyObject*)':
howto.cc:5376: error: 'howto_file_modulator_ff' was not declared in this scope
howto.cc:5376: error: 'arg1' was not declared in this scope
howto.cc:5376: error: expected primary-expression before ')' token
howto.cc:5376: error: expected `;' before numeric constant
howto.cc:5392: 

[Discuss-gnuradio] Problem Making and Installing New Block

2007-09-27 Thread Franklin Sands
I'm trying to write a new block called howto_file_modulator_f to be used in gnu 
radio.  I'm new to programming using autotools and I believe this is where I'm 
having problems.  I found a tutorial for writing a new block here: 
http://www.nd.edu/~jnl/sdr/docs/tutorials/11.html.  I am also using How to 
Write a Signal Processing Block article on the Gnu Radio site.  I'm using Gnu 
Radio version 3.0.4 on a machine running Fedora 7.

So first I extracted the tar file into my home directory 
/home/franklin/gr-howto-write-a-block-3.0.4/.  I will call this topdir.  I 
wrote the c++ .h and .cc files and put them in the topdir/src/lib folder.  I 
modified the howto.i file by putting #include howto_file_modulator_f.h in 
the include section and added this at the end of the file:

GR_SWIG_BLOCK_MAGIC(howto,file_modulator_f.h);

howto_file_modulator_f_sptr howto_make_file_modulator_f ();

I also added a class declaration with the public member functions, the private 
constructor, and public destructor.  

Then I modifed topdir/src/lib/Makefile.am.  howto_file_modulator_f.cc was added 
to _howto_la_SOURCES list.  howto_file_modulator_f.h was added to the 
grinclude_HEADERS list.  

topdir/configure.ac and topdir/src/python/Makefile.am were not modified.  
Configure.ac was left alone because I was still installing everything under the 
howto module.  The last Makefile.am was not modified because I haven't created 
any quality assurance test code yet.

./configure still seems to work find but I get a long list of errors when I try 
to make the block.  I have attached a file with the command line output.  

Any idea on what I forgot to do or didn't do right?  I can send the c++ code if 
it will be helpful in trouble shooting this.

Thanks,

Keith


___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio