AlexandreRouma / SDRPlusPlus

Cross-Platform SDR Software
GNU General Public License v3.0
4.08k stars 562 forks source link

compile / install under MAC OSx #144

Closed aneitzel closed 3 years ago

aneitzel commented 3 years ago

Sorry then i use open a issue for that - but can you help in get SDR++ running on OSx please? A lot of users want to use it on MAC since SDR# was not able to do it. On platforms you list MacOS as suitable target and i waited for months now but dont see an update.

Thanks for help!

AlexandreRouma commented 3 years ago

Hello,

SDR++ already runs on OSX, you can download the latest build from here

It however has audio issues. Since I don't own a mac, I can't fix the issue myself for now.

darksidelemm commented 3 years ago

Worth noting that the OSX builds don't seem to include the dependencies as part of the bundle, and so unless the user has installed the packages in the particular location that the sdrpp binary is expecting, the package won't work.

It looks like the sdrpp binary is expecting libraries to be present in /usr/local/opt/, e.g. /usr/local/opt/glew/lib/libGLEW.2.2.dylib. An inspection of the github actions file confirms that homebrew was used to build, so I expect if the user doesn't have homebrew installed with those particular packages then it won't work. (I'm using Macports... )

There is a utility out there called dylib-bundler (https://github.com/auriamg/macdylibbundler ) which packages up the dependencies for a binary and produces an app bundle, which would probably be more portable than the binary you are shipping now. The FreeDV project uses this to produce OSX App bundles: https://github.com/drowe67/freedv-gui/blob/master/src/CMakeLists.txt#L117

Unfortunately I'm kind of in a bad place with my OSX install right now (old OSX version, old gcc) so I can't really test this...

AlexandreRouma commented 3 years ago

Yes, I prefer not including dependencies with the package. The users install what they need according to which devices they want to use.

SDR++ expects the binaries to be present wherever homebrew installs them.

I don't have a mac at all either so all the testing is done by some friends.

darksidelemm commented 3 years ago

Adding the dependencies means the package is bigger, but is much more portable. It's a very common technique in OSX packages (which is why they are often so big) to ensure they work everywhere. If you're not going to bundle dependencies... then there really isn't much point in providing an installer when by default it's not going to work unless a range of specific packages are installed.

We've had very good success doing app bundles with FreeDV, producing packages which work on a wide range of OSX versions. One package works on everything from OSX 10.12 through to 10.latest (noting there is a different build for M1), without requiring the user to install any other dependencies. Dylib-bundler is a bit clunky, and I see CubicSDR is doing things differently (looks like cmake can do app bundles now?! - https://github.com/cjcliffe/CubicSDR/blob/master/CMakeLists.txt#L719 ).