Incompatible library version problem or possible library path issue because it was unexpected that libmwsdrrdriver.dylib requires version 1.0.0 or later, but librtlsdr.0.dylib provides version 0.0.0.

Hello,
I am using Matlab RTL-SDR add-on on my macbook pro (El Capitan ver. 10.11.6) for receiving live RF sample data rom a RF front-end. Everything was ok before this morning when I install _ cmake_ on my macbook pro.
Now when I started running my RF data acquisition matlab files, the error message immediately comes out. I suspect that there are some changes happened on library paths configuration, but I don't know how to solve it.
Please help and TIA!
Shu
Invalid MEX-file '/Users/swang/Documents/MATLAB/SupportPackages/R2016a/toolbox/shared/sdr/sdrr/sdrrmex/sdrrmapi.mexmaci64':
dlopen(/Users/swang/Documents/MATLAB/SupportPackages/R2016a/toolbox/shared/sdr/sdrr/sdrrmex/sdrrmapi.mexmaci64, 6): Library
not loaded: @rpath/librtlsdr.0.dylib
Referenced from:
/Users/swang/Documents/MATLAB/SupportPackages/R2016a/toolbox/shared/sdr/sdrr/bin/maci64/libmwsdrrdriver.dylib
Reason: Incompatible library version: libmwsdrrdriver.dylib requires version 1.0.0 or later, but librtlsdr.0.dylib
provides version 0.0.0
Error in sdrr_mapiPrivate (line 39)
[varargout{1}, errStat, errId, errStr] = sdrrmapi(cmd_m, varargin{:});
Error in sdrr_openDataConnection (line 6)
[driverHandle, errStat, errId, errStr] = sdrr_mapiPrivate('openDataConnection', devConn, dataXfer, runResetAndInit);
Error in comm.SDRRTLReceiver/connect
Error in comm.SDRRTLReceiver/initialize
Error in comm.SDRRTLReceiver/infoImpl
Error in RtlSdrV3GpsSampler (line 54)
Gps.Rf.sdrHwInfo = info( Gps.Rf.radio ) ;

Respuestas (1)

I know this is an old question. But as Google had only one search result for this exact issue, being this unanswered question, I decided to post the solution I came up with anyway.
A quick and dirty "fix" to get the proper version of librtlsdr loaded is by starting MATLAB using command
DYLD_LIBRARY_PATH="/Users/swang/Documents/MATLAB/SupportPackages/R2016a/toolbox/shared/sdr/sdrr/bin/maci64/" /Applications/MATLAB_R2016a.app/Contents/MacOS/MATLAB
from the Terminal.
If you want it properly fixed, you should read up upon macOS libraries and @rpath, some starting points:
otool -l and install_name_tool

Categorías

Más información sobre Communications Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 7 de Sept. de 2016

Comentada:

el 27 de Mzo. de 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by