rtlsdrblog / rtl-sdr-blog

Modified Osmocom drivers with enhancements for RTL-SDR Blog V3 and V4 units.
https://www.rtl-sdr.com
GNU General Public License v2.0
274 stars 41 forks source link

Macbook Pro M2 with MacOS Sonoma (14.5): error when intallig driver #53

Open tau31 opened 2 months ago

tau31 commented 2 months ago

Hi 👋 ,

I am trying to install the driver using the recommended instructions in the README for MacOS.

However, I get past the make stage with the following error:

~/gits/rtl-sdr-blog/build (master ✗) make LIBRARY_PATH=/usr/local/lib
[  3%] Building C object src/CMakeFiles/rtlsdr.dir/librtlsdr.c.o
[  6%] Building C object src/CMakeFiles/rtlsdr.dir/tuner_e4k.c.o
[  9%] Building C object src/CMakeFiles/rtlsdr.dir/tuner_fc0012.c.o
[ 12%] Building C object src/CMakeFiles/rtlsdr.dir/tuner_fc0013.c.o
[ 15%] Building C object src/CMakeFiles/rtlsdr.dir/tuner_fc2580.c.o
[ 18%] Building C object src/CMakeFiles/rtlsdr.dir/tuner_r82xx.c.o
[ 21%] Linking C shared library librtlsdr.dylib
ld: warning: ignoring duplicate libraries: '-lusb-1.0'
ld: library 'usb-1.0' not found
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/librtlsdr.0.6git.dylib] Error 1
make[1]: *** [src/CMakeFiles/rtlsdr.dir/all] Error 2
make: *** [all] Error 2
~/gits/rtl-sdr-blog/build (master ✗) make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

I have little experience with compilation to even know what should I do here.

Could anyone give me a help here?

Thanks 👍

4refr0nt commented 2 months ago

try brew install libusb after successfully compile and install, you will got error when running binary:

dyld[48941]: Library not loaded: @rpath/librtlsdr.0.dylib
  Referenced from: <E2264B6E-CC23-3008-BA26-3B5E7BC238BA> /usr/local/bin/rtl_test
  Reason: no LC_RPATH's found
[1]    48941 abort      rtl_test -t

then sudo install_name_tool -add_rpath /usr/local/lib /usr/local/bin/rtl_test then repeat this command for every rtl_* files in /usr/local/bin (rtl_sdr, rtl_fm and other) done.

hugovincent commented 4 weeks ago

As an alternative, instead of make LIBRARY_PATH=/usr/local/lib, try make LIBRARY_PATH=$(brew --prefix)/lib.