Bug 9104

Summary: ffmpeg libraries are missing -dbg packaging
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Gary Thomas <gary>
Component: multimediaAssignee: Pavel Zhukov <pavel>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, ross.burton
Version: unspecified   
Target Milestone: 4.99   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Gary Thomas 2016-02-12 03:09:01 UTC
At least when built for i.MX6
  OE-core: 7d5d8d0cd985edf507c8d00e2e162d1b9fff3589 (Poky)
Here are the packages that are built:
$ ls tmp/work/cortexa9hf-neon-amltd-linux-gnueabi/ffmpeg/2.8.5-r0/packages-split -1
ffmpeg
ffmpeg-dbg
ffmpeg-dev
ffmpeg-doc
ffmpeg-locale
ffmpeg.shlibdeps
ffmpeg-staticdev
libavcodec
libavcodec-dev
libavcodec.shlibdeps
libavcodec-staticdev
libavdevice
libavdevice-dev
libavdevice.shlibdeps
libavdevice-staticdev
libavfilter
libavfilter-dev
libavfilter.shlibdeps
libavfilter-staticdev
libavformat
libavformat-dev
libavformat.shlibdeps
libavformat-staticdev
libavutil
libavutil-dev
libavutil.shlibdeps
libavutil-staticdev
libpostproc
libpostproc-dev
libpostproc.shlibdeps
libpostproc-staticdev
libswresample
libswresample-dev
libswresample.shlibdeps
libswresample-staticdev
libswscale
libswscale-dev
libswscale.shlibdeps
libswscale-staticdev

The missing -dbg may be a result of the packaging "magic" in the recipe.
Comment 1 Ross Burton 2016-02-12 15:50:23 UTC
This looks to be more core than ffmpeg-specific, I'll take this.
Comment 2 Gary Thomas 2016-02-13 03:23:39 UTC
The actual problem seems to be that dependent packages expect libXXX-dbg whereas ffmpeg-dbg is where the debug info actually is.  For example, mplayer2 built with ffmpeg in DEPENDS doesn't get the necessary debug package[s]:

# opkg install mplayer2-dbg
Installing mplayer2-dbg (2.0+gitr0+2c378c71a4-r13.1) on root.
mplayer2-dbg: unsatisfied recommendation for libavformat-dbg
mplayer2-dbg: unsatisfied recommendation for libavutil-dbg
mplayer2-dbg: unsatisfied recommendation for libfaad-dbg
mplayer2-dbg: unsatisfied recommendation for libasound-dbg
mplayer2-dbg: unsatisfied recommendation for libavcodec-dbg
mplayer2-dbg: unsatisfied recommendation for libswresample-dbg
mplayer2-dbg: unsatisfied recommendation for libpostproc-dbg
mplayer2-dbg: unsatisfied recommendation for ncurses-libtinfo-dbg
mplayer2-dbg: unsatisfied recommendation for libswscale-dbg

If I manually install ffmpeg-dbg, all the necessary debug info is available.

Note: this is with IPK (opkg) packaging.  Other packaging has not [yet] been tested.
Comment 3 Ross Burton 2016-02-13 22:58:49 UTC
Yes, that's basically the problem.  This happens before format-specific packaging code so it will impact all formats.

Basically the magic rdepends on foo-dbg assume that if package foo depends on bar then foo-dbg should depend on bar-dbg.  This obviously doesn't work well with recipes that split up into a number of libraries like ffmpeg.

I think the easiest fix would be to inject rprovides at packaging time.  Changing the depends so that mplayer-dbg depends on ffmpeg-dbg would be more accurate but more complicated to solve.
Comment 4 Ross Burton 2018-02-20 20:09:35 UTC
Fixing this is way more than M4 material so bumping to 2.6.
Comment 5 Pavel Zhukov 2022-03-01 06:50:46 UTC
rpm generated -dbg but it doesn't look very useful:

$ rpm -qpl tmp/deploy/rpm/core2_64/ffmpeg-dbg-5.0-r0.core2_64.rpm 
(contains no files)


$ rpm -qpR tmp/deploy/rpm/core2_64/ffmpeg-dbg-5.0-r0.core2_64.rpm 
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1


$ rpm -qpP tmp/deploy/rpm/core2_64/ffmpeg-dbg-5.0-r0.core2_64.rpm 
ffmpeg-dbg = 5.0-r0
Comment 6 Pavel Zhukov 2022-08-24 11:33:27 UTC
Looks like the issue is gone in latest master.
Comment 7 Pavel Zhukov 2022-08-24 11:35:11 UTC
  ls tmp/work/*/ffmpeg/*/packages-split  -1
ffmpeg
ffmpeg-dbg
ffmpeg-dev
ffmpeg-doc
ffmpeg-locale
ffmpeg.shlibdeps
ffmpeg-src
ffmpeg-staticdev
libavcodec
libavcodec.shlibdeps
libavdevice
libavdevice.shlibdeps
libavfilter
libavfilter.shlibdeps
libavformat
libavformat.shlibdeps
libavutil
libavutil.shlibdeps
libpostproc
libswresample
libswresample.shlibdeps
libswscale
libswscale.shlibdeps

$ rpm -qpP tmp/deploy/rpm/core2_64/ffmpeg-dbg-5.1-r0.core2_64.rpm
ffmpeg-dbg = 5.1-r0
$ rpm -qpl tmp/deploy/rpm/core2_64/ffmpeg-dbg-5.1-r0.core2_64.rpm
/usr
/usr/bin
/usr/bin/.debug
/usr/bin/.debug/ffmpeg
/usr/bin/.debug/ffprobe
/usr/lib
/usr/lib/.debug
/usr/lib/.debug/libavcodec.so.59.37.100
/usr/lib/.debug/libavdevice.so.59.7.100
/usr/lib/.debug/libavfilter.so.8.44.100
/usr/lib/.debug/libavformat.so.59.27.100
/usr/lib/.debug/libavutil.so.57.28.100
/usr/lib/.debug/libswresample.so.4.7.100
/usr/lib/.debug/libswscale.so.6.7.100