Opened 13 years ago
Closed 13 years ago
#989 closed defect (fixed)
Linking ffplay fails if --disable-swresample is used
Reported by: | Hanspeter Niederstrasser | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | build system |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
When linking ffplay on OS X with latest git using --disable-libswresample, this failure occurs:
clang -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,-dynamic,-search_paths_first -o ffplay_g ffplay.o cmdutils.o -lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswscale -lavutil -lX11 -lXext -lXfixes -lcdio_paranoia -lcdio_cdda -lcdio -ljack -L/sw/lib -Wl,-framework,Cocoa -lSDLmain -lSDL -lxvidcore -lx264 -lvpx -lvpx -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lspeex -L/sw/lib -lschroedinger-1.0 -lpthread -loil-0.3 -L/sw/lib -lrtmp -lssl -lcrypto -lz -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lmodplug -L/sw/lib -lfreetype -L/sw/lib -ldirac_encoder -ldirac_decoder -lm -lstdc++ -lcelt0 -lcelt0 -L/sw/lib -lass -lm -framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore -lbz2 -lz -L/sw/lib -L/usr/X11/lib -L/sw/lib -Wl,-framework,Cocoa -lSDLmain -lSDL ld: warning: directory not found for option '-Llibswresample' Undefined symbols for architecture x86_64: "_swr_free", referenced from: _stream_component_close in ffplay.o _sdl_audio_callback in ffplay.o "_swr_alloc_set_opts", referenced from: _sdl_audio_callback in ffplay.o "_swr_init", referenced from: _sdl_audio_callback in ffplay.o "_swr_set_compensation", referenced from: _sdl_audio_callback in ffplay.o "_swr_convert", referenced from: _sdl_audio_callback in ffplay.o ld: symbol(s) not found for architecture x86_64
Linking libavfilter.dylib similarly fails when --disable-swscale is used.
The following fixes both of these issues:
diff --git a/configure b/configure index 525092d..4c3aa07 100755 --- a/configure +++ b/configure @@ -1674,11 +1674,12 @@ yadif_filter_deps="gpl" # libraries avdevice_deps="avcodec avformat" +avfilter_deps="swscale" avformat_deps="avcodec" postproc_deps="gpl" # programs -ffplay_deps="avcodec avformat swscale sdl" +ffplay_deps="avcodec avformat swscale swresample sdl" ffplay_select="buffersink_filter rdft" ffprobe_deps="avcodec avformat" ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
Change History (5)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
With --disable-swscale in ./configure:
LD libavfilter/libavfilter.2.dylib ld: warning: directory not found for option '-Llibswscale' Undefined symbols for architecture x86_64: "_sws_convertPalette8ToPacked32", referenced from: _put_image in vf_palette.o "_sws_convertPalette8ToPacked24", referenced from: _put_image in vf_palette.o "_sws_freeContext", referenced from: _uninit in vf_sab.o _uninit in vf_screenshot.o _uninit in vf_smartblur.o "_sws_scale", referenced from: _blur in vf_sab.o _put_image in vf_screenshot.o _draw_slice in vf_screenshot.o _blur in vf_smartblur.o "_sws_getGaussianVec", referenced from: _allocStuff in vf_sab.o _config in vf_smartblur.o "_sws_getContext", referenced from: _allocStuff in vf_sab.o _config in vf_smartblur.o _sws_getContextFromCmdLine in vf_mp.o (maybe you meant: _sws_getContextFromCmdLine) "_sws_freeVec", referenced from: _allocStuff in vf_sab.o _config in vf_smartblur.o "_sws_scaleVec", referenced from: _config in vf_smartblur.o ld: symbol(s) not found for architecture x86_64
comment:3 by , 13 years ago
Oops. needs to be a bit more than just --disable-swscale. Here's my usual configure. I'll try to get a minimal test case.
--prefix=/usr/local/ffmpeg-git --disable-static --enable-shared --enable-gpl --enable-version3 --enable-pthreads --enable-x11grab --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libcdio --enable-libdirac --enable-libfreetype --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-zlib --extra-cflags='-I/sw/include -I/usr/X11/include' --extra-libs='-L/sw/lib -L/usr/X11/lib' --cc=clang
comment:4 by , 13 years ago
OK, this is the minimal test case:
./configure --enable-gpl --disable-swscale
When defaulting to static libraries, the linking failure is in ffprobe (same symbols as in Comment 2). When building dynamic libraries (--enable-shared), the link failure is in libavfilter.2.dylib.
comment:5 by , 13 years ago
Component: | undetermined → build system |
---|---|
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | new → closed |
Patch committed, missing swscale dependency for MP-filters added, thank you for the report!
the ffplay_deps change LGTM
the avfilter change should not be needed, how can we reproduce that problem?