Summary: | media-libs/opus-1.5.1-r1 error: inlining failed in call to ‘always_inline’ when avx2 is enabled without fma | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tdr <ted.d.rodgers> |
Component: | Current packages | Assignee: | Gentoo Sound Team <sound> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | allistar.m, ionen, steils, ted.d.rodgers |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | march=skylake build fail |
Description
tdr
2024-04-09 22:42:41 UTC
Created attachment 890126 [details]
march=skylake build fail
Looking at the code, more specifically this should only happen when have AVX2 enabled but FMA disabled (-march=skylake enables avx2 and fma, but then the passed -mno-fma disables fma). It's atypical to have a cpu that supports avx2 but not fma, albeit there are apparently some (we had similar issues with qtbase). As a minimal workaround, could do -mno-avx2 just for this package (haven't tried but don't see why it wouldn't work). As for a ebuild fix, code needs to either be improved upstream to handle this configuration -- or ebuild could do a workaround like we did in qt6-build.eclass which auto-passes -mno-avx2 *if* fma is not enabled. (In reply to Ionen Wolkens from comment #2) > As for a ebuild fix, code needs to either be improved upstream to handle > this configuration -- or ebuild could do a workaround like we did in > qt6-build.eclass which auto-passes -mno-avx2 *if* fma is not enabled. For a simpler version than the eclass, one could do something like (haven't tried it): tc-cpp-is-true 'defined(__FMA__)' ${CFLAGS} || append-flags $(test-flags-CC -mno-avx2) Could optionally guard behind use amd64 || x86, albeit test-flags-CC takes care of that too. (in case unclear, note that this can happen with -march=native if have such a cpu, so this is not necessarily about having -mno-fma in CFLAGS) I have this exact same issue and I can confirm that adding in a per package env file for opus with this in it fixes the problem: CFLAGS="${CFLAGS} -mno-avx2" |