id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
1411,ffmpeg fails to compile with mp2 muxer enabled alone,jamal,,"The following configuration fails when linking the executables:

{{{
./configure --disable-everything --enable-muxer=mp2
}}}

The errors being:

{{{
LD      ffmpeg_g.exe
libavformat/libavformat.a(mp3enc.o): In function `mp3_queue_flush':
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:322: undefined reference to `ff_id3v2_finish'
libavformat/libavformat.a(mp3enc.o): In function `mp3_write_xing':
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:131: undefined reference to `avpriv_mpa_freq_tab'
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:131: undefined reference to `avpriv_mpa_freq_tab'
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:131: undefined reference to `avpriv_mpa_freq_tab'
libavformat/libavformat.a(mp3enc.o): In function `mp3_write_packet_internal':
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:282: undefined reference to `avpriv_mpegaudio_decode_header'
libavformat/libavformat.a(mp3enc.o): In function `mp3_write_xing':
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:158: undefined reference to `avpriv_mpegaudio_decode_header'
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:158: undefined reference to `avpriv_mpegaudio_decode_header'
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:158: undefined reference to `avpriv_mpegaudio_decode_header'
D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:158: undefined reference to `avpriv_mpegaudio_decode_header'
libavformat/libavformat.a(mp3enc.o):D:\MinGW\msys\1.0\home\jamal\ffmpeg/libavformat/mp3enc.c:158: more undefined references to `avpriv_mpegaudio_decode_header' follow
collect2: ld returned 1 exit status
make: *** [ffmpeg_g.exe] Error 1
}}}

The problem is that the files libavformat/id3v2enc.c libavcodec/mpegaudiodata.c and libavcodec/mpegaudiodecheader.c are not being compiled since the dependencies aren't set in both avformat's and avcodec's Makefiles

In avformat's Makefile
{{{
OBJS-$(CONFIG_MP2_MUXER)                 += mp3enc.o rawenc.o
}}}
should be
{{{
OBJS-$(CONFIG_MP2_MUXER)                 += mp3enc.o rawenc.o id3v2enc.o
}}}

And in avcodec's Makefile the following line needs to be added to the section for avformat dependencies
{{{
OBJS-$(CONFIG_MP2_MUXER)               += mpegaudiodata.o mpegaudiodecheader.o
}}}
----
Once again, part of the credit for finding this goes to Måns.",defect,closed,normal,build system,git-master,fixed,mp2,,,,1,0
