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

BUILD: target specific option mismatch #371

Closed
goodpaperman opened this issue May 7, 2024 · 3 comments · Fixed by #373
Closed

BUILD: target specific option mismatch #371

goodpaperman opened this issue May 7, 2024 · 3 comments · Fixed by #373
Labels

Comments

@goodpaperman
Copy link

see detail:
transmission/transmission#6820

version 1.20, back to 1.18 can pass compile, what's wrong..

@ebiggers
Copy link
Owner

ebiggers commented May 7, 2024

/ext/tools/gcc-8.2/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include/vpclmulqdqintrin.h:90:1: error: inlining failed in call to always_inline ‘_mm256_clmulepi64_epi128’: target specific option mismatch
_mm256_clmulepi64_epi128 (__m256i __A, __m256i __B, const int __C)

It looks like the problem is that gcc 8.2 has a bug where it assumes that the 256-bit wide vpclmulqdq (carryless multiplication) intrinsic depends on AVX512 support. In fact, it should only depend on AVX. This was fixed in gcc 9.1 (gcc-mirror/gcc@a62fd9d) and backported to gcc 8.3 (gcc-mirror/gcc@8604d90). This fix was merged over 5 years ago.

To avoid this bug, I'll make libdeflate only build crc32_x86_vpclmulqdq_avx2() if gcc is 8.3 or later (if the compiler is gcc), instead of 8.1 or later as it currently does.

As always I would also encourage you to upgrade your compiler. It's free!

@ebiggers
Copy link
Owner

ebiggers commented May 7, 2024

#373 should fix this by disabling some of the optimized CRC-32 code with gcc 8.1 and gcc 8.2.

@goodpaperman
Copy link
Author

Thanks a million

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

Successfully merging a pull request may close this issue.

2 participants