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 M1 native build workaround #542

Closed
grbman opened this issue Dec 12, 2021 · 3 comments
Closed

Apple M1 native build workaround #542

grbman opened this issue Dec 12, 2021 · 3 comments

Comments

@grbman
Copy link

grbman commented Dec 12, 2021

Hi,
I was originally failing to build SDR++ for the M1 using brew (the main problem comes down to Volk, which relies on cpu_features where there is a bug that prevents it from compiling on M1.
However, there is an open pull request for a fix from user sbehnke and their forked repo of cpu_features
After a bit of trial and error, I was able to natively compile SDR++ using the instructions in the readme with a few more steps:

  • Clone the Volk repo
  • Change the submodule URL for cpu_features to sbehnke's repo, and resync the submodule
  • cmake, make, then make install Volk (it should now be able to succeed)
  • clone the SDR++ repo, and run cmake without the DOPT_BUILD_M17_DECODER on

Until Google's cpu_features pulls in the fix, the above is a workaround.
I'm not sure how to contribute this fix, since the problem is with a dependency. However, I wanted the info to be out there for others.

@grbman grbman changed the title Apple M1 native build Apple M1 native build workaround Dec 12, 2021
@grbman
Copy link
Author

grbman commented Dec 12, 2021

here's the link to the pull request that I mentioned above: google/cpu_features#150

@markc1984
Copy link

Thanks for this info. I've tried compiling Volk by changing the .gitmodules url for cpu_features to https://github.com/sbehnke/cpu_features.git and resyncing, but when I try to compile Volk I get this error message:

[ 11%] Building C object cpu_features/CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o
In file included from /Users//volk/cpu_features/src/cpuinfo_arm.c:15:
/Users/
/volk/cpu_features/include/cpuinfo_arm.h:118:2: error: "Including cpuinfo_arm.h from a non-arm target."
#error "Including cpuinfo_arm.h from a non-arm target."

Any ideas?

@AlexandreRouma
Copy link
Owner

since this just a tip for people facing this problem and is not a SDR++ bug, I'll close the issue. People interested in an actual fix will have to follow the cpu_features project instead.

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

No branches or pull requests

3 participants