#6089 closed defect (fixed)
libavutil.pc missing some dependencies
Reported by: | Mr-Dave | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avutil |
Version: | git-master | Keywords: | pkg-config |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Some dependent libraries are missing in the package config
How to reproduce:
Build ffmpeg with the following script
cd /home/user/ffmpeg_sources wget http://ffmpeg.org/releases/ffmpeg-3.2.2.tar.bz2 tar xjvf ffmpeg-3.2.2.tar.bz2 cd ffmpeg-3.2.2 PATH="/home/user/ffmpeg_32/bin:$PATH" PKG_CONFIG_PATH="/home/user/ffmpeg_32/lib/pkgconfig" ./configure \ --prefix="/home/user/ffmpeg_32" \ --pkg-config-flags="--static" \ --extra-cflags="-I/home/user/ffmpeg_32/include" \ --extra-ldflags="-L/home/user/ffmpeg_32/lib" \ --bindir="/home/user/ffmpeg_32/bin" \ --enable-gpl \ --enable-libass \ --enable-libfdk-aac \ --enable-libfreetype \ --enable-libmp3lame \ --enable-libopus \ --enable-libtheora \ --enable-libvorbis \ --enable-libvpx \ --enable-libx264 \ --enable-libx265 \ --enable-nonfree PATH="/home/user/ffmpeg_32/bin:$PATH" make make install
This results in the following line in libavutil.pc
Libs: -L${libdir} -lavutil -lm
When linking programs that use ffmpeg, libavutil fails with
/home/user/ffmpeg_32/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_free': /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:829: undefined reference to `XCloseDisplay' /home/user/ffmpeg_32/lib/libavutil.a(hwcontext_vaapi.o): In function `vaapi_device_create': /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:859: undefined reference to `XOpenDisplay' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:864: undefined reference to `vaGetDisplay' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:871: undefined reference to `XDisplayName' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:861: undefined reference to `XDisplayName' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:885: undefined reference to `vaGetDisplayDRM' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:859: undefined reference to `XOpenDisplay' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:861: undefined reference to `XDisplayName' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vaapi.c:866: undefined reference to `XDisplayName' /home/user/ffmpeg_32/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_create': /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:432: undefined reference to `XOpenDisplay' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:438: undefined reference to `XDisplayString' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:440: undefined reference to `XDefaultScreen' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:440: undefined reference to `vdp_device_create_x11' /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:434: undefined reference to `XDisplayName' /home/user/ffmpeg_32/lib/libavutil.a(hwcontext_vdpau.o): In function `vdpau_device_free': /home/user/ffmpeg_sources/ffmpeg-3.2.2/libavutil/hwcontext_vdpau.c:411: undefined reference to `XCloseDisplay' collect2: error: ld returned 1 exit status
To work around the issue, revise libavutil.pc to have the following line:
Libs: -L${libdir} -lavutil -lm -lX11 -lvdpau -lva-drm -lva-x11 -lva
This issue appears to have been introduced in version 3.1
Change History (2)
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Keywords: | pkg-config added; pkgconfig avutil removed |
---|---|
Version: | unspecified → git-master |
Note:
See TracTickets
for help on using tickets.
This was fixed on master some time ago.