Opened 9 years ago
Closed 9 years ago
#391 closed defect (invalid)
multiple definition of `_DXVA2_Fixed32OpaqueAlpha'
Reported by: | KSHawkEye | Owned by: | michael |
---|---|---|---|
Priority: | critical | Component: | avcodec |
Version: | git | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
I'm getting the following error while trying to compile the latest FFmpeg with MinGW-w64:
libavcodec/libavcodec.a(dxva2_mpeg2.o):dxva2_mpeg2.c:(.text+0x7d0): multiple definition of `_DXVA2_Fixed32OpaqueAlpha' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1870): first defined here libavcodec/libavcodec.a(dxva2_mpeg2.o):dxva2_mpeg2.c:(.text+0x7e0): multiple definition of `_DXVA2_Fixed32TransparentAlpha' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1880): first defined here libavcodec/libavcodec.a(dxva2_mpeg2.o):dxva2_mpeg2.c:(.text+0x7f0): multiple definition of `_DXVA2FixedToFloat' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1890): first defined here libavcodec/libavcodec.a(dxva2_mpeg2.o):dxva2_mpeg2.c:(.text+0x830): multiple definition of `_DXVA2FloatToFixed' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x18d0): first defined here libavcodec/libavcodec.a(dxva2.o):dxva2.c:(.text+0x170): multiple definition of `_DXVA2_Fixed32OpaqueAlpha' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1870): first defined here libavcodec/libavcodec.a(dxva2.o):dxva2.c:(.text+0x180): multiple definition of `_DXVA2_Fixed32TransparentAlpha' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1880): first defined here libavcodec/libavcodec.a(dxva2.o):dxva2.c:(.text+0x190): multiple definition of `_DXVA2FixedToFloat' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x1890): first defined here libavcodec/libavcodec.a(dxva2.o):dxva2.c:(.text+0x1d0): multiple definition of `_DXVA2FloatToFixed' libavcodec/libavcodec.a(dxva2_h264.o):dxva2_h264.c:(.text+0x18d0): first defined here collect2: ld returned 1 exit status make: *** [ffmpeg_g.exe] Error 1
make V=1 shows:
i686-w64-mingw32-gcc -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Wl,--as-needed -Wl,--warn-common -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil -o ffmpeg_g.exe ffmpeg.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswscale -lavutil -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -lws2_32 -lm -lpthread -lpsapi
I'm using GCC 4.6.1 to compile, I believe the issue could be on MinGW-w64s end, but I'm not sure because I had no other issues compiling other software with the toolchain.
Attachments (1)
Change History (7)
comment:1 Changed 9 years ago by cehoyos
- Component changed from FFmpeg to avcodec
- Status changed from new to open
Changed 9 years ago by KSHawkEye
comment:2 Changed 9 years ago by KSHawkEye
--enable-shared was not used, this is the command line used to configure:
../source/ffmpeg-git/configure --enable-gpl --enable-version3 --enable-runtime-cpudetect --cross-prefix=i686-w64-mingw32- --target-os=mingw32 --arch=x86 --disable-debug
I'm not sure if it's directly related to dxva2api.h, DXVA2_Fixed32OpaqueAlpha can be found inside.
Header attached.
comment:3 Changed 9 years ago by cehoyos
Afaict, the functions (that currently only use forceinline) defined in dxva2api.h all have to be defined "static" (as it is done in many internal FFmpeg headers, for example libavformat/network.h).
Could you report this to the w64 mingw-runtime developers?
(Or am I missing something?)
An alternative would be be to try
#undef __forceinline #define __forceinline static av_always_inline
before including the header.
comment:4 Changed 9 years ago by KSHawkEye
I contacted mingw-w64, they say a fix is on the way.
I'll report back once I have a successful build and this bug can be resolved.
comment:5 Changed 9 years ago by KSHawkEye
This bug has been resolved.
comment:6 Changed 9 years ago by cehoyos
- Resolution set to invalid
- Status changed from open to closed
Does it work without --enable-shared?
Am I correct that the problem is related to <dxva2api.h>? (Are the symbols in question defined there?)
If yes, could you attach the header?