pothosware / SoapySDR

Vendor and platform neutral SDR support library.
https://github.com/pothosware/SoapySDR/wiki
Boost Software License 1.0
1.1k stars 176 forks source link

SoapySDR - can I build this for static linking into my application? #255

Closed fyngyrz closed 2 years ago

fyngyrz commented 4 years ago

Qt is acting cranky (okay, more like bewildered) about linking .dylibs, and aside from that, I'd just as soon not have yet more files cluttering up the various application installs for distribution to Windows, OSX, and Linux anyway.

How (or can) I go about creating a statically linkable libSoapySDR for my build?

zuckschwerdt commented 4 years ago

Did you consider the requirement for driver modules? E.g. CubicSDR bundles Soapy and modules. Perhaps something to investigate?

fyngyrz commented 4 years ago

You're talking about the plug-ins for the various SDRs now?

fyngyrz commented 4 years ago

I went to the SdrPlay site to try and get a downloadable module for the sdrplay, but first, their website menus are absolutely borked; they're just ghosted out, unselectable. I looked at the page source, and found the address of the downloads page (/downloads) and went there directly, clicked on the mac tab, and didn't see a module there for Soapy.

There's a way to build such a module, but surely end users and platform devs (like me!) aren't expected to do this?

My anticipation was that there would be a set of plugins one could get for any particular SDR, and that there would be a repo of same, somewhere.

I'm really new to this, so I may have this all wrong. :)

fyngyrz commented 4 years ago

more... okay, I found homebrew mechanisms to install modules - which apparently actually builds them in place, which is outright horrifying, but regardless, homebrew is regrettably OS-version-specific and declines to operate properly unless it has versions of the OS and XCode that Apple won't even allow to run on my hardware, so no module builds for me.

I must be approaching this all wrong? I hope?

fyngyrz commented 4 years ago

FWIW, I'm running with the dylibs now... but without modules, I'm at an impasse.

fyngyrz commented 4 years ago

I guess this is off topic for my original question about static builds; I'll open a new one...

zuckschwerdt commented 4 years ago

Generally you should be fine with dynamic linking when developing your app. Pull SoapySDR and the modules from Homebrew, MacPorts or just build and install (cmake). You'll likely need some hardware specific stuff (libmirsdrapi-rsp.dylib for SDRplay). If you want to distribute a complete app you'll need to package the libs or instruct your users to install them. TL;DR if Homebrew seems to intrusive (it's supposed to link to system libs) use MacPorts -- it's cleanly contained with little system deps.

fyngyrz commented 4 years ago

Pull SoapySDR and the modules from Homebrew

Homebrew is pretty broken under OSX 10.12.6, and/or the modules are, resulting in failure to build some modules (e.g. AirSpyHF won't build.)

if Homebrew seems to[o] intrusive

It's not that it's intrusive, it's that it doesn't actually succeed in building modules. Or the modules themselves are too OS-dependent. I guess it doesn't matter which; if they won't build, they won't build.

If you want to distribute a complete app you'll need to package the libs or instruct your users to install them.

Hm. So Soapy doesn't actually encapsulate SDR support, but depends upon further external resources. I was under a different impression; I'll have to think about this, it changes the nature of the project a bit, or at least, what modules I'm willing to include with the server. I have the RTL SDR module loading, so I'm at least off to some kind of a start. :)