gqrx and airspy: gqrx hangs after a few seconds.

429 views
Skip to first unread message

Derk Tegeler

unread,
Jan 2, 2015, 9:24:14 AM1/2/15
to gq...@googlegroups.com
Hi Alexandru,

gqrx (built from scratch on OSX Yosemite, gnuradio-3.7.3, gr-osmocom, gqrx-2.3.2-48-gf641) with airspy hang after a few seconds.

I can get a stable run with 2.5 MSPS and 10 MSPS with 'demod off'. WFM stereo works well, but as soon as I try NFM or AM, gqrx will hang and display OOOOOO on the command line.

This sounds similar to some of the problems described for gqrx 2.2 and fcp a while ago.

Any pointers? Do you need more info? Shall I log a ticket on github?

Kind regards,

Derk

Alexandru Csete

unread,
Jan 2, 2015, 10:06:46 AM1/2/15
to gq...@googlegroups.com
Hi Derk,

I recommend to try the macports version of the poackages or at least
see what patches and build options Michael uses to build. I suspect
the error lies deep inside gnuradio or boost, but you are welcome to
open an issue on github to have it on record.

Alex

Derk Tegeler

unread,
Jan 2, 2015, 11:51:38 AM1/2/15
to gq...@googlegroups.com
Hi Alex, thanks for the fast response.

The macports option fails to build gr-osmosdr, whereas the manual build works with no problems at all (something strange happening with /usr/local/lib/libairspy.0.dylib).

I'll try with a newer version of gnuradio, all the rest is at the latest version.

Another question: the SDR# stuff has a decimation option for airspy (http://airspy.com/downloads/airspy_controller.png). Do you have plans to implement this? I read somewhere that it significantly improves reception in some cases.

Kind regards and thanks for gqrx,

Derk

Michael Dickens

unread,
Jan 2, 2015, 11:55:34 AM1/2/15
to gq...@googlegroups.com
Hi Derk - Can you send me the failure build log related to gr-osmosdr?
I'll see if I can get it fixed. - MLD

Alexandru Csete

unread,
Jan 2, 2015, 12:39:33 PM1/2/15
to gq...@googlegroups.com
On Fri, Jan 2, 2015 at 5:51 PM, Derk Tegeler <antigr...@gmail.com> wrote:
>
> Another question: the SDR# stuff has a decimation option for airspy
> (http://airspy.com/downloads/airspy_controller.png). Do you have plans to
> implement this? I read somewhere that it significantly improves reception in
> some cases.

Hi Derk,

Gqrx already decimates from the input rate down to 48 kHz, although
the processing gain depends on the filter implementation in gnuradio.
I don't have any numbers but I believe it is a good tradeoff between
speed and quality.

Alex

Derk Tegeler

unread,
Jan 2, 2015, 1:29:13 PM1/2/15
to gq...@googlegroups.com
Thanks. I don't know enough about the innards, I'll take your word for it!

D.

Derk Tegeler

unread,
Jan 2, 2015, 1:33:55 PM1/2/15
to gq...@googlegroups.com
Sure!

I think I've isolated it:

DEBUG: Ignoring loadcommand containing @executable_path in /opt/local/libexec/ld64/ld

Could not open libairspy.0.dylib: Error opening or reading file (referenced from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so)

DEBUG: Marking /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so as broken

DEBUG: Marking /opt/local/lib/libgnuradio-osmosdr.0.1.5git.dylib as broken

--->  Found 2 broken file(s), matching files to ports

Error: Port gr-osmosdr is still broken after rebuilding it more than 3 times.

In addition:

otool -L /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so:

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)

/opt/local/lib/libgnuradio-osmosdr.0.1.5git.dylib (compatibility version 0.1.5, current version 0.0.0)

/opt/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)

/opt/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)

/opt/local/lib/libgnuradio-runtime.3.7.5.1.dylib (compatibility version 3.7.5, current version 0.0.0)

/opt/local/lib/libgnuradio-pmt.3.7.5.1.dylib (compatibility version 3.7.5, current version 0.0.0)

/opt/local/lib/libgnuradio-blocks.3.7.5.1.dylib (compatibility version 3.7.5, current version 0.0.0)

/opt/local/lib/libgnuradio-fcd.3.7.5.1.dylib (compatibility version 3.7.5, current version 0.0.0)

/opt/local/lib/libgnuradio-fcdproplus.0.dylib (compatibility version 0.0.0, current version 0.0.0)

/opt/local/lib/librtlsdr.0.dylib (compatibility version 0.0.0, current version 0.5.0)

/opt/local/lib/libgnuradio-uhd.3.7.5.1.dylib (compatibility version 3.7.5, current version 0.0.0)

/opt/local/lib/libuhd.003.dylib (compatibility version 3.0.0, current version 3.8.0)

/opt/local/lib/libhackrf.0.dylib (compatibility version 0.0.0, current version 0.3.0)

/opt/local/lib/libbladeRF.1.dylib (compatibility version 1.0.0, current version 0.0.0)

libairspy.0.dylib (compatibility version 0.0.0, current version 1.0.3)

/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

Do you need anything else?

Kind regards,

Derk

Michael Dickens

unread,
Jan 2, 2015, 4:56:47 PM1/2/15
to gq...@googlegroups.com
[Just a touch OT; sorry!]

Hi Derk - Here's the issue:
{{{
% otool -L
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/osmosdr/_osmosdr_swig.so
[snip]
*libairspy.0.dylib* (compatibility version 0.0.0, current version 1.0.3)
[snip]
}}}

libairspy need to be installed either using @rpath, or with it's self-id
library name with full path. These are minor changes to most build
systems that I've encountered. In GNU Radio, which uses CMake, we do the
following, which correctly sets the @rpath as well as the library
self-id name directory correctly -- so, sort of doubly making sure the
built libraries work ($GR_LIBRARY_DIR == "lib" on OSX; on Linux it might
be "lib" or "lib64"):
{{{
########################################################################
# On Apple only, set install name and use rpath correctly, if not
already set
########################################################################
if(APPLE)
if(NOT CMAKE_INSTALL_NAME_DIR)
set(CMAKE_INSTALL_NAME_DIR
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
PATH "Library Install Name Destination Directory" FORCE)
endif(NOT CMAKE_INSTALL_NAME_DIR)
if(NOT CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH
${CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
PATH "Library Install RPath" FORCE)
endif(NOT CMAKE_INSTALL_RPATH)
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
BOOL "Do Build Using Library Install RPath" FORCE)
endif(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
endif(APPLE)
}}}

I hope this helps airspy, and maybe other projects too! I'm pretty sure
this correction for Gqrx is already in place ... - MLD

Derk Tegeler

unread,
Jan 3, 2015, 8:57:57 AM1/3/15
to gq...@googlegroups.com
Michael, this did the trick, many thanks.

For other readers, to get gqrx running on Mac OSx Yosemite, using macports:

get libairspy from https://github.com/airspy/host as follows:

git clone https://github.com/airspy/host

Before building libairspy, modify host/libairspy/CMakeLists.txt and add the following near the beginning:

if(APPLE)
   
set(GR_LIBRARY_DIR "lib")
   
if(NOT CMAKE_INSTALL_NAME_DIR)
       
set(CMAKE_INSTALL_NAME_DIR
            $
{CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
            PATH
"Library Install Name Destination Directory" FORCE)
    endif
(NOT CMAKE_INSTALL_NAME_DIR)
   
if(NOT CMAKE_INSTALL_RPATH)
       
set(CMAKE_INSTALL_RPATH
            $
{CMAKE_INSTALL_PREFIX}/${GR_LIBRARY_DIR} CACHE
            PATH
"Library Install RPath" FORCE)
    endif
(NOT CMAKE_INSTALL_RPATH)
   
if(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
       
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE
            BOOL
"Do Build Using Library Install RPath" FORCE)
    endif
(NOT CMAKE_BUILD_WITH_INSTALL_RPATH)
endif
(APPLE)
 

If you have not built libairspy before:

mkdir host/build
cmake
../
make
sudo make install


If you have built libairspy before, go back to host/build directory and type
make uninstall
rm
-rf *
cmake
../
make
sudo make install

Proceed to sudo port install gqrx
Make sure you start from a clean situation, you may need to clean the relevant macports (gnuradio, gr-osmosdr and gqrx)

Kind regards,

Derk
Reply all
Reply to author
Forward
0 new messages