Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7555 closed defect (fixed)

FFmpeg failed to build libavutil/avsscanf.c with error C2061 with MSVC

Reported by: KarenHuang Owned by:
Priority: important Component: avutil
Version: git-master Keywords: msvc regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
FFmpeg failed to build libavutil/avsscanf.c(42): error C2061: syntax error: identifier 'off_t' when build with VS2017 on Windows. This issue can be first reproduced from master revision 4b30726. I think 'off_t' type maybe undeclared. Could you please help take a look at this? Thank you!

Steps to reproduce:
1.git clone ​https://github.com/FFmpeg/FFmpeg.git D:\FFmpeg\src
2.Open a VS 2017 x86 prompt and browse to D:\FFmpeg
3.set FFMPEG_TARGET=i386
4.set FFMPEG_SRC_PATH=D:\FFmpeg/src
5.set FFMPEG_FATE_PATH=../fate-suite/
6.set PATH=D:\FFmpeg\tools;%PATH%
7.set MSYS2_PATH_TYPE=inherit
8..\tools\msys32\usr\bin\sh.exe --login -i -c "/D/ffmpeg/tools/build.sh"

Actual result:
libavutil/avsscanf.c(42): error C2061: syntax error: identifier 'off_t'
libavutil/avsscanf.c(45): error C2059: syntax error: '}'
libavutil/avsscanf.c(56): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(56): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(56): error C2059: syntax error: ')'
libavutil/avsscanf.c(57): error C2054: expected '(' to follow 'f'
libavutil/avsscanf.c(62): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(62): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(62): error C2059: syntax error: 'type'
libavutil/avsscanf.c(62): error C2059: syntax error: ')'
libavutil/avsscanf.c(78): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(78): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(78): error C2059: syntax error: ')'
libavutil/avsscanf.c(79): error C2054: expected '(' to follow 'f'
libavutil/avsscanf.c(85): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(85): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(85): error C2146: syntax error: missing ';' before identifier 'lim'
libavutil/avsscanf.c(85): error C2059: syntax error: ')'
libavutil/avsscanf.c(86): error C2054: expected '(' to follow 'lim'
libavutil/avsscanf.c(96): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(96): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(96): error C2059: syntax error: ')'
libavutil/avsscanf.c(97): error C2054: expected '(' to follow 'f'
libavutil/avsscanf.c(138): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(138): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(138): error C2059: syntax error: 'type'
libavutil/avsscanf.c(138): error C2059: syntax error: ')'
libavutil/avsscanf.c(214): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(214): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(214): error C2059: syntax error: 'type'
libavutil/avsscanf.c(214): error C2059: syntax error: ')'
libavutil/avsscanf.c(247): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(247): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(247): error C2059: syntax error: 'type'
libavutil/avsscanf.c(247): error C2059: syntax error: ')'
libavutil/avsscanf.c(498): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(498): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(498): error C2059: syntax error: 'type'
libavutil/avsscanf.c(498): error C2059: syntax error: ')'
libavutil/avsscanf.c(611): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(611): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(611): error C2059: syntax error: 'type'
libavutil/avsscanf.c(611): error C2059: syntax error: ')'
libavutil/avsscanf.c(728): error C2143: syntax error: missing ')' before '*'
libavutil/avsscanf.c(728): error C2143: syntax error: missing '{' before '*'
libavutil/avsscanf.c(728): error C2059: syntax error: 'type'
libavutil/avsscanf.c(728): error C2059: syntax error: ')'
libavutil/avsscanf.c(955): error C2065: 'FFFILE': undeclared identifier
libavutil/avsscanf.c(955): error C2146: syntax error: missing ';' before identifier 'f'
libavutil/avsscanf.c(955): error C2059: syntax error: '{'
libavutil/avsscanf.c(960): warning C4013: 'ff_vfscanf' undefined; assuming extern returning int
make: * [ffbuild/common.mak:60: libavutil/avsscanf.o] Error 2

Attachments (1)

log_x86_build.log (206.1 KB ) - added by KarenHuang 6 years ago.
buildlog

Download all attachments as: .zip

Change History (4)

by KarenHuang, 6 years ago

Attachment: log_x86_build.log added

buildlog

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: fateavutil
Status: newopen

comment:2 by Carl Eugen Hoyos, 6 years ago

Resolution: fixed
Status: openclosed

Hopefully fixed by Paul in 277fd9c2ac729af8ae2e68666aeb5838639bd49a

comment:3 by KarenHuang, 6 years ago

Thanks for your feedback. We verified this issue has been fixed in master revision 277fd9c.

Note: See TracTickets for help on using tickets.