It's not terribly uncommon for someone to e-mail the GNU Radio mailing list, discuss-gnuradio, asking for help getting GNU Radio running in CentOS. CentOS is known for its long maintenance periods, which makes it a favorite flavor of Linux in enterprise environments. CentOS 6, for example, was first released in 2011 (CentOS 6.0), and CentOS 6.8, released in May of 2016, will be supported through the year 2020. The downside to this is that it can be very difficult to get software running that is not packaged by the CentOS package maintainers because the system libraries are ancient.

Yup, that's a freshly updated CentOS 6.8 install showing Python 2.6.6. In fact, the version of git shipped with CentOS is so old that exported diffs / patches cannot be applied by newer versions of git.

Anyway, last week I spent a bit of time backporting the current maint branch of GNU Radio, based on v3.7.10.1, to CentOS 6.8. I haven't tested it super thoroughly, but it appears to be working:

I have pushed a branch with the necessary changes to my personal GNU Radio repo, which you can find here. Instructions for installing GNU Radio on CentOS 6.8 with this branch are below:

$ sudo yum upgrade
$ sudo yum reboot
$ sudo yum install epel-release
$ sudo yum install "Engineering and Scientific" "Development Tools" fftw-devel cppunit-devel wxPython-devel libusb-devel guile boost-devel alsa-lib-devel numpy gsl-devel python-devel swig python-sphinx orc-devel orc-compiler doxygen python-docutils python-cheetah python-lxml guile-devel PyOpenGL PyQt4-devel qwt-devel qwtplot3d-qt4-devel xmlto graphviz PyQwt PyQwt-devel zeromq-devel python-zmq SDL-devel cmake make gcc gcc-c++ boost148 boost148-devel scipy python-mako
$ git clone --recursive https://github.com/bhilburn/gnuradio.git gnuradio.git
$ cd gnuradio.git/
$ git checkout -b centos6.8-backport -t origin/centos6.8-backport
$ mkdir build; cd build
$ cmake -DBOOST_INCLUDEDIR=/usr/include/boost148 -DBOOST_LIBRARYDIR=/usr/lib64/boost148 ../
$ make -j2
$ sudo make install
$ su -c "echo '/usr/local/lib64' >> /etc/ld.so.conf"
$ sudo ldconfig
$ export PYTHONPATH=/usr/local/lib64/python2.6/site-packages/:$PYTHONPATH
$ gnuradio-companion

Hopefully you are now looking at a sweet, sweet GRC window!

If you would like to replicate the changes I made to create this backport, follow the instructions below:

First, save this code as something like python-format-backport.py:

import re  
import os  
import fnmatch  
from tempfile import mkstemp  
from shutil import move  
from os import remove, close

fmt = "['\"][^'\"]*{}.*?['\"]\.format"

def add_format_indices(instr):  
    text = instr.group(0)
    i = 0
    while '{}' in text:
        text = text.replace('{}', '{%d}'%i, 1)
        i = i+1
    return text

def reformat_text(text):  
    return re.sub(fmt, add_format_indices, text)

matches = []  
for root, dirnames, filenames in os.walk('./'):  
    for filename in fnmatch.filter(filenames, '*.py'):
        matches.append(os.path.join(root, filename))

for filepath in matches:  
    fh, abs_path = mkstemp()
    with open(abs_path, 'w') as new_file:
        with open(filepath, 'r') as old_file:
            for line in old_file:
                new_file.write(reformat_text(line))
    close(fh)
    remove(filepath)
    move(abs_path, filepath)

Next, head into your top-level GNU Radio directory, and run the following:

$ grep -rl 'lowerBound' gr-qtgui/ | xargs sed -i 's/lowerBound/lBound/g'
$ grep -rl 'upperBound' gr-qtgui/ | xargs sed -i 's/upperBound/hBound/g'
$ grep -rl "decode" grc/gui | xargs sed -i "s/errors='replace'/'replace'/g"
$ grep -rl "template = '{:' + fmt + '}{}'" grc/core | xargs sed -i "s/template = '{:' + fmt + '}{}'/template = '{0:' + fmt + '}{1}'/g"
$ cd grc/
$ python ~/python-format-backport.py
$ cd ../

From here, pick up the build instructions from earlier in the post, starting with the cmake command.

Good luck, and happy hacking!