Normally, the compilation will target the base for the architecture in question (so, say, x64), and that doesn’t include AVX support since that isn’t required (it needs only SSE and SSE2). If however you’ve specified -march=native, then you’ll get a binary which takes advantage of the instructions available on your processor, and if it supports stuff like AVX2, the code generator could include these instructions, causing issues on earlier processors.
One of the reasons to use fancy libraries is that these often have runtime checks for processor capabilities, and are built with code paths optimised for different processor features, so enabling AVX2 for example, if it’s supported, but falling back to AVX, or SSE3 etc depending on the processor.
So, have a look to see if you’ve specified -march=native and if so, that’s the culprit