ultravideo / uvg266

An open-source VVC encoder based on Kvazaar
BSD 3-Clause "New" or "Revised" License
225 stars 16 forks source link

Building in MSYS2/MinGW + GCC 11.3 failed (1. ninja; 2. intrinsics) #2

Closed LigH-de closed 2 years ago

LigH-de commented 2 years ago
  1. Your build sequence documented in the repo's readme generates not a makefile but a build.ninja instead; so you may replace make by ninja.
  2. Many files fail compiling, error messages relate to intrinsics. I guess this requires different configuration options? (I tested that in an interactive shell of an MSYS2/MinGW64 environment provided and kept up-to-date by the media-autobuild suite.)
    $ ninja > linja.log
    ...
    E:/MABS/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.3.0/include/tmmintrin.h:40:1: error: inlining failed in call to 'always_inline' '_mm_hadd_epi16': target specific option mismatch
    40 | _mm_hadd_epi16 (__m128i __X, __m128i __Y)
      | ^~~~~~~~~~~~~~
    E:/MABS/build/uvg266-git/src/strategies/sse41/alf-sse41.c:140:7: note: called from here
    140 |       _mm_storeu_si128((__m128i*) & colSums[i >> 1][j], _mm_hadd_epi16(t, all));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from E:/MABS/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.3.0/include/immintrin.h:39,
                 from E:/MABS/build/uvg266-git/src/strategies/sse41/alf-sse41.c:40:
    E:/MABS/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/11.3.0/include/smmintrin.h:166:1: error: inlining failed in call to 'always_inline' '_mm_blend_epi16': target specific option mismatch
    166 | _mm_blend_epi16 (__m128i __X, __m128i __Y, const int __M)
      | ^~~~~~~~~~~~~~~
    E:/MABS/build/uvg266-git/src/strategies/sse41/alf-sse41.c:139:25: note: called from here
    139 |       const __m128i t = _mm_blend_epi16(all, prev, 0xaa);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ...

    ninja.log

fador commented 2 years ago

Thanks for the report! I think we might need to add -msse4.1 compiler option to the relevant files..

fador commented 2 years ago

I pushed commit befdf9c789c4e84738c359efdae10ce93c4a02ce to the master that should fix the issue, can you verify?

Edit:

...and 6b3dd245f6384716d7e55bfdbf99e89c6e2e7ad9 clarifies the README

LigH-de commented 2 years ago

Yes, ninja builds, and uvg266.exe --help prints a verbose parameter list.