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

Apple Silicon / M1 builds? #1104

Closed
drwetter opened this issue Feb 9, 2022 · 14 comments · Fixed by #1388
Closed

Apple Silicon / M1 builds? #1104

drwetter opened this issue Feb 9, 2022 · 14 comments · Fixed by #1388
Labels

Comments

@drwetter
Copy link

drwetter commented Feb 9, 2022

Are there any plans to supply builds for the new architecture? Even hombrew fails (Bad CPU type in executable).

Are there any obstacles since qt6 works on aarch64?

@argilo
Copy link
Member

argilo commented Feb 9, 2022

I would like the macOS builds to have M1 support. I just don't have the expertise (or hardware) to work on this at the moment.

One obstacle is that the Gqrx build currently uses gnuradio from Homebrew, which does not support M1:

brew install airspy airspyhf boost dylibbundler gnuradio hackrf libbladerf librtlsdr libserialport portaudio pybind11 uhd qt@6

https://formulae.brew.sh/formula/gnuradio

One possibility would be to build Gqrx's dependencies from source, instead of installing them from Homebrew. This would slow down builds, but perhaps they could be sped up again using ccache.

If anyone has expertise in building software with M1 support, I'd appreciate help.

@argilo argilo added the feature label Feb 9, 2022
@drwetter
Copy link
Author

FYI (but probably doesn't help much): I tried yesterday to compile gnuradio via homebrew. It stopped when compiling volk as dependency (error when compiling volk_machine_neonv8.c. It did only state the clang command but not the actual error).

@vielmetti
Copy link

The "volk doesn't build on M1" issue is gnuradio/volk#428 upstream, which is said to be fixed by google/cpu_features@69d3993 reported in google/cpu_features#179 with a PR in google/cpu_features#209 - which as much to say that it might be worth revisiting this issue if indeed the problems are resolved.

@vielmetti
Copy link

I was just now able to install "volk" with Home-brew, getting this:

==> Pouring volk--2.5.1_1.arm64_monterey.bottle.tar.gz

and no errors.

@vielmetti
Copy link

Yup, and GNU Radio now installs OK

==> Pouring gnuradio--3.9.3.0_4.arm64_monterey.bottle.tar.gz

@dsegel
Copy link

dsegel commented Apr 16, 2022

I just installed v2.15.9 (I don't understand the version numbering) via homebrew (brew install gqrx) and it runs fine on my M1 MacBook Air. It's an Intel build.

==> Downloading https://github.com/gqrx-sdr/gqrx/releases/download/v2.15.9/Gqrx-2.15.9.dmg ==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/1033271/0074ad10-fcdb-4e9d-abac-c837c0 ######################################################################## 100.0% ==> Installing Cask gqrx ==> Moving App 'Gqrx.app' to '/Applications/Gqrx.app' ==> Linking Binary 'gqrx.wrapper.sh' to '/opt/homebrew/bin/gqrx' 🍺 gqrx was successfully installed!

@Forst
Copy link

Forst commented Jul 18, 2022

I gave a quick and dirty go at building Gqrx for M1. Looking at .github/workflow/build.yml, the only major difference is Homebrew is installed in /opt/homebrew on Apple Silicon platforms instead of /usr/local on Intel. This affects all mentions of /usr/local in the build scripts, and needs to be defined as the cmake install prefix for certain dependencies.

Built and tested on macOS 12.4. Tested with RTL-SDR (USB), seems to work alright:

Screenshot 2022-07-19 at 01 19 02

Screenshot 2022-07-19 at 01 21 23

I put together a build script from .github/workflow/build.yml and macos_bundle.sh, posted here: https://gist.github.com/Forst/db68106136be3380086e3c38be094d99

Note that I am a total noob when it comes to building apps for macOS, so I just changed things around until it worked :)

@danielktdoranie
Copy link

danielktdoranie commented Mar 3, 2023

I gave a quick and dirty go at building Gqrx for M1. Looking at .github/workflow/build.yml, the only major difference is Homebrew is installed in /opt/homebrew on Apple Silicon platforms instead of /usr/local on Intel. This affects all mentions of /usr/local in the build scripts, and needs to be defined as the cmake install prefix for certain dependencies.

Built and tested on macOS 12.4. Tested with RTL-SDR (USB), seems to work alright:

Screenshot 2022-07-19 at 01 19 02 Screenshot 2022-07-19 at 01 21 23

I put together a build script from .github/workflow/build.yml and macos_bundle.sh, posted here: https://gist.github.com/Forst/db68106136be3380086e3c38be094d99

Note that I am a total noob when it comes to building apps for macOS, so I just changed things around until it worked :)

Hey @Forst any hope of you dropping that .dmg file somewhere so I can try it?

@Forst
Copy link

Forst commented Mar 10, 2023

Hey @Forst any hope of you dropping that .dmg file somewhere so I can try it?

@danielktdoranie Here you go: https://drive.proton.me/urls/N8C7JTHZB0#HJbeqbOBA2HA. It's the same dmg from July last year, luckily I had it lying around.

Be wary of running programs from strangers on the internet. I posted the build script in my earlier comment so you could reproduce the results yourself with code you can audit/verify.

@danielktdoranie
Copy link

danielktdoranie commented Mar 11, 2023

Hey @Forst any hope of you dropping that .dmg file somewhere so I can try it?

@danielktdoranie Here you go: https://drive.proton.me/urls/N8C7JTHZB0#HJbeqbOBA2HA. It's the same dmg from July last year, luckily I had it lying around.

Be wary of running programs from strangers on the internet. I posted the build script in my earlier comment so you could reproduce the results yourself with code you can audit/verify.

@Forst Thanks. Yeah, I need to learn to compile programs myself but I really wish the developer would put this version up on the main webpage for SDR normies like myself. Thanks for providing this!

@argilo
Copy link
Member

argilo commented Apr 5, 2024

I see conda-forge has an osx-arm64 build: https://anaconda.org/conda-forge/gqrx

Gqrx Linux builds were recently switched over to conda (#1301), so perhaps conda could be a replacement for homebrew on macOS as well.

@kgarrels
Copy link

kgarrels commented Apr 5, 2024

I am building gqrx with radioconda on macOS 12, works without problem.
I am still using Intel, and I am using local builds, not github actions.

@kgarrels
Copy link

in the meantime, I switched to ARM, gqrx build and works fine with radioconda.
I use Qt5, Qt6 is not yet avaiable for mac on radioconda.

Can I help somhow? I am not experienced with github actions, but I can record all steps from a clean macos 14 install until build. Would that help?

@yuzawa-san
Copy link
Contributor

i gave my attempt at this in #1388 please try out the build artifacts. looks like they are still not signed in the PR build probably for security reasons. maybe the maintainers need to trigger a rerun so the secrets will populate. my friend had trouble opening the unsigned app in their arm64 sequoia environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants