discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] cannot import name GNURadio when launching perf-m


From: Jeon
Subject: Re: [Discuss-gnuradio] cannot import name GNURadio when launching perf-monitorx and ctrlport-monitor
Date: Wed, 5 Aug 2015 15:15:53 +0900

Dear Tom,

Thanks for your advice.

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:

1. Get Thrift 0.9.2

    0.9.2 release tag of git repository have some buggy  stuff.
    So get the stable release from https://thrift.apache.org/download

2. 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

3. 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.

4. 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.

Regards,
Jeon.

2015-08-04 0:05 GMT+09:00 Tom Rondeau <address@hidden>:
On Sat, Aug 1, 2015 at 1:41 AM, Volker Schroer <address@hidden> wrote:
The same error happens in the 3.7.8 release candidate.

-- Volker



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 <module>
            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.

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:

--   * gr-ctrlport
--   * * thrift

Tom


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]