ffmpeg 을 static libaray로 링크해서 사용하는 프로그램을 작성중에
라이브러리 다시 컴파일 해서 바꿔치기 하는데 이런 에러 발생!!
 
/ffmpeg-1.0/libavformat/swfdec.c:116: undefined reference to `inflateInit_'
./lib/libavformat.a(swfdec.o): In function `zlib_refill':
/ffmpeg-1.0/libavformat/swfdec.c:84: undefined reference to `inflate'
./lib/libavformat.a(swfdec.o): In function `swf_read_close':
/ffmpeg-1.0/libavformat/swfdec.c:278: undefined reference to `inflateEnd'
./lib/libavcodec.a(cscd.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/cscd.c:95: undefined reference to `uncompress'
./lib/libavcodec.a(dxa.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/dxa.c:236: undefined reference to `uncompress'
./lib/libavcodec.a(exr.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/exr.c:551: undefined reference to `uncompress'
./lib/libavcodec.a(flashsv.o): In function `flashsv_decode_block':
/ffmpeg-1.0/libavcodec/flashsv.c:165: undefined reference to `inflateReset'
./lib/libavcodec.a(flashsv.o): In function `flashsv2_prime':
/ffmpeg-1.0/libavcodec/flashsv.c:138: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/flashsv.c:140: undefined reference to `deflateInit_'
/ffmpeg-1.0/libavcodec/flashsv.c:145: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/flashsv.c:146: undefined reference to `deflateEnd'
/ffmpeg-1.0/libavcodec/flashsv.c:148: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/flashsv.c:154: undefined reference to `inflate'
./lib/libavcodec.a(flashsv.o): In function `flashsv_decode_block':
/ffmpeg-1.0/libavcodec/flashsv.c:177: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/flashsv.c:180: undefined reference to `inflateSync'
/ffmpeg-1.0/libavcodec/flashsv.c:181: undefined reference to `inflate'
./lib/libavcodec.a(flashsv.o): In function `calc_deflate_block_size':
/ffmpeg-1.0/libavcodec/flashsv.c:222: undefined reference to `deflateInit_'
/ffmpeg-1.0/libavcodec/flashsv.c:224: undefined reference to `deflateBound'
/ffmpeg-1.0/libavcodec/flashsv.c:225: undefined reference to `deflateEnd'
./lib/libavcodec.a(flashsv.o): In function `flashsv_decode_end':
/ffmpeg-1.0/libavcodec/flashsv.c:443: undefined reference to `inflateEnd'
./lib/libavcodec.a(flashsv.o): In function `flashsv_decode_init':
/ffmpeg-1.0/libavcodec/flashsv.c:112: undefined reference to `inflateInit_'
./lib/libavcodec.a(flashsv2enc.o): In function `encode_zlib':
/ffmpeg-1.0/libavcodec/flashsv2enc.c:355: undefined reference to `compress2'
./lib/libavcodec.a(flashsv2enc.o): In function `encode_zlibprime':
/ffmpeg-1.0/libavcodec/flashsv2enc.c:367: undefined reference to `deflateInit_'
/ffmpeg-1.0/libavcodec/flashsv2enc.c:376: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/flashsv2enc.c:385: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/flashsv2enc.c:386: undefined reference to `deflateEnd'
./lib/libavcodec.a(flashsvenc.o): In function `encode_bitstream':
/ffmpeg-1.0/libavcodec/flashsvenc.c:170: undefined reference to `compress2'
./lib/libavcodec.a(flashsvenc.o): In function `flashsv_encode_end':
/ffmpeg-1.0/libavcodec/flashsvenc.c:269: undefined reference to `deflateEnd'
./lib/libavcodec.a(lcldec.o): In function `zlib_decomp':
/ffmpeg-1.0/libavcodec/lcldec.c:137: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/lcldec.c:146: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/lcldec.c:137: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/lcldec.c:146: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/lcldec.c:137: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/lcldec.c:146: undefined reference to `inflate'
./lib/libavcodec.a(lcldec.o): In function `decode_end':
/ffmpeg-1.0/libavcodec/lcldec.c:638: undefined reference to `inflateEnd'
./lib/libavcodec.a(lcldec.o): In function `decode_init':
/ffmpeg-1.0/libavcodec/lcldec.c:612: undefined reference to `inflateInit_'
./lib/libavcodec.a(lclenc.o): In function `encode_frame':
/ffmpeg-1.0/libavcodec/lclenc.c:82: undefined reference to `deflateBound'
/ffmpeg-1.0/libavcodec/lclenc.c:96: undefined reference to `deflateReset'
/ffmpeg-1.0/libavcodec/lclenc.c:107: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/lclenc.c:113: undefined reference to `deflate'
./lib/libavcodec.a(lclenc.o): In function `encode_end':
/ffmpeg-1.0/libavcodec/lclenc.c:181: undefined reference to `deflateEnd'
./lib/libavcodec.a(lclenc.o): In function `encode_init':
/ffmpeg-1.0/libavcodec/lclenc.c:162: undefined reference to `deflateInit_'
./lib/libavcodec.a(pngdec.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/pngdec.c:424: undefined reference to `inflateInit_'
./lib/libavcodec.a(pngdec.o): In function `png_decode_idat':
/ffmpeg-1.0/libavcodec/pngdec.c:373: undefined reference to `inflate'
./lib/libavcodec.a(pngdec.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/pngdec.c:708: undefined reference to `inflateEnd'
./lib/libavcodec.a(pngenc.o): In function `png_write_chunk':
/ffmpeg-1.0/libavcodec/pngenc.c:185: undefined reference to `crc32'
/ffmpeg-1.0/libavcodec/pngenc.c:187: undefined reference to `crc32'
/ffmpeg-1.0/libavcodec/pngenc.c:190: undefined reference to `crc32'
./lib/libavcodec.a(pngenc.o): In function `png_write_row':
/ffmpeg-1.0/libavcodec/pngenc.c:205: undefined reference to `deflate'
./lib/libavcodec.a(pngenc.o): In function `encode_frame':
/ffmpeg-1.0/libavcodec/pngenc.c:291: undefined reference to `deflateInit2_'
/ffmpeg-1.0/libavcodec/pngenc.c:296: undefined reference to `deflateBound'
/ffmpeg-1.0/libavcodec/pngenc.c:400: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/pngenc.c:425: undefined reference to `deflateEnd'
./lib/libavcodec.a(svq3.o): In function `svq3_decode_init':
/ffmpeg-1.0/libavcodec/svq3.c:915: undefined reference to `uncompress'
./lib/libavcodec.a(tiff.o): In function `tiff_uncompress':
/ffmpeg-1.0/libavcodec/tiff.c:339: undefined reference to `inflateInit_'
/ffmpeg-1.0/libavcodec/tiff.c:344: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/tiff.c:345: undefined reference to `inflateEnd'
./lib/libavcodec.a(tiffenc.o): In function `encode_strip':
/ffmpeg-1.0/libavcodec/tiffenc.c:177: undefined reference to `compress'
./lib/libavcodec.a(tscc.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/tscc.c:89: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/tscc.c:98: undefined reference to `inflate'
./lib/libavcodec.a(tscc.o): In function `decode_end':
/ffmpeg-1.0/libavcodec/tscc.c:198: undefined reference to `inflateEnd'
./lib/libavcodec.a(tscc.o): In function `decode_init':
/ffmpeg-1.0/libavcodec/tscc.c:174: undefined reference to `inflateInit_'
./lib/libavcodec.a(zerocodec.o): In function `zerocodec_decode_frame':
/ffmpeg-1.0/libavcodec/zerocodec.c:55: undefined reference to `inflateReset'
/ffmpeg-1.0/libavcodec/zerocodec.c:80: undefined reference to `inflate'
./lib/libavcodec.a(zerocodec.o): In function `zerocodec_decode_close':
/ffmpeg-1.0/libavcodec/zerocodec.c:115: undefined reference to `inflateEnd'
./lib/libavcodec.a(zerocodec.o): In function `zerocodec_decode_init':
/ffmpeg-1.0/libavcodec/zerocodec.c:142: undefined reference to `inflateInit_'
./lib/libavcodec.a(zmbv.o): In function `decode_frame':
/ffmpeg-1.0/libavcodec/zmbv.c:513: undefined reference to `inflate'
/ffmpeg-1.0/libavcodec/zmbv.c:484: undefined reference to `inflateReset'
./lib/libavcodec.a(zmbv.o): In function `decode_end':
/ffmpeg-1.0/libavcodec/zmbv.c:667: undefined reference to `inflateEnd'
./lib/libavcodec.a(zmbv.o): In function `decode_init':
/ffmpeg-1.0/libavcodec/zmbv.c:643: undefined reference to `inflateInit_'
./lib/libavcodec.a(zmbvenc.o): In function `encode_frame':
/ffmpeg-1.0/libavcodec/zmbvenc.c:226: undefined reference to `deflate'
/ffmpeg-1.0/libavcodec/zmbvenc.c:217: undefined reference to `deflateReset'
./lib/libavcodec.a(zmbvenc.o): In function `encode_end':
/ffmpeg-1.0/libavcodec/zmbvenc.c:332: undefined reference to `deflateEnd'
./lib/libavcodec.a(zmbvenc.o): In function `encode_init':
/ffmpeg-1.0/libavcodec/zmbvenc.c:309: undefined reference to `deflateInit_'
./lib/libavformat.a(id3v2.o): In function `ff_id3v2_parse':
/ffmpeg-1.0/libavformat/id3v2.c:686: undefined reference to `uncompress'
./lib/libavformat.a(matroskadec.o): In function `matroska_decode_buffer':
/ffmpeg-1.0/libavformat/matroskadec.c:1101: undefined reference to `inflateInit_'
/ffmpeg-1.0/libavformat/matroskadec.c:1116: undefined reference to `inflate'
/ffmpeg-1.0/libavformat/matroskadec.c:1109: undefined reference to `inflateEnd'
/ffmpeg-1.0/libavformat/matroskadec.c:1121: undefined reference to `inflateEnd'
./lib/libavformat.a(mov.o): In function `mov_read_cmov':
/ffmpeg-1.0/libavformat/mov.c:2605: undefined reference to `uncompress'
./lib/libavformat.a(rtmpproto.o): In function `rtmp_uncompress_swfplayer':
/ffmpeg-1.0/libavformat/rtmpproto.c:995: undefined reference to `inflateInit_'
/ffmpeg-1.0/libavformat/rtmpproto.c:1005: undefined reference to `inflate'
/ffmpeg-1.0/libavformat/rtmpproto.c:1023: undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
make: *** [all] 오류 1

ffmpeg 옵션을 찾아보니 zlib / bzlib에 대한 옵션에 존재하는데
문제는 --disable-all을 해도 이녀석은 autodetect 라서 강제로 활성화 되는 것으로 보여진다.
그래서! 강제로 --disagle-zlib --disable-bzlib를 해주고
생성되는 .a 파일들을 다시 링크하니 위와 같은 문제 해결!

./configure --help
  --enable-bzlib           enable bzlib [autodetect]
  --enable-zlib            enable zlib [autodetect] 


'프로그램 사용 > ffmpeg & ffserver' 카테고리의 다른 글

Mplayer 캐시 설정  (0) 2014.11.06
Mplayer 1.1 / ffmpeg 0.10.2 git  (0) 2014.10.22
MPlayer 1.1 크로스컴파일  (0) 2014.10.08
live555 관련링크  (0) 2014.10.07
ASLA 입출력 - mplayer / ffmpeg  (0) 2014.09.29
Posted by 구차니