Compiling and working with gnuradio in windows

I am definitely a newbie here, so excuse me if I am asking some things
that might seem obvious.

I am mostly a windows guy, so I compiled and installed both the UHD
(003.004.003-253-gd9829759) and the gnuradio (3.6.2) under windows using
the CMAKE program.

After some effort, I can run gnuradio-companion. In the gnuradio
examples, I’ve tried filter/resampler_demo.grc and
pfb/resampler_demo.grc.

The pfb/resampler_demo.grc seems to run without any trouble. However,
when I execute filter/resampler_demo.grc, Python crashes. In the block
diagram, if I remove the arbitrary resampler block, python doesn’t seem
to crash when I run it. So, I’m guessing that the arbitrary resampler
module is causing the problems.

filter/resampler_demo.grc crashes consistently even when I use the
precompiled binaries from Ettus and even when I install gnuradio on a
different windows machine.

When running gnuradio in Virtualbox under Ubuntu, however,
filter/resampler_demo.grc executes without a problem.

If you had any thoughts on this, I would appreciate it.
Thanks so much,
Seth

Other randome notes:
To run the GRC examples, I need to delete the first line that starts
with the hash ‘#’. It seems like GRC expects the bracket ‘<’ as the
first line.

I have to say, that as a newcomer, the whole issue of installing and
understanding gnuradio is very confusing. One additional issue I ran
into (but overcame) is a link error in the gnuradio compile:

when compiling gnuradio-core (?), I get two link errors in
uhd_swigPYTHON_wrap.obj of the variety:
error LNK2019: unresolved external symbol “__declspec(dllimport) public:
__thiscall uhd::range_t::range_t(class uhd::range_t const &)”
(_imp[email protected]@@QAE@[email protected]@Z) …

For some reason, it seems that the definitions have to be explicitly
declared in the source, so I added the following to ranges.cpp:
range_t::~range_t(void)
{
/* NOP */
}

range_t::range_t(range_t const & _copy_range_t)
{
_start = _copy_range_t._start;
_step = _copy_range_t._step;
_stop = _copy_range_t._stop;
}

added code to ranges.hpp
// copy range
range_t(range_t const & _copy_range_t);

     // declare destructor
     ~range_t(void);

If you had any thoughts on this, I would appreciate it.
Thanks so much,
Seth

I just fixed some pretty bad bug in the gr-filter that was causing
access violations. You might be seeing that at play.

http://gnuradio.org/cgit/gnuradio.git/commit/?h=maint&id=64913ee414f2c8a51afb2277b16b957fa2e7e066

There isnt an installer yet w/ the fix though…

Other randome notes:
To run the GRC examples, I need to delete the first line that starts
with the hash ‘#’. It seems like GRC expects the bracket ‘<’ as the
first line.

Is this a .py file or a .grc file? Sorry, can you post a snippet or
link.

For some reason, it seems that the definitions have to be explicitly
declared in the source, so I added the following to ranges.cpp:

If you expose types from uhd in the public interface, you may also need
to link the swig module against uhd.lib. Example:

list(APPEND GR_SWIG_LIBRARIES ${UHD_LIBRARIES})

-josh

Hi Josh,
Thank you so much for your help. I replaced fir_filter.cc and
fir_filter_with_buffer.cc per the fix below. I recompiled and now
filter/resampler_demo.grc works! Thanks!

I just fixed some pretty bad bug in the gr-filter that was causing
access violations. You might be seeing that at play.
http://gnuradio.org/cgit/gnuradio.git/commit/?h=maint&id=64913ee414f2c8a51afb2277b16b957fa2e7e066

Per the hash problem:

To run the GRC examples, I need to delete the first line that starts
with the hash ‘#’. It seems like GRC expects the bracket ‘<’ as the
first line.
Is this a .py file or a .grc file? Sorry, can you post a snippet or link.

Resampler_demo.grc’s first few lines are here:

#!C:\Python27\python.exe

<?xml version='1.0' encoding='ASCII'?>

<flow_graph>
Tue Jun 19 21:31:30 2012

When I load the resampler_demo.grc into companion, it errors out with
the message below. However, when I remove the first line
(#!C:\Python27\python.exe), it loads just fine.

Loading: “C:\grctestcode\resampler_demo.grc”
Error: Start tag expected, ‘<’ not found, line 1, column 1

Failure
Traceback (most recent call last):
File
“C:\gnuradio\install\lib\site-packages\gnuradio\grc\gui\MainWindow.py”,
l
ine 178, in new_page
file_path=file_path,
File
“C:\gnuradio\install\lib\site-packages\gnuradio\grc\gui\NotebookPage.py”,
line 47, in init
initial_state = flow_graph.get_parent().parse_flow_graph(file_path)
File
“C:\gnuradio\install\lib\site-packages\gnuradio\grc\base\Platform.py”,
li
ne 113, in parse_flow_graph
ParseXML.validate_dtd(flow_graph_file, FLOW_GRAPH_DTD)
File
“C:\gnuradio\install\lib\site-packages\gnuradio\grc\base\ParseXML.py”,
li
ne 38, in validate_dtd
xml = etree.parse(xml_file, parser=parser)
File “lxml.etree.pyx”, line 2942, in lxml.etree.parse
(src/lxml/lxml.etree.c:5

File “parser.pxi”, line 1528, in lxml.etree._parseDocument
(src/lxml/lxml.etre
e.c:79485)
File “parser.pxi”, line 1557, in lxml.etree._parseDocumentFromURL
(src/lxml/lx
ml.etree.c:79768)
File “parser.pxi”, line 1457, in lxml.etree._parseDocFromFile
(src/lxml/lxml.e
tree.c:78843)
File “parser.pxi”, line 997, in
lxml.etree._BaseParser._parseDocFromFile (src/
lxml/lxml.etree.c:75698)
File “parser.pxi”, line 564, in
lxml.etree._ParserContext._handleParseResultDo
c (src/lxml/lxml.etree.c:71739)
File “parser.pxi”, line 645, in lxml.etree._handleParseResult
(src/lxml/lxml.e
tree.c:72614)
File “parser.pxi”, line 585, in lxml.etree._raiseParseError
(src/lxml/lxml.etr
ee.c:71955)
XMLSyntaxError: Start tag expected, ‘<’ not found, line 1, column 1

#!C:\Python27\python.exe

<?xml version='1.0' encoding='ASCII'?>

<flow_graph>
Tue Jun 19 21:31:30 2012

I think its a typo, the grc file is being installed with
GR_PYTHON_INSTALL, so its appending the shebang to it. You would
probably just want to use the grc file from the source tree.

Devs should probably pull this out:

diff --git a/gr-filter/examples/CMakeLists.txt
b/gr-filter/examples/CMakeLists.txt
index a3901b6…57dbab9 100644
— a/gr-filter/examples/CMakeLists.txt
+++ b/gr-filter/examples/CMakeLists.txt
@@ -30,7 +30,6 @@ GR_PYTHON_INSTALL(PROGRAMS
interpolate.py
reconstruction.py
resampler.py

  • resampler_demo.grc
    synth_filter.py
    synth_to_chan.py
    DESTINATION ${GR_PKG_FILTER_EXAMPLES_DIR}

-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs