# Install GNURadio from Source

**URL:** <https://www.ruby-forum.com/t/install-gnuradio-from-source/242271>\
**Category:** GNU Radio\
**Created:** [June 10, 2015, 9:22pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271 "2015-06-10T21:22:04Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 2:13am UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/21 "2015-06-18T02:13:34Z")

</div>

I used the /usr prefix. The exact ./configure command I used was:

./configure --prefix=/usr

I realize I didn’t explicitly include the --with-cpp --with-python  
statements, though I did see that thrift said it installed with C, C++  
and  
Python support (including a few others). I didn’t do that intentionally,  
I  
think I was compiler/compiling drunk. I’m going to uninstall gnuradio  
and  
thrift again and do it word for word to see if it resolves the issue.  
This  
is the ./configure command I will be using to install Thrift this time:

./configure --prefix=/usr --with-cpp --with-python

Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 4:08pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/22 "2015-06-18T16:08:22Z")

</div>

On Wed, Jun 17, 2015 at 8:12 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ./configure --prefix=/usr --with-cpp --with-python
> 
> Rich

Just for information, you shouldn’t /have/ to specify the ‘–with-cpp  
–with-python’ arguments – they should be automatically picked up. I’ve  
put that in the instructions to make it clear what you should be  
building  
and as an extra little bump for those two languages. Likely you’d have  
been  
fine without them.

But pay attention to the next bit of info about PYTHONPATH and the use  
of  
site-packages instead of dist-packages. Depending on your distro, that  
could be a problem.

Tom

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 6:38pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/23 "2015-06-18T18:38:32Z")

</div>

On Thu, Jun 18, 2015 at 12:31 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> – Looking for C++ include sys/resource.h  
> – Running thrift to build C++ bindings  
> – Check size of unsigned int - done  
> – Check size of unsigned long  
> – Check size of unsigned long - done  
> – Check size of unsigned long long  
> – Check size of unsigned long long - done  
> – Performing Test HAVE\_WNO\_UNUSED\_BUT\_SET\_VARIABLE  
> – Performing Test HAVE\_WNO\_UNUSED\_BUT\_SET\_VARIABLE - Success

Looks good!

> File “/usr/local/bin/gr-perf-monitorx”, line 24, in

Gah!

Rich, hopefully we can get you to a place where you don’t have to keep  
rebuilding and installing GNU Radio.

There’s no need to rebuild after installing a Python package. One of the  
nice things about that language. All you had to do was install  
python-networkx (and likely python-matplotlib if you haven’t done that  
already) and rerun the program. Hell, the GNU Radio application could  
have  
still been running while you were doing that.

Tom

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 6:38pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/24 "2015-06-18T18:38:32Z")

</div>

I reinstalled Thrift and Gnu Radio and captured the cmake output, pasted  
below:

## – Configuring gr-ctrlport support… – Dependency Boost\_FOUND = 1 – Dependency SWIG\_FOUND = TRUE – Dependency SWIG\_VERSION\_CHECK = TRUE – Dependency ENABLE\_GNURADIO\_RUNTIME = ON – Enabling gr-ctrlport support. – Override with -DENABLE\_GR\_CTRLPORT=ON/OFF – Looking for C++ include sys/resource.h – Looking for C++ include sys/resource.h - found – Loading build date Thu, 18 Jun 2015 00:33:52 into constants… – Loading version v3.7.7.1-158-g7b684a23 into constants… – checking for module ‘thrift’ – found thrift, version 0.9.2

– Python checking for Thrift  
– Python checking for Thrift - found  
– Found THRIFT: /usr/lib/libthrift.so  
– Found and enabling Thrift backend to ControlPort  
– Running thrift to build C++ bindings  
– Looking for C++ include windows.h  
– Looking for C++ include windows.h - not found  
– TRY\_SHM\_VMCIRCBUF set to ON.  
– Looking for stdint.h  
– Looking for stdint.h - found  
– Looking for stddef.h  
– Looking for stddef.h - found  
– Check size of size\_t  
– Check size of size\_t - done  
– Check size of unsigned int  
– Check size of unsigned int - done  
– Check size of unsigned long  
– Check size of unsigned long - done  
– Check size of unsigned long long  
– Check size of unsigned long long - done  
– Performing Test HAVE\_WNO\_UNUSED\_BUT\_SET\_VARIABLE  
– Performing Test HAVE\_WNO\_UNUSED\_BUT\_SET\_VARIABLE - Success

I have now gotten passed the previous mentioned error, which means  
progress. The newest issue is that I don’t have networkx installed. I  
think  
this should be added to the dependencies list.

Using Volk machine: avx\_64\_mmx  
ControlPort Monitor running.  
INFO: Apache Thrift: -h rbell -p 54906  
monitor::endpoints() = -h rbell -p 54906  
running: [‘gr-perf-monitorx’, ‘rbell’, ‘54906’]  
Traceback (most recent call last):  
File “/usr/local/bin/gr-perf-monitorx”, line 24, in   
import networkx as nx  
ImportError: No module named networkx  
ctrlport.monitor received shutdown signal  
calling stop on shutdown  
calling stop on shutdown

I installed python-networkx through ubuntu’s package manager and am  
rebuilding gnuradio now.

Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 8:03pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/25 "2015-06-18T20:03:16Z")

</div>

Oh very good to know.

After installing those python modules and making the following changes  
to  
the gnuradio-runtime.conf file

[PerfCounters]  
on = True #False  
export = True #False  
clock = thread  
#clock = monotonic

[ControlPort]  
on = True #False  
edges\_list = True #False

My flowgraph fails with the following message:

Executing: “/home/rbell/Documents/tsv/production/bpsk/sbpsk\_loopback.py”  
Using Volk machine: avx\_64\_mmx  
ControlPort Monitor running.  
INFO: Apache Thrift: -h rbell -p 35705  
monitor::endpoints() = -h rbell -p 35705  
running: [‘gr-ctrlport-monitor’, ‘rbell’, ‘35705’]  
Traceback (most recent call last):  
File “/usr/local/bin/gr-ctrlport-monitor”, line 28, in   
from gnuradio.ctrlport.GrDataPlotter import \*  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/GrDataPlotter.py”,  
line 26, in   
from gnuradio.ctrlport.GNURadio import ControlPort  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/GNURadio/ControlPort.py”,  
line 9, in   
from thrift.Thrift import TType, TMessageType, TException,  
TApplicationException  
ImportError: No module named thrift.Thrift  
ctrlport.monitor received shutdown signal  
calling stop on shutdown  
calling stop on shutdown

> > > Done

If I try and start gr-perf-monitorx from a terminal, I get the same  
error,  
No module named thrift.Thrift

Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 8:47pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/26 "2015-06-18T20:47:05Z")

</div>

On Thu, Jun 18, 2015 at 2:01 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> monitor::endpoints() = -h rbell -p 35705  
> line 9, in   
> If I try and start gr-perf-monitorx from a terminal, I get the same error,  
> No module named thrift.Thrift
> 
> Rich

Likely the site-packages issue. Check to make sure you see the thrift  
module itself. It’s likely in /usr/lib/python2.7/site-packages. You  
should  
see thrift, an egg-info. If that’s the case, it’s likely that this isn’t  
in  
your PYTHONPATH. So:

$ export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/site-packages

I’m also just assuming that you’re using Python 2.7.

Tom

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 18, 2015, 10:41pm UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/27 "2015-06-18T22:41:01Z")

</div>

Ah yes sorry about that. I entered that into a terminal directly but  
forgot  
to add it to source it in my bash startup file.

I think the general installation for control ports is complete now. I  
will  
start a new thread for non-install related questions now.

Appreciate all the help.

v/r,  
Rich

---

<div class="post-metadata">

**Author:** ![reback](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b5ac83/32.png) [@reback](https://www.ruby-forum.com/u/reback)\
**Post date:** [June 22, 2015, 6:02am UTC](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271/28 "2015-06-22T06:02:25Z")

</div>

What’s the reasoning for fetching thrift from git (which is failing due  
to  
“error: pathspec ‘0.9.2’ did not match any file(s) known to git.”),  
rather  
than using the versioned tarball?

I’ll have a pull request for you shortly, since the thrift build fails  
when  
I have lua installed, but not the lua headers… To get it to build I  
ended  
up disabling language bindings for: erlang lua nodejs ruby haskell go

On Thu, Jun 18, 2015 at 1:39 PM, Richard B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

[Previous page](https://www.ruby-forum.com/t/install-gnuradio-from-source/242271.md?page=1)
