jgaeddert / liquid-dsp

digital signal processing library for software-defined radios
http://liquidsdr.org
MIT License
1.86k stars 436 forks source link

Build fails on Mac OS X Mavericks due to AVX instructions #48

Closed muellermartin closed 7 years ago

muellermartin commented 8 years ago

Despite the known fact that liquid-dsp does not build with LLVM/Clang (documented in the troubleshooting section), building liquid-dsp on a specific version of Mac OS X does fail with multiple errors like:

{standard input}:25:no such instruction: `vmovss LC1(%rip), %xmm2'

Currently the full error log available at: http://bot.brew.sh/job/Homebrew%20Core%20Pull%20Requests/4200/version=mavericks/testReport/junit/brew-test-bot/mavericks/install_liquid_dsp/

I don't know why this only happens on Mavericks (10.9.x) while building on Yosemite (10.10.x) and El Capitan (10.11.x) does work flawlessly when building with GCC instead of LLVM/Clang.

Possible fix: By adding the compiler flag -Wa,-q this issue can be resolved while it also works on newer versions of Mac OS X. This was suggested as a solution for a similar issue OP2/PyOP2#471 and this thread on StackOverflow.

Note: I came across this bug while submitting a package for Homebrew (third party package manager for OS X). The corresponding pull request is Homebrew/homebrew-core#2664

Update: This only affects version liquid-dsp 1.2.0 when building with GCC instead of LLVM/Clang

muellermartin commented 7 years ago

I just tested building liquid-dsp 1.3.0 on macOS 10.12.3 (Sierra) and this issue seems to be resolved.