[FFmpeg-trac] #3568(undetermined:new): Linker time bug, occurs when ffmpeg is configured and make with some restrictions
FFmpeg
trac at avcodec.org
Wed Apr 16 18:50:19 CEST 2014
#3568: Linker time bug, occurs when ffmpeg is configured and make with some
restrictions
-------------------------------------+-------------------------------------
Reporter: anhsoft | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
Bug occurs when ffmpeg is configured and make with some restrictions, as
that:
{{{
./configure --extra-ldflags="-Wl,-add-stdcall-alias" \
--enable-gpl \
--disable-optimizations \
--disable-asm \
--enable-memalign-hack \
--disable-programs \
--disable-everything \
--enable-muxer=avi \
--enable-demuxer=avi \
--enable-encoder=ffv1 \
--enable-decoder=ffv1
}}}
where 'avi muxer' is present and then static library 'libavformat.a' links
to any program using 'avformat'.
How to reproduce:
Configure and make ffmpeg-2.2.1 (in my case with gcc 4.8.1 on MinGW32 Win7
platform) as described above.
Get a ffmpeg static libs and link them to any program.
Linker message will be near such:
{{{
g++ -static -static-libgcc -static-libstdc++ -o main.exe main.o -lswscale
-lavformat -lavcodec -lavutil
D:\projects\libs\ffd\lib\libavformat.a(avienc.o): In function
`avi_write_header':
d:\ffmpeg/libavformat/avienc.c:317: undefined reference to
`av_convert_lang_to'
collect2.exe: error: ld returned 1 exit status
}}}
PS: as it is follows from error message, the function 'av_convert_lang_to'
isn't in 'libavformat.a' library. 'av_convert_lang_to' is declared and
implemented in avlanguage.h and avlanguage.c respectively, but for some
reason aren't makes with the specified configuration.
I manually corrected the Makefile in folder 'libavformat' of the ffmpeg
source, having changed a line
{{{
OBJS-$(CONFIG_AVI_MUXER) += avienc.o
}}}
to
{{{
OBJS-$(CONFIG_AVI_MUXER) += avienc.o avlanguage.o
}}}
and then the problem is solved...
--
Ticket URL: <https://trac.ffmpeg.org/ticket/3568>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list