GNU Radio (etc) via MacPorts Update

I finally finished the gnuradio (and related) ports today, for install
via MacPorts on Mac OS X (mainly 10.6+, but should work on 10.4+). I
split gr-osmosdr off such that there is a 3.6 API version and a 3.7 API
version – respective: gr-osmosdr and gr-osmosdr-next. The GNU Radio
ports are split similarly: gnuradio and gnuradio-devel are for 3.6 API,
and gnuradio-next is for 3.7 API. gnuradio-devel will track to ‘maint’
branch, while gnuradio-next will track the ‘master’ branch until, and
maybe beyond, the 3.7 release – I’ll deal with that issue when the
release gets there.

Not surprisingly, gr-osmosdr-next requires gnuradio-next; MacPorts will
verify that the correct ports are installed. gr-osmosdr required either
gnuradio or gnuradio-devel, so I had to add a specific check to make
sure gnuradio-next is not installed. After quite a bit of testing to
make sure the various tests worked, I pushed the commits yesterday and
today, and I think all is OK again in MacPorts GNU Radio land after last
week’s merging of master and next, and moving towards using the 3.7 API
and away from the 3.6 API.

If you have any issue that you believe is MacPorts related, let me know
here, to my email directly, via MacPorts user’s list, or via a MacPorts
ticket. If you use Mac OS X and have an issue with GNU Radio, no matter
how it is installed, I can generally help you out, too. Happy hacking!

  • MLD

Thanks for maintaining this for the mac. I am just getting my feet wet
in
SDR. I have a working dongle that I can use with the gqrx.app program–
I
can tune radio stations and hear them. I would like to start using
gnuradio
for its added flexibility and power. I tried installing gnuradio (3.7)
and
gr-osmosdr (compatible with the 3.7 API I think) using macports. Both
seem
to install just fine. Problem is that I can’t seem to do anything. When
I
try the examples in /opt/local/share/gnuradio/examples/filter, I get the
error that “No module named gnuradio” so the python module is not
installed.
I have tried searching in the macports python modules (the one currently
selected, version 2.7) as well as the Apple native install and there is
no
gnuradio module. I have searched the /opt/local/bin directory for files
that might be related but the only thing I can find is a file called
gnuradio-config-info which doesn’t do a whole lot (other than spit out
config information.

I can’t do anything described in the gnuradio getting started page such
as
uhd_fft or python uhd_fft.py (where is this python script supposed to be
located by the way?)

I tried to reply once before but I don’t see it anywhere. First of all,
thank you Michael (and others) for all your work on gnuradio. I am
trying to get my feet wet in SDR. I have a dongle that works with
gqrx (I can hear radio stations). I am trying to get gnuradio working
to expand my options for processing/analysis/decoding. I have macports
installed and used

sudo port install gnuradio

which does not report any errors. The only new file I find in
/opt/local/bin is gnuradio-config-info which seems to work properly.
Problem is that I can’t do anything else. I tried to run the examples
in /opt/local/share/gnuradio/examples/filter but get the error message

ImportError: No module named gnuradio

indicating that the python modules were not created or put in the
wrong place-- I have tried searching my other python installs to no
avail. I can’t find the scripts to do things like uhd_fft.py. FWIW,
my selected python install is the macports 2.7 version.

Any help/advice would be appreciated.

Hi Peter - I sent the attached email to the GR discussion list this
morning (not to you, assuming you were on the GR list since you posted
to it); according to the list archives, it did go out <
http://lists.gnu.org/archive/html/discuss-gnuradio/2013-07/msg00110.html

. Maybe you did not receive it yet? My advice: do “sudo port install
gnuradio +full” to get everything including the Python (via SWIG)
interface. It will likely take a while to install, but that should
work. - MLD

Begin forwarded message:

From: Michael D. [email protected]
Subject: Re: [Discuss-gnuradio] GNU Radio (etc) via MacPorts Update
Date: July 9, 2013 8:11:24 AM EDT
To: [email protected]

Hi Peter - When I hear of the error “No module named gnuradio”, I
immediately wonder if the GNU Radio related ports were installed using
the +swig variant. I prefer to use +full myself, to get everything that
GNU Radio can do. If you want just Python and GRC, there are variants
for those. If you did not install using one of these variants, just
reinstall with the new variants – MacPorts will handle the rest
(deactivating the current install and so forth). You can tell what is
installed via “port installed”. If this does not solve the problem,
email me off-list and I’ll work with you to get it all working. - MLD

Thanks. I see your response now. I am trying to understand the gmane
modes–
I think I was seeing the permalink which showed only your original post.

I tried “sudo port install gnuradio +full” which failed. Looking at the
log
file, I think the relevant lines are:

:info:configure CMake Error: The following variables are used in this
project,
but they are set to
NOTFOUND.
:info:configure Please set them or make sure they are set and tested
correctly
in the CMake files:
:info:configure ICE_ICEGRID
:info:configure linked by target “gnuradio-runtime” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/lib
:info:configure linked by target “_runtime_swig” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/swig
:info:configure ICE_ICESTORM
:info:configure linked by target “gnuradio-runtime” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/lib
:info:configure linked by target “_runtime_swig” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/swig
:info:configure ICE_ICEUTIL
:info:configure linked by target “gnuradio-runtime” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/lib
:info:configure linked by target “_runtime_swig” in directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_science_gnuradio/gnuradio/work/gnuradio-3.7.0/
gnuradio-runtime/swig
:info:configure
:info:configure – Configuring incomplete, errors occurred!
:info:configure Command failed: cd
… more lines go here

So it seems that ICE_(ICEGRID, ICESTORM, ICEUTIL) are missing. I tried
installing zeroc_ice35 to see if it was a missing dependency-- it was
not the
right one.

Hi Peter - When I hear of the error “No module named gnuradio”, I
immediately wonder if the GNU Radio related ports were installed using
the +swig variant. I prefer to use +full myself, to get everything that
GNU Radio can do. If you want just Python and GRC, there are variants
for those. If you did not install using one of these variants, just
reinstall with the new variants – MacPorts will handle the rest
(deactivating the current install and so forth). You can tell what is
installed via “port installed”. If this does not solve the problem,
email me off-list and I’ll work with you to get it all working. - MLD

I fixed this issue last night. You’ll need to do:
{{{
sudo port selfupdate
sudo port clean gnuradio
sudo port install gnuradio +full
}}}
and this time it should work. - MLD

Tried but still no go. More variables were not found:

:info:configure CMake Error: The following variables are used in this
project,
but they are set to NOTFOUND.
:info:configure Please set them or make sure they are set and tested
correctly
in the CMake files:
:info:configure ICE_GLACIER2
:info:configure linked by target “gnuradio-runtime” in directory
/opt/loc…
:info:configure linked by target “_runtime_swig” in directory
/opt/local/…
:info:configure ICE_ICEGRID

:info:configure linked by target “gnuradio-runtime” in directory
/opt/loc…
:info:configure linked by target “_runtime_swig” in directory
/opt/local/…
:info:configure ICE_ICESTORM

:info:configure linked by target “gnuradio-runtime” in directory
/opt/loc…
:info:configure linked by target “_runtime_swig” in directory
/opt/local/…
:info:configure ICE_ICEUTIL

:info:configure linked by target “gnuradio-runtime” in directory
/opt/loc…
:info:configure linked by target “_runtime_swig” in directory
/opt/local/…
:info:configure ICE_ZEROCICE

:info:configure linked by target “gnuradio-runtime” in directory
/opt/loc…
:info:configure linked by target “_runtime_swig” in directory
/opt/local/…
:info:configure
:info:configure – Configuring incomplete, errors occurred!

So ICE_(GLACIER2, ICEGRID, ICESTORM, ICEUTIL, ZEROCICE) are not found.

Hi Peter - Thanks for doing the hard work, and you’re welcome! I’m glad
it’s working for you now. I didn’t think the change from qwt (5.1) to
qwt52 would make any difference, but apparently it does. Good to know!

  • MLD

After a bit of digging around and trying different things, I think I
have
a grasp of what is going on.

For whatever reason, I had qwt @5.1.2_2+qt4 (active) and py27-pyqwt
@5.2.0_4 (active) installed. It seems that the current version of
gnuradio (3.7) uses qwt52. I uninstalled all qwt related packages
(port installed | grep -i qwt) and installed qwt52 and gnuradio

sudo port install qwt52
sudo port install gnuradio +full

It then completed without errors.

Michael, thank you for your help.