Opened 6 years ago

Closed 5 years ago

#7479 closed defect (fixed)

MSYS2/MinGW64 install build for libavdevice fails with GCC 8.2.0

Reported by: LigH Owned by:
Priority: normal Component: build system
Version: git-master Keywords: win
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
MSYS2 install build for libavdevice fails with GCC 8.2.0 in MinGW64 (but passes with GCC 7.3.0 in MinGW32)

How to reproduce:
CFLAGS: -mthreads -mtune=generic -O2 -pipe
LDFLAGS: -pipe -static-libgcc -static-libstdc++
make install

CC	libavdevice/alldevices.o
In file included from H:/development/media-autobuild_suite-master/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.2.0/include/stddef.h:1,
                 from H:/development/media-autobuild_suite-master/msys64/mingw64/x86_64-w64-mingw32/include/inttypes.h:14,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/common.h:34,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/avutil.h:296,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/samplefmt.h:24,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavcodec/avcodec.h:31,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavformat/avformat.h:319,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavformat/internal.h:27,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavdevice/alldevices.c:23:
./config.h:17:19: error: expected identifier or '(' before 'void'
 #define getenv(x) NULL
                   ^~~~
./config.h:17:19: error: expected ')' before numeric constant
 #define getenv(x) NULL
                   ^~~~
make: *** [/build/ffmpeg-git/ffbuild/common.mak:60: libavdevice/alldevices.o] Error 1

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (5)

comment:1 by LigH, 6 years ago

Keywords: avdevice added

comment:2 by LigH, 6 years ago

Version: unspecifiedgit-master

comment:3 by LigH, 6 years ago

Second run of $ make V=1:

gcc -I. -I/build/ffmpeg-git/ -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 -D__printf__=__gnu_printf__ -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -I/build/ffmpeg-git/compat/atomics/dummy -DZLIB_CONST -DHAVE_AV_CONFIG_H -DBUILDING_avdevice -mthreads -mtune=generic -O2 -pipe   -std=c11 -fomit-frame-pointer  -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-const-variable -Wno-bool-operation -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized  -MMD -MF libavdevice/alldevices.d -MT libavdevice/alldevices.o -c -o libavdevice/alldevices.o /build/ffmpeg-git/libavdevice/alldevices.c
In file included from H:/development/media-autobuild_suite-master/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.2.0/include/stddef.h:1,
                 from H:/development/media-autobuild_suite-master/msys64/mingw64/x86_64-w64-mingw32/include/inttypes.h:14,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/common.h:34,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/avutil.h:296,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavutil/samplefmt.h:24,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavcodec/avcodec.h:31,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavformat/avformat.h:319,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavformat/internal.h:27,
                 from H:/development/media-autobuild_suite-master/build/ffmpeg-git/libavdevice/alldevices.c:23:
./config.h:17:19: error: expected identifier or '(' before 'void'
 #define getenv(x) NULL
                   ^~~~
./config.h:17:19: error: expected ')' before numeric constant
 #define getenv(x) NULL
                   ^~~~
make: *** [/build/ffmpeg-git/ffbuild/common.mak:60: libavdevice/alldevices.o] Error 1

(but I can't guarantee a valid result because I usually do not use the shell interactively, instead only in a batch which may have prepared details not available in an interactive shell)

I believe to remember from another patch in another project that GCC 8 expects an explicit cast to (void).

Last edited 6 years ago by LigH (previous) (diff)

comment:4 by Carl Eugen Hoyos, 5 years ago

Keywords: win added; MSYS2 MinGW64 GCC8 avdevice removed

Please provide your configure line.

comment:5 by LigH, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.