Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8986 closed defect (fixed)

Compilation fails on x86 when only mmx optimizations are enabled

Reported by: maikenakka Owned by:
Priority: normal Component: swscale
Version: git-master Keywords: regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

I ran configure with every cpu optimization disabled except for mmx. This results in the following errors with GCC 9.3.0:

CC      libswscale/x86/yuv2rgb.o
libswscale/x86/yuv2rgb.c: In function "ff_yuv2rgb_init_x86":
libswscale/x86/yuv2rgb.c:91:24: error: "yuva420_rgb32_ssse3" undeclared (first use in this function); did you mean "yuva420_rgb32_mmx"?
   91 |                 return yuva420_rgb32_ssse3;
      |                        ^~~~~~~~~~~~~~~~~~~
      |                        yuva420_rgb32_mmx
libswscale/x86/yuv2rgb.c:91:24: note: each undeclared identifier is reported only once for each function it appears in
libswscale/x86/yuv2rgb.c:95:24: error: "yuv420_rgb32_ssse3" undeclared (first use in this function); did you mean "yuv420_rgb32_mmx"?
   95 |                 return yuv420_rgb32_ssse3;
      |                        ^~~~~~~~~~~~~~~~~~
      |                        yuv420_rgb32_mmx
libswscale/x86/yuv2rgb.c:99:24: error: "yuva420_bgr32_ssse3" undeclared (first use in this function); did you mean "yuva420_bgr32_mmx"?
   99 |                 return yuva420_bgr32_ssse3;
      |                        ^~~~~~~~~~~~~~~~~~~
      |                        yuva420_bgr32_mmx
libswscale/x86/yuv2rgb.c:103:24: error: "yuv420_bgr32_ssse3" undeclared (first use in this function); did you mean "yuv420_bgr32_mmx"?
  103 |                 return yuv420_bgr32_ssse3;
      |                        ^~~~~~~~~~~~~~~~~~
      |                        yuv420_bgr32_mmx
libswscale/x86/yuv2rgb.c:105:20: error: "yuv420_rgb24_ssse3" undeclared (first use in this function); did you mean "yuv420_rgb24_mmx"?
  105 |             return yuv420_rgb24_ssse3;
      |                    ^~~~~~~~~~~~~~~~~~
      |                    yuv420_rgb24_mmx
libswscale/x86/yuv2rgb.c:107:20: error: "yuv420_bgr24_ssse3" undeclared (first use in this function); did you mean "yuv420_bgr24_mmx"?
  107 |             return yuv420_bgr24_ssse3;
      |                    ^~~~~~~~~~~~~~~~~~
      |                    yuv420_bgr24_mmx
libswscale/x86/yuv2rgb.c:109:20: error: "yuv420_rgb16_ssse3" undeclared (first use in this function); did you mean "yuv420_rgb16_mmx"?
  109 |             return yuv420_rgb16_ssse3;
      |                    ^~~~~~~~~~~~~~~~~~
      |                    yuv420_rgb16_mmx
libswscale/x86/yuv2rgb.c:111:20: error: "yuv420_rgb15_ssse3" undeclared (first use in this function); did you mean "yuv420_rgb15_mmx"?
  111 |             return yuv420_rgb15_ssse3;
      |                    ^~~~~~~~~~~~~~~~~~
      |                    yuv420_rgb15_mmx
libswscale/x86/yuv2rgb.c:118:20: error: "yuv420_rgb24_mmxext" undeclared (first use in this function); did you mean "yuv420_rgb24_mmx"?
  118 |             return yuv420_rgb24_mmxext;
      |                    ^~~~~~~~~~~~~~~~~~~
      |                    yuv420_rgb24_mmx
libswscale/x86/yuv2rgb.c:120:20: error: "yuv420_bgr24_mmxext" undeclared (first use in this function); did you mean "yuv420_bgr24_mmx"?
  120 |             return yuv420_bgr24_mmxext;
      |                    ^~~~~~~~~~~~~~~~~~~
      |                    yuv420_bgr24_mmx
make: *** [ffbuild/common.mak:67: libswscale/x86/yuv2rgb.o] Error 1

These are my configure options:
./configure --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --docdir=/usr/share/doc/ffmpeg-4.3.1/html --mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc --cxx=i686-pc-linux-gnu-g++ --ar=i686-pc-linux-gnu-ar --nm=i686-pc-linux-gnu-nm --ranlib=i686-pc-linux-gnu-ranlib --pkg-config=i686-pc-linux-gnu-pkg-config --optflags='-O2 -march=native -pipe -fomit-frame-pointer' --disable-static --enable-avfilter --enable-avresample --disable-stripping --disable-optimizations --disable-libcelt --disable-indev=v4l2 --disable-outdev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-gcrypt --enable-gnutls --disable-gmp --enable-gpl --disable-hardcoded-tables --enable-iconv --disable-libtls --disable-libxml2 --disable-lzma --enable-network --disable-opencl --disable-openssl --enable-postproc --disable-libsmbclient --disable-ffplay --disable-sdl2 --disable-vaapi --disable-vdpau --disable-vulkan --disable-xlib --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --enable-zlib --enable-libcdio --disable-libiec61883 --disable-libdc1394 --enable-libcaca --disable-openal --disable-opengl --disable-libv4l2 --disable-libpulse --disable-libdrm --disable-libjack --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libcodec2 --enable-libdav1d --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libgme --disable-libgsm --disable-libaribb24 --disable-mmal --disable-libmodplug --disable-libopus --disable-libilbc --disable-librtmp --disable-libssh --disable-libspeex --disable-libsrt --disable-librsvg --disable-ffnvcodec --enable-libvorbis --disable-libvpx --disable-libzvbi --disable-appkit --disable-libbs2b --disable-chromaprint --disable-cuda-llvm --disable-libflite --disable-frei0r --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --disable-libtesseract --disable-lv2 --disable-libfreetype --disable-libvidstab --disable-librubberband --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar --disable-libaom --disable-libopenh264 --disable-librav1e --disable-libsnappy --disable-libtheora --disable-libtwolame --disable-libwebp --disable-libx264 --disable-libx265 --disable-libxvid --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-neon --disable-vfp --disable-vfpv3 --disable-armv8 --disable-mipsdsp --disable-mipsdspr2 --disable-mipsfpu --disable-altivec --disable-vsx --disable-power8 --disable-amd3dnow --disable-amd3dnowext --disable-aesni --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-mmxext --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop --cpu=host --disable-doc --disable-htmlpages --enable-manpages

It compiles fine if MMX is disabled as well.
This was on commit 5bb313e72...
Same error shows up in 4.3.1

Change History (3)

comment:1 by Carl Eugen Hoyos, 3 years ago

Description: modified (diff)
Keywords: regression added
Reproduced by developer: set
Resolution: fixed
Status: newclosed

Should be fixed in 46e362b76551d6587747e6a41e97b1673df2ada9, thank you for the report!

For future tickets, please try hard to simplify the configure line, in this case for example --disable-mmxext and --disable-ssse3
And please understand that your configure line looks completely insane, are you sure that you know what you are doing?

comment:2 by maikenakka, 3 years ago

Thank you. The insane config line was generated by Gentoo.

in reply to:  2 comment:3 by Carl Eugen Hoyos, 3 years ago

Replying to maikenakka:

Thank you. The insane config line was generated by Gentoo.

Yes, I thought so, this is a known issue for a long time. Apart from the obvious debugging difficulties, the problem is always that a very slow binary is created although some details in the configure line make me think that this is not completely intentional. The general rule of thumb is not to use --optflags (the option is needed for rare compilers) and not to use any --disable-* options (they only exist as debug options or because they automatically come with the corresponding enabling options).

Note: See TracTickets for help on using tickets.