On Thu, Jul 30, 2015 at 7:28 AM, sfraz...@ltsnet.net <sfraz...@ltsnet.net>
wrote:

>  On Tue, Jul 28, 2015 at 10:14 PM, sfraz...@ltsnet.net <
> sfraz...@ltsnet.net>
>
> wrote:
>
> >  I just completed migrating an out of tree project from 3.6 to 3.7,
> > consisting of several c++ files and associated .h files.    The GNU radio
> > wiki page for describing how to do this was very helpful.  I finally got
> > all the code to build aganst a GNU Radio 3.7x library.
> >
> > Problem is now the flow graphs will not run.  It can't find a uhd_swig
> > module, which apparently was present in 3.6.
> >
> >
> > Here are the messages I get
> >  File "../common/path_ncbfsk.py", line 32, in <module>
> >     import gtlib
> >   File "/usr/local/lib64/python2.7/site-packages/gtlib/__init__.py", line
> > 145, in <module>
> >     _prepare_gtlib_swig()
> >   File "/usr/local/lib64/python2.7/site-packages/gtlib/__init__.py", line
> > 48, in _prepare_gtlib_swig
> >     import gtlib_swig
> >   File "/usr/local/lib64/python2.7/site-packages/gtlib_swig/__init__.py",
> > line 129, in <module>
> >     _prepare_uhd_swig()
> >   File "/usr/local/lib64/python2.7/site-packages/gtlib_swig/__init__.py",
> > line 32, in _prepare_uhd_swig
> >     import uhd_swig
> > ImportError: No module named uhd_swig
> >
> > Thanks in advance for any suggestions,
> > Scott
> >
>
> My guess is that you need to rebuild UHD, and then rebuild GNU Radio's
> gr-uhd against that. Here are the steps I would take:
>
> 0) get the latest UHD release, build, and install it
> 1) in your gnuradio root build directory, remove CMakeCache.txt
> 2) rm gr-uhd/* (in the build directory!) -- this shouldn't be necessary,
> but it'll make sure that everything is rebuilt here.
> 3) rerun cmake and make sure it's picking up uhd as a component
> 4) rerun make and make install
> 5) test again to see if that fixes the problem
>
> Tom
> *****************************************************************
>
>
> Thanks Tom.  I checked under
> /usr/lib64/python2.7/site-packages/gnuradio/
>
> and it looks as if uhd is installed.
>
> I found a  directory named "uhd" that appears to be configured as a python
> module (contains __init__.py file) as well as the following:
> __init__.py   __init__.pyo        uhd_siggen_base.pyc  uhd_swig.py
> uhd_swig.pyo
> __init__.pyc  uhd_siggen_base.py  uhd_siggen_base.pyo  uhd_swig.pyc
> _uhd_swig.so
>
> Could it be that the gtlib_swig module should be importing it as "uhd"
> versus "uhd_swig", and that is why it is not
> found?
>
> Scott
>
> ***********************************************************************
> Update:
> Turns out, uhd is installed, and I just needed to add
> /usr/lib64/python2.7/site-packages/gnuradio/uhd
> to the PYTHONPATH variable.
>
> The next result is  more subtle, and I wonder if this is part of the
> changes I should have made when migrating the OOT module.  The error I get
> now is
>   File "/usr/lib64/python2.7/site-packages/gtlib/__init__.py", line 145,
> in <module>
>     _prepare_gtlib_swig()
>   File "/usr/lib64/python2.7/site-packages/gtlib/__init__.py", line 134,
> in _prepare_gtlib_swig
>     setattr(gtlib_swig, attr, constructor_factory(getattr(gtlib_swig,
> attr)))
> AttributeError: 'module' object has no attribute 'uhd_usrp_source'
>
> Does this possibly relate to something I forgot to do in the conversion in
> the c++ and .h files?
>
> I'm getting close here.  Thanks for any help.
>
> Scott
>

Scott,

Yes, I think that was a missed conversion, and it looks like we left it out
of our document. The UHD blocks in GNU Radio are now under
gr::uhd::usrp_source and gr::uhd::usrp_sink.

Let me know if that works and I'll update the document.

Tom
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to