Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build RTL-SDR on OSX with no tears using homebrew. Forked from https://gist.github.com/0xabad1dea/5777726, a macports solution.
rtl-sdr build notes for OSX
using macports http://www.macports.org/
see http://sdr.osmocom.org/trac/wiki/rtl-sdr
brew install cmake
brew install libusb
brew install pkgconfig
brew install sox # for easy audio
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build/
cmake ../
make
sudo make install
rtl_test -t
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
@fyngyrz

This comment has been minimized.

Copy link

@fyngyrz fyngyrz commented Dec 1, 2015

When you say "builds on OS X", you are being unclear (and incorrect.) This does not brew/build on OS X 10.6.8

When you provide a step by step, it is important to specify the environment(s) in which you have performed these steps successfully. IE, OS X 10.10.1, etc.

Appreciate the effort. Sadly, it ate half an hour of my time and nothing to show for it but partially installed precursors.

@rbdixon

This comment has been minimized.

Copy link

@rbdixon rbdixon commented Dec 2, 2015

Worked fine for me on El Capitan.

@awootton

This comment has been minimized.

Copy link

@awootton awootton commented Dec 11, 2015

Thanks.
I did this on both yosemite and el capitan today and it worked.

@angelkjos

This comment has been minimized.

Copy link

@angelkjos angelkjos commented Dec 14, 2015

Thanks, worked great on 10.11.1 ElCapitan and connected successfully with cheap Chinese RTL-Dongle.

@kgorman

This comment has been minimized.

Copy link

@kgorman kgorman commented Feb 11, 2016

Thx for this!

@buley

This comment has been minimized.

Copy link

@buley buley commented Mar 25, 2016

Works great on the latest, today El Cap 10.11.4

~~

Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.

@obezuk

This comment has been minimized.

Copy link

@obezuk obezuk commented Jan 29, 2017

Worked great!

@imryan

This comment has been minimized.

Copy link

@imryan imryan commented Jul 30, 2017

Worked for me on Sierra 10.12. Cheers!

@ruudk

This comment has been minimized.

Copy link

@ruudk ruudk commented Sep 12, 2017

Works on Sierra 10.12.6 Thanks!!

@rgrosset

This comment has been minimized.

Copy link

@rgrosset rgrosset commented Mar 27, 2018

High Sierra 10.13.3 not working and getting a compile error

~/git/sdr/rtl-sdr/src/rtl_test.c:165:4: error: member reference type
      'struct timespec' is not a pointer; did you mean to use '.'?
        ts->tv_sec = tv.tv_sec;

~/git/sdr/rtl-sdr/src/rtl_test.c:165:13: error: expression is not
      assignable
        ts->tv_sec = tv.tv_sec;

Following the error message suggestions I changed
ts->tv_sec = tv.tv_sec;
to
ts.tv_sec = tv.tv_sec;

and everything compiled and rtl_test -t worked fine. Thanks!

@lemonkey

This comment has been minimized.

Copy link

@lemonkey lemonkey commented Apr 4, 2018

Yep, had to manually edit rtl_test.c as well on high sierra.

@sdp8483

This comment has been minimized.

Copy link

@sdp8483 sdp8483 commented Jul 20, 2018

Shouldn't line two say using homebrew not macports?

@TheButterZone

This comment has been minimized.

Copy link

@TheButterZone TheButterZone commented Aug 5, 2018

$ brew install libusb
==> Downloading https://homebrew.bintray.com/bottles/libusb-1.0.22.high_sierra.b
######################################################################## 100.0%
==> Pouring libusb-1.0.22.high_sierra.bottle.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/libusb-1.0.0.dylib
Target /usr/local/lib/libusb-1.0.0.dylib
already exists. You may want to remove it:
rm '/usr/local/lib/libusb-1.0.0.dylib'

To force the link and overwrite all conflicting files:
brew link --overwrite libusb

To list all files that would be deleted:
brew link --overwrite --dry-run libusb

Possible conflicting files are:
/usr/local/lib/libusb-1.0.0.dylib
/usr/local/lib/libusb-1.0.dylib -> /usr/local/lib/libusb-1.0.0.dylib
==> Summary
[mug icon] /usr/local/Cellar/libusb/1.0.22: 29 files, 514.9KB

@richardh9935

This comment has been minimized.

Copy link

@richardh9935 richardh9935 commented Jun 12, 2019

Thanks.
Worked (or at least as far as I can tell...) on Mojave 10.14.5 today. (2019-06-12)

@ajmas

This comment has been minimized.

Copy link

@ajmas ajmas commented Mar 10, 2020

I have made a version of these instructions based on MacPorts:

https://gist.github.com/ajmas/144719991f54931b99de43efae13389f

Feel free to copy anything useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.