I am trying to measure performance of my OOT module with performance
counter and control port.
When I execute a command line gr-perf-monitorx or gr-ctrlport-monitor,
an error below occurred:
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/GrDataPlotter.py”,
line 26, in
from gnuradio.ctrlport import GNURadio
ImportError: cannot import name GNURadio
Could anyone give me a hint for this?
For detail information, I’ve installed GNU Radio with build-gnuradio
script. The last commit of cloned git repository in my PC is d5cea6e4( https://gnuradio.org/redmine/projects/gnuradio/repository/revisions/d5cea6e44e29db6b62fabe2b1e5ec16e91b41e68)
in Jun 22 2015. I can’t remember exactly, but I think this commit was
used
to install the GNU Radio.
in Jun 22 2015. I can’t remember exactly, but I think this commit was used
to install the GNU Radio.
Regards,
Jeon.
This sounds as if Thrift wasn’t found when running cmake. Our cmake
scripts
use thrift to compile our gnuradio.thrift file into C++ and Python code
that is installed with GNU Radio.
The output of cmake will tell you if it found Thrift or not. Look under
the
list of enabled components for:
Actually, I’ve got a trouble for days installing Thrift and enabling it
from GNU Radio.
This is just a simple wrap-up for readers who are not familiar with
compiling and building things.)
Installing thrift:
Get Thrift 0.9.2
0.9.2 release tag of git repository have some buggy stuff.
So get the stable release from Apache Thrift - Download
Extract it and build. Make sure that you have all of pre-requisites.
$ tar xf thrift-0.9.2.tar.bz2
$ cd thrift-0.9.2
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig # just in case
Check python can import Thrift
$ python
import thrift
3-1. If python can’t, do the followings:
$ cd thrift-0.9.2/lib/py
$ sudo python setup.py install
Go back step 3. And check again.
Build GNU Radio.
$ cd gnuradio
$ mkdir build
$ cd build
$ cmake …
$ make
$ sudo make isntall
4-1. One important thing is, I recommend you to delete everythink inside
build directory.
At least, I recommend you to remove CMakeCache.txt:
$ cd build
$ rm -rf ./
# or
$ rm CMakeCache.txt
This file can help executing cmake, but sometimes it makes cmake get
wrong variables.
I've spent days to figure out this. cmakek gives me a wrong thrift
binary path /usr/bin/thrift.
Actually, I have thrift under /usr/local/bin.
I think it’s a quite unusual case since I have been messing around my
PC.
If you have a system with some fresh installation and configuration, it
won’t be a problem.