[FFmpeg-devel] [PATCH] ffbuild/common.mak: Fix for windres in binutils-2.36.1

Hendrik Leppkes h.leppkes at gmail.com
Sun May 16 02:28:50 EEST 2021


On Sat, May 15, 2021 at 8:15 PM James Almer <jamrial at gmail.com> wrote:
>
> On 5/15/2021 1:49 PM, Tee KOBAYASHI wrote:
> > The attached patch fixes a problem when building for Mingw-w64 using
> > binutils-2.36.1:
> >
> > x86_64-w64-mingw32-windres -I. -Isrc/ --preprocessor
> > "x86_64-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF
> > libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o" -o
> > libavdevice/avdeviceres.o
> > /usr/x86_64-w64-mingw32/tmp/portage/media-video/ffmpeg-4.3.2/work/ffmpeg-4.3.2/libavdevice/avdeviceres.rc
> > sh: line 1: x86_64-w64-mingw32-gcc -E -xc-header -DRC_INVOKED -MMD -MF
> > libavdevice/avdeviceres.d -MT libavdevice/avdeviceres.o: No such file
> > or directory
> > x86_64-w64-mingw32-windres: preprocessing failed.
> > make: *** [/usr/x86_64-w64-mingw32/tmp/portage/media-video/ffmpeg-4.3.2/work/ffmpeg-4.3.2/ffbuild/common.mak:85:
> > libavdevice/avdeviceres.o] Error 1
>
> I can't reproduce this on a msys2 environment. Is this problem only
> affecting cross compiling scenarios?
>
> Your patch nonetheless also works on it, so it may be acceptable. Is
> --preprocessor-arg available in old binutils' windres?

--preprocessor-arg was added to binutils in 2011, so probably old enough.

I am however puzzled by the problem, since the documentation clearly
states that you can in fact use --preprocessor to pass any arguments.

- Hendrik


More information about the ffmpeg-devel mailing list