-
-
Save jheasly/9477732 to your computer and use it in GitHub Desktop.
Build RTL-SDR on OSX with no tears using homebrew. Forked from https://gist.github.com/0xabad1dea/5777726, a macports solution.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
I had this error last week. I found this
https://stackoverflow.com/questions/65296289/fatal-error-libusb-libusb-h-no-such-file-or-directory-librtlsdr-install-for-gn
Tsyvarev <https://stackoverflow.com/users/3440745/tsyvarev> recommends
installing pkg-config then retrying.
According to the project's CMakeLists.txt
<http://osmocom.org/projects/rtl-sdr/repository/revisions/master/entry/CMakeLists.txt#L72>,
it expects either libusb to be found with pkg-config or, if pkg-config is
not available, libusb parameters should be filled manually:
LIBUSB_INCLUDE_DIRS should be set to include directory
(/usr/include/libusb-1.0 in your case) and LIBUSB_LIBRARIES should be set
to the libusb library (for link with). Though it seems to be simpler to
install pkg-config. – Tsyvarev
<https://stackoverflow.com/users/3440745/tsyvarev> Dec 14 '20 at 22:48
On Fri, 26 Feb 2021 at 6:44 am, Nicu ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
On MacOS Mojave, I get the following:
[ 9%] Built target convenience_static
[ 9%] Building C object src/CMakeFiles/rtlsdr.dir/librtlsdr.c.o
/Users/surdu/Downloads/rtl-sdr/src/librtlsdr.c:30:10: fatal error: 'libusb.h' file not found
#include <libusb.h>
^~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/rtlsdr.dir/librtlsdr.c.o] Error 1
make[1]: *** [src/CMakeFiles/rtlsdr.dir/all] Error 2
make: *** [all] Error 2
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/9477732#gistcomment-3645645>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2PZZ6RXX3ROZCQQORNBKTTA2SA3ANCNFSM4HXFFBFA>
.
--
*richard horobin*.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this
make LIBRARY_PATH=/usr/local/lib