Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDRPlay API 3.12: /usr/local/lib/libsdrplay_api.dylib shm_open: No such file or directory #1644

Closed
winstonsf opened this issue Aug 29, 2023 · 18 comments
Labels

Comments

@winstonsf
Copy link

sdrtrunk Version
sdr-trunk-osx-aarch64-v0.6.0-alpha7

Describe the bug
Unable to open /libsdrplay_api.dylib

To Reproduce
Steps to reproduce the behavior:

  1. Run ./sdr-trunk from /bin or double click icon from bin folder
  2. See error
    i.g.d.s.t.s.api.SDRplay - Loading API Library from default install path: /usr/local/lib/libsdrplay_api.dylib [12MB/256MB 4%]
    shm_open: No such file or directory

Expected behavior
SDRplay API 3.12 should be loaded and RSPduo tuner should be found

Application Log
2023-08-28 20:57:40.398 INFO i.g.d.icon.IconModel - loading icons file [/var/root/SDRTrunk/settings/icons.xml] [14MB/256MB 5%]
2023-08-28 20:57:40.400 INFO i.g.d.icon.IconModel - Icons file not found at [/var/root/SDRTrunk/settings/icons.xml] [14MB/256MB 5%]
2023-08-28 20:57:40.582 INFO i.g.d.log.ApplicationLog - Application Log File: /var/root/SDRTrunk/logs/sdrtrunk_app.log [21MB/256MB 8%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - SDRTrunk Version : 0.6.0-alpha7 [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - Gradle Version : Gradle 8.2 [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - Build Timestamp : 2023-07-14T07:14:49.022-0400 [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - Build-JDK : 20.0.1 (BellSoft 20.0.1+10 [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - Build OS : Linux (amd64 5.19.0-46-generic [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - [6MB/256MB 2%]
2023-08-28 20:57:40.604 INFO i.g.d.log.ApplicationLog - ******************************************************************* [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - **** sdrtrunk: a trunked radio and digital decoding application *** [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - **** website: https://github.com/dsheirer/sdrtrunk *** [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - ******************************************************************* [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Memory Logging Format: [Used/Allocated PercentUsed%] [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Host OS Name: Mac OS X [6MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Host OS Arch: aarch64 [7MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Host OS Version: 14.0 [7MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Host CPU Cores: 10 [7MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Host Max Java Memory: 4 GB [7MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Storage Directories: [7MB/256MB 2%]
2023-08-28 20:57:40.605 INFO i.g.d.log.ApplicationLog - Application Root: /var/root/SDRTrunk [7MB/256MB 2%]
2023-08-28 20:57:40.606 INFO i.g.d.log.ApplicationLog - Application Log: /var/root/SDRTrunk/logs [7MB/256MB 2%]
2023-08-28 20:57:40.606 INFO i.g.d.log.ApplicationLog - Event Log: /var/root/SDRTrunk/event_logs [7MB/256MB 2%]
2023-08-28 20:57:40.606 INFO i.g.d.log.ApplicationLog - Playlist: /var/root/SDRTrunk/playlist [7MB/256MB 2%]
2023-08-28 20:57:40.606 INFO i.g.d.log.ApplicationLog - Recordings: /var/root/SDRTrunk/recordings [7MB/256MB 2%]
2023-08-28 20:57:40.647 INFO i.g.d.util.ThreadPool - Application thread pool created SCHEDULED and CACHED executors threads [10MB/256MB 4%]
2023-08-28 20:57:40.648 INFO i.g.dsheirer.gui.SDRTrunk - Home path: /var/root/SDRTrunk [10MB/256MB 4%]
2023-08-28 20:57:40.648 INFO i.g.d.p.SystemProperties - SystemProperties - loaded [/var/root/SDRTrunk/SDRTrunk.properties] [10MB/256MB 4%]
2023-08-28 20:57:40.648 INFO i.g.d.p.SystemProperties - SystemProperties - application properties loaded [/var/root/SDRTrunk/SDRTrunk.properties] [10MB/256MB 4%]
2023-08-28 20:57:40.655 INFO i.g.d.s.t.m.TunerManager - Discovering tuners ... [11MB/256MB 4%]
2023-08-28 20:57:40.872 INFO i.g.d.s.t.m.TunerManager - LibUsb API Version: 1.0.264 [11MB/256MB 4%]
2023-08-28 20:57:40.873 INFO i.g.d.s.t.m.TunerManager - LibUsb Version: 1.0.24.11584 [11MB/256MB 4%]
2023-08-28 20:57:40.878 INFO i.g.d.s.t.m.TunerManager - LibUsb - discovered [5] potential usb devices [11MB/256MB 4%]
2023-08-28 20:57:40.880 INFO i.g.d.s.t.m.TunerManager - LibUsb - starting HotPlug detection [11MB/256MB 4%]
2023-08-28 20:57:40.894 INFO i.g.d.s.t.s.api.SDRplay - Loading API Library from default install path: /usr/local/lib/libsdrplay_api.dylib [12MB/256MB 4%]
shm_open: No such file or directory
2023-08-28 20:57:40.928 INFO i.g.d.s.t.s.api.SDRplay - API library - open status: Fail [9MB/34MB 28%]
2023-08-28 20:57:40.928 ERROR i.g.d.s.t.m.TunerManager - Couldn't load SDRPlay API [10MB/34MB 30%]
2023-08-28 20:57:40.930 INFO i.g.d.s.SettingsManager - SettingsManager - loading settings file [/var/root/SDRTrunk/settings/settings.xml] [10MB/34MB 30%]
2023-08-28 20:57:41.108 WARN i.g.d.v.VectorUtilities - CPU supports maximum SIMD instructions of Species[float, 4, S_128_BIT] [16MB/38MB 43%]

Desktop (optional - complete the following information):

  • OS: Sonoma 14.0 beta 23A5328b
  • CPU Cores: M2 Pro
  • RAM: 16GB
@winstonsf winstonsf added the bug label Aug 29, 2023
@winstonsf
Copy link
Author

This does exist in my system: usr/local/lib/libsdrplay_api.dylib

@DSheirer
Copy link
Owner

Can you post a listing or screenshot of the contents of this directory:

/usr/local/lib/

@DSheirer
Copy link
Owner

Previous versions of the API installed the API library as this file:

/usr/local/lib/libsdrplay_api.so

This FAQ shows how to create a symbolic link with the name that sdrtrunk is expecting to find:
https://github.com/DSheirer/sdrtrunk/wiki/FAQ#how-can-i-use-sdrplay-receivers-on-a-mac-os-computer

@DSheirer
Copy link
Owner

This does exist in my system: usr/local/lib/libsdrplay_api.dylib

I misread this at first ... did you have an older (<3.12) version of the API installed and create this file as a symbolic link, or is this the first time that you're using sdrtrunk with sdrplay on this computer? If you previously created a symbolic link, and then updated to API 3.12, the symbolic link may be pointing to the wrong filename.

@winstonsf
Copy link
Author

Can you post a listing or screenshot of the contents of this directory:

/usr/local/lib/

The contents are very large. Here's a snippet of the libsdrplay_api.* items.

Screenshot 2023-08-29 at 10 24 57 AM

@winstonsf
Copy link
Author

winstonsf commented Aug 29, 2023

This does exist in my system: usr/local/lib/libsdrplay_api.dylib

I misread this at first ... did you have an older (<3.12) version of the API installed and create this file as a symbolic link, or is this the first time that you're using sdrtrunk with sdrplay on this computer? If you previously created a symbolic link, and then updated to API 3.12, the symbolic link may be pointing to the wrong filename.

This is the first time installing the SDRplay 3.12 API since I acquired the the Duo recently. The package was downloaded from https://www.sdrplay.com/api/. No other API versions were previously installed. SDRconnect is installed.

I did try a symbolic link after seeing the error but libsdrplay_api.dylib already exists. This is probably from the 3.12 API revision.

@DSheirer
Copy link
Owner

DSheirer commented Aug 31, 2023

@winstonsf Can you tell me what are the file permissions on file: /usr/local/lib/libsdrplay_api.dylib?

@winstonsf
Copy link
Author

lrwxr-xr-x 1 root admin

@DSheirer
Copy link
Owner

DSheirer commented Sep 1, 2023

Could you please do a ls -l libsdrplay* to show what the symbolic link(s) are pointing to?

On my Linux machine, my API 3.07 files displays as:

lrwxrwxrwx 1 root root     34 Sep 17  2021 libsdrplay_api.so -> /usr/local/lib/libsdrplay_api.so.3
lrwxrwxrwx 1 root root     37 Sep 17  2021 libsdrplay_api.so.3 -> /usr/local/lib/libsdrplay_api.so.3.07
-rw-r--r-- 1 root root  56176 Sep 17  2021 libsdrplay_api.so.3.07

@winstonsf
Copy link
Author

Yes...

lrwxr-xr-x 1 root admin 32 Aug 28 20:21 libsdrplay_api.dylib -> /usr/local/lib/libsdrplay_api.so
lrwxr-xr-x 1 root admin 34 Aug 28 20:21 libsdrplay_api.so -> /usr/local/lib/libsdrplay_api.so.3
lrwxr-xr-x 1 root admin 39 Aug 28 20:21 libsdrplay_api.so.3 -> /usr/local/lib/libsdrplay_api.so.3.12.0
lrwxr-xr-x 1 root admin 39 Aug 30 10:09 libsdrplay_api.so.3.07 -> /usr/local/lib/libsdrplay_api.so.3.12.0
lrwxr-xr-x 1 root admin 55 Aug 28 20:21 libsdrplay_api.so.3.12.0 -> /Library/SDRplayAPI/3.12.0/lib/libsdrplay_api.so.3.12.0

@wx-jc
Copy link

wx-jc commented Sep 23, 2023

Any updates on this issue? I ran into this same issue (new install). When running SoapySDRUtil --probe, no devices show up, but the RSDduo works fine with the SDRPlay software.

Version 3.12.0 of the API is the only option they have on the website for MacOS. Couldn't find an older version to try.

@DSheirer
Copy link
Owner

DSheirer commented Nov 5, 2023

I updated sdrtrunk to recognize API version 3.12 as a compatible version, however this likely doesn't address the issue that Java cannot find or access the actual library binary on OSX systems. More troubleshooting is required to identify the cause or solution.

@wx-jc
Copy link

wx-jc commented Nov 8, 2023

Still receiving this error with 0.6.0-beta-4. Do I need to reload anything for the SDRPlay API?

Edit: maybe I'm getting ahead of myself. I saw 3 days ago this wasn't actually fixed, but for some reason I thought I saw it was fixed in beta4, but now I'm not seeing that. Sorry.

@DSheirer
Copy link
Owner

DSheirer commented Nov 8, 2023

I contacted the SDRPlay team yesterday and they are aware that there is an issue with the SDRPlay API version 3.12 for the Mac. The below email details several commands you need to execute on the command line to correct the installation. Can you please try running each of the commands they recommended and then try again with SDRTrunk to see if this resolves the issue?


Hello Dennis,
There are a couple of issues with the 3.12 install which we will address in the next release.
This is known to work once 3.12 is installed…

sudo mkdir -p /usr/local/lib
sudo ln -s /Library/SDRplayAPI/3.12.0/lib/libsdrplay_api.3.12.0 /usr/local/lib/libsdrplay_api.so.3.12
sudo ln -s /usr/local/lib/libsdrplay_api.so.3.12 /usr/local/lib/libsdrplay_api_arm64.so.3.12
sudo ln -s /usr/local/lib/libsdrplay_api.so.3.12 /usr/local/lib/libsdrplay_api_x64.so.3.12
sudo ln -s /usr/local/lib/libsdrplay_api.so.3.12 /usr/local/lib/libsdrplay_api.so.3
sudo ln -s /usr/local/lib/libsdrplay_api.so.3 /usr/local/lib/libsdrplay_api.so
sudo ln -s /usr/local/lib/libsdrplay_api.so /usr/local/lib/libsdrplay_api.dylib

Best regards,
Andy

@wx-jc
Copy link

wx-jc commented Nov 9, 2023

Still not working for me. Curious to see if it works for anyone else.

@DSheirer
Copy link
Owner

DSheirer commented Nov 18, 2023

@wx-jc Some additional comments/actions from the SDRPlay team:

Hi Denny, I wanted to do a bit of follow up on this. I followed the instructions sent by Andy on my Intel Mac mini with success, here’s a couple of screenshots:
...
I then tried the same approach on my M1 Mac mini with not so good results! I spoke to Andy and he suggested the following additional commands:

sudo cp /Applications/SDRconnect.app/Content/MacOS/libusb-1.0.0.dylib /usr/local/lib/

(Note this requires SDRconnect to be installed first!)

On my machine the service did not start for some reason, so the following was added:

sudo launchctl load -w /Library/LaunchDaemons/com.sdrplay.service.plist
sudo launchctl enable system/com.sdrplay.service
sudo launchctl start system/com.sdrplay.service

You can check the service is running by doing this:

sudo launchctl list | grep -I sdr

After a reboot the service should run ok without further intervention.

All this aggravation will go away when Andy updates the API installer, but he’s (busy) with SDRconnect right now. But I’m sure he will publish something in a couple of weeks. Until then this is the best we can do. It works too!

@wx-jc
Copy link

wx-jc commented Nov 22, 2023

Hi Denny. This temporary workaround that you posted works! Thanks for sharing.

@DSheirer
Copy link
Owner

DSheirer commented Dec 1, 2023

Updated instructions added to the wiki for the Mac SDRPlay API version 3.12 here: https://github.com/DSheirer/sdrtrunk/wiki/FAQ

Closing issue.

@DSheirer DSheirer closed this as completed Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants