[vlc-devel] commit: Only link avcodec with libavcodec, avformat with libavformat, swscale with libswscale, imgresample with libavcodec ( small hack include to fix AC_CHECK_LIB code), postproc with libpostproc. ( Antoine Cellerier )

Alexis Ballier aballier at gentoo.org
Tue Jun 3 21:31:38 CEST 2008


On Tue,  3 Jun 2008 15:59:16 +0200 (CEST)
git at videolan.org (git version control) wrote:

> vlc | branch: master | Antoine Cellerier <dionoea at videolan.org> | Tue
> Jun  3 16:00:45 2008 +0200| [425e7f204caa4ed2ae2dd77062cd18bd9c598702]
> 
> Only link avcodec with libavcodec, avformat with libavformat, swscale
> with libswscale, imgresample with libavcodec 
[...]

> -  PKG_CHECK_MODULES(AVCODEC,[libavcodec, libavutil],
> +  PKG_CHECK_MODULES(AVCODEC,[libavcodec],


Why this ? A quick grep shows me that some libavutil functions are in
use there. A build with -z defs shows a build failure:

libtool: link: gcc -std=gnu99 -shared  .libs/libavcodec_plugin_la-avcodec.o .libs/libavcodec_plugin_la-video.o .libs/libavcodec_plugin_la-audio.o .libs/libavcodec_plugin_la-deinterlace.o .libs/libavcodec_plugin_la-encoder.o   -Wl,-rpath -Wl,/home/alexis/gentoo_workdir/vlc/vlc-git/vlc/src/.libs -lavcodec -lm ../../../src/.libs/libvlccore.so -L/usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/../../../../lib64 -L/usr/lib64 /usr/lib64/libhal.so /usr/lib64/libdbus-1.so -lrt -lpthread -ldl  -mtune=athlon64 -Wl,-z -Wl,defs   -Wl,-soname -Wl,libavcodec_plugin.so -o .libs/libavcodec_plugin.so
.libs/libavcodec_plugin_la-avcodec.o: In function `InitLibavcodec':
avcodec.c:(.text+0x34): undefined reference to `av_log_set_callback'
.libs/libavcodec_plugin_la-avcodec.o: In function `CloseDecoder':
avcodec.c:(.text+0x1722): undefined reference to `av_free'
.libs/libavcodec_plugin_la-video.o: In function `EndVideoDec':
video.c:(.text+0x82): undefined reference to `av_free'
.libs/libavcodec_plugin_la-encoder.o: In function `OpenEncoder':
encoder.c:(.text+0x1128): undefined reference to `av_reduce'
encoder.c:(.text+0x115b): undefined reference to `av_reduce'
.libs/libavcodec_plugin_la-encoder.o: In function `CloseEncoder':
encoder.c:(.text+0x1af2): undefined reference to `av_free'
collect2: ld returned 1 exit status
make[6]: *** [libavcodec_plugin.la] Error 1



Note that this only happens with latest ffmpeg trunk that has fixed
its .pc files to put the Requires to Requires.private on libavutil 
& friends so that you they don't make you link needlessly to other libs.


Alexis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080603/befe6b93/attachment.sig>


More information about the vlc-devel mailing list