Opened 12 years ago

Closed 12 years ago

#1440 closed defect (fixed)

MinGW32 Builds Fail

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

Description (last modified by mbradshaw)

Building with MinGW32 fails. FATE test shows the failure. Also fails for me on my Windows 7 MinGW build system.

git bisect shows this was introduced with commit 5db5169e46a5f1676aafb82ec8c3f5dc6fb6bb6d, "avconv: multithreaded demuxing." However, I don't think this commit is the root of the problem. The reported compile error, for those who haven't checked the FATE test, is:

CC	ffmpeg.o
/home/fate/fate/src/ffmpeg.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
/home/fate/fate/src/ffmpeg.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
In file included from /home/fate/fate/src/ffmpeg.c:93:0:
/home/fate/fate/src/libavcodec/w32pthreads.h:67:37: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'win32thread_worker'
/home/fate/fate/src/libavcodec/w32pthreads.h: In function 'pthread_create':
/home/fate/fate/src/libavcodec/w32pthreads.h:79:60: error: 'win32thread_worker' undeclared (first use in this function)
/home/fate/fate/src/libavcodec/w32pthreads.h:79:60: note: each undeclared identifier is reported only once for each function it appears in
/home/fate/fate/src/ffmpeg.c: In function 'opt_recording_timestamp':
/home/fate/fate/src/ffmpeg.c:4032:5: warning: unknown conversion type character 'F' in format [-Wformat]
/home/fate/fate/src/ffmpeg.c:4032:5: warning: unknown conversion type character 'T' in format [-Wformat]
/home/fate/fate/src/ffmpeg.c: At top level:
/home/fate/fate/src/libavcodec/w32pthreads.h:150:13: warning: 'pthread_cond_destroy' defined but not used [-Wunused-function]
/home/fate/fate/src/libavcodec/w32pthreads.h:166:13: warning: 'pthread_cond_broadcast' defined but not used [-Wunused-function]
/home/fate/fate/src/libavcodec/w32pthreads.h:254:13: warning: 'w32thread_init' defined but not used [-Wunused-function]
/home/fate/fate/src/ffmpeg.c:1533:12: warning: 'check_recording_time' defined but not used [-Wunused-function]

Replacing attribute_align_arg with __attribute__((force_align_arg_pointer)) in libavcodec/w32pthreads.h fixes the error. Including libavutil/internal.h also seems to fix this error, but introduces new errors in ffmpeg.c (because of things like printf).

I'm not sure what the best solution is (attribute_align_arg is needed and it's defined in libavutil/internal.h, but ffmpeg.c can't include that file), and will leave it up to others to determine that.

Change History (3)

comment:1 by mbradshaw, 12 years ago

Description: modified (diff)

comment:2 by mbradshaw, 12 years ago

Description: modified (diff)

comment:3 by Carl Eugen Hoyos, 12 years ago

Component: undeterminedFFmpeg
Keywords: win added
Resolution: fixed
Status: newclosed

I suspect this is fixed now.

Note: See TracTickets for help on using tickets.