-mavx audio optimizer: Is it Optional?


Flame, the Raspberry Pi nutcase, here!

So I went back to compiling High Fidelity on the Pi, and after spending 3 days compiling Qt5.6… I learned the hard way High Fidelity doesn’t like OpenGLES (woops). My Assignment client failed at 99% and I pretty much put the project away.

So this weekend, I got myself an ODROID-C2 to get around my lack of memory issue (2GB of DDR3) and went ahead compiling Qt5.6, this time without GLES. Sure enough, it took 12 hours of me having to restart the compiler (I have yet to find out why this happens, but it seems to be an I/O error in GCC). I gleefully download High Fidelity, make the build folder, and smile when the domain-server compiled just fine. In a serious note, I have yet to EVER have a failure on the domain-server on any of my Pi builds, including this one I’m about to talk about:

Attempting to compile the Assignment Client resulted in… failure at 49%?

[ 49%] Building CXX object libraries/audio/CMakeFiles/audio.dir/src/avx/AudioHRTF_avx.cpp.o c++: error: unrecognized command line option '-mavx' make[3]: *** [libraries/audio/CMakeFiles/audio.dir/src/avx/AudioHRTF_avx.cpp.o] Error 1 make[2]: *** [libraries/audio/CMakeFiles/audio.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs....

Welp, in my lack of research, I figured it was just my ODROID-C2. So I pulled my Pi2 back from the project bin, recompiled Qt5.6 (About 14 hours this time), and told High Fidelity to compile! Surely it should work, since the last time, it was just due to me compiling Qt in a way High Fidelity didn’t like.

Same error.

So, now that I looked it up, I can see it’s an optimizer for x86 platforms. Before I go ripping the poor makefile apart, is this optimizer REALLY needed? It would appear that rebuilding caused it to download newer libraries, meaning this entry is recent. I figured I’d ask the experts on this first.


After reading through the changes, and reading some tutorials on how to write CMake stuff, I found out how to remove the option and… it works! I’ll have to revive my ODROID-C2 and give it a go. I’ll be looking at how to check for -MAVX and /arch:AVX, since at the moment, it seems cmake just assumes you have it.