Skip to contentSkip to conversation

ffmpeg: Add -dbg packages for all libraries

PATCH In review Gary Thomas 3 participants 12 messages Feb 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ffmpeg: Add -dbg packages for all libraries

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

---
 meta/recipes-multimedia/ffmpeg/ffmpeg_2.8.5.bb | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
meta/recipes-multimedia/ffmpeg/ffmpeg_2.8.5.bb +9 -1
index 7107803..524b5cb 100644
@@ -75,7 +75,7 @@ do_configure() {
 }
 
 RSUGGESTS_${PN} = "mplayer"
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|postproc|swresample|swscale).*"
 
 python populate_packages_prepend() {
     av_libdir = d.expand('${libdir}')
@@ -108,4 +108,12 @@ python populate_packages_prepend() {
                       prepend=True,
                       allow_links=True)
 
+    # Debug packages (-dbg)
+    do_split_packages(d, av_libdir, '^lib(.*)\.so$',
+                      output_pattern='lib%s-dbg',
+                      description='libav %s debug package',
+                      extra_depends='${PN}-dbg',
+                      prepend=True,
+                      allow_links=True)
+
 }
Signature · 1 line
2.5.0
#1 lore raw
Quoted 4 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

This isn't really policy, the policy is one -dbg package per recipe and that is how the dependency chains and dbg-pkgs in IMAGE_FEATURES work and so on.

I'm not arguing this is perfect, its not and I would like to see it change. It is how it all works today though. Is there a pressing reason we need to do something different here?

Cheers,

Richard

#2 lore raw
Quoted 6 lines · Richard Purdie
Quoted 4 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

Quoted 7 lines

This isn't really policy, the policy is one -dbg package per recipe and that is how the dependency chains and dbg-pkgs in IMAGE_FEATURES work and so on.

I'm not arguing this is perfect, its not and I would like to see it change. It is how it all works today though. Is there a pressing reason we need to do something different here?

Without this change, none of the [renamed] libraries generated by the ffmpeg recipe have debug symbols available. As is, the recipe is generating separate -dev packages for each library - how is that different [policy-wise]?

Should the -dev and -dbg info for the libraries be bundled into ffmpeg-dbg and ffmpeg-dev? Or perhaps the machinations generating the -dev packages in that recipe are just wrong?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#3 lore raw
Quoted 19 lines · Gary Thomas
Quoted 13 lines · Richard Purdie
Quoted 5 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe.
These
are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

This isn't really policy, the policy is one -dbg package per recipe and
that is how the dependency chains and dbg-pkgs in IMAGE_FEATURES work
and so on.

Quoted 4 lines

I'm not arguing this is perfect, its not and I would like to see it change. It is how it all works today though. Is there a pressing reason
we need to do something different here?

Quoted 8 lines

Without this change, none of the [renamed] libraries generated by the ffmpeg recipe have debug symbols available. As is, the recipe is generating separate -dev packages for each library - how is that different [policy-wise]?

Should the -dev and -dbg info for the libraries be bundled into ffmpeg-dbg and ffmpeg-dev? Or perhaps the machinations generating the -dev packages in that recipe are just wrong?

There should only be one -dev package too.

As you saying the debug symbols are getting placed into the -dev packages? They must be getting placed and hence packaged somewhere?

Cheers,

Richard

#4 lore raw
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Gary Thomas
Quoted 13 lines · Richard Purdie
Quoted 5 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe.
These
are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

This isn't really policy, the policy is one -dbg package per recipe and
that is how the dependency chains and dbg-pkgs in IMAGE_FEATURES work
and so on.

Quoted 4 lines

I'm not arguing this is perfect, its not and I would like to see it change. It is how it all works today though. Is there a pressing reason
we need to do something different here?

Without this change, none of the [renamed] libraries generated by the ffmpeg recipe have debug symbols available. As is, the recipe is generating separate -dev packages for each library - how is that different [policy-wise]?

Quoted 8 lines
Quoted 3 lines

Should the -dev and -dbg info for the libraries be bundled into ffmpeg-dbg and ffmpeg-dev? Or perhaps the machinations generating the -dev packages in that recipe are just wrong?

There should only be one -dev package too.

As you saying the debug symbols are getting placed into the -dev packages? They must be getting placed and hence packaged somewhere?

I'm not sure where they were going before this change.

It does look like this recipe is packaging things incorrectly, at least against policy. I think the biggest thing they were attempting to achieve was packaging of static development libraries (*.a) in their own packages. Should all of this just be in ffmpeg-dev?

I could try just disabling their special packaging and see how well it works.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#5 lore raw
Quoted 37 lines · Gary Thomas
Quoted 25 lines · Richard Purdie
Quoted 24 lines · Gary Thomas
Quoted 13 lines · Richard Purdie
Quoted 5 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe.
These
are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

This isn't really policy, the policy is one -dbg package per recipe and
that is how the dependency chains and dbg-pkgs in IMAGE_FEATURES work
and so on.

Quoted 4 lines

I'm not arguing this is perfect, its not and I would like to see it change. It is how it all works today though. Is there a pressing reason
we need to do something different here?

Without this change, none of the [renamed] libraries generated by the ffmpeg recipe have debug symbols available. As is, the recipe is generating separate -dev packages for each library - how is that different [policy-wise]?

Quoted 8 lines
Quoted 3 lines

Should the -dev and -dbg info for the libraries be bundled into ffmpeg-dbg and ffmpeg-dev? Or perhaps the machinations generating the -dev packages in that recipe are just wrong?

There should only be one -dev package too.

As you saying the debug symbols are getting placed into the -dev packages? They must be getting placed and hence packaged somewhere?

I'm not sure where they were going before this change.

Quoted 9 lines

It does look like this recipe is packaging things incorrectly, at least against policy. I think the biggest thing they were attempting to achieve was packaging of static development libraries (*.a) in their own packages. Should all of this just be in ffmpeg-dev?

I could try just disabling their special packaging and see how well it works.

Policy notwithstanding, there are a lot of lib*-dbg* packages generated by non-lib* recipes, so my solution doesn't seem so out of place to me.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#6 lore raw
Quoted 3 lines · Gary Thomas

Policy notwithstanding, there are a lot of lib*-dbg* packages generated by non-lib* recipes, so my solution doesn't seem so out of place to me.

Since da5ec06814e105451cca11cce76b5c5231110524 debug packages are populated automagically into a single PN-dbg unless there's a good rationale (Qt has a good rationale in that one of the libraries embeds WebKit, which makes its debug symbols quite large).

This has been general policy for some time now and whilst other layers may not do this, oe-core doesn't have any recipes that split into multiple dbg packages anymore (afaict).

Ross

#7 lore raw
In reply to Gary Thomas
Quoted 5 lines · Gary Thomas

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

oe-pkgdata-utils says:

ffmpeg-dbg:

        /usr/bin/.debug/ffmpeg
        /usr/bin/.debug/ffprobe
        /usr/bin/.debug/ffserver
        /usr/lib/.debug/libavcodec.so.56.60.100
        /usr/lib/.debug/libavdevice.so.56.4.100
        /usr/lib/.debug/libavfilter.so.5.40.101
        /usr/lib/.debug/libavformat.so.56.40.101
        /usr/lib/.debug/libavutil.so.54.31.100
        /usr/lib/.debug/libpostproc.so.53.3.100
        /usr/lib/.debug/libswresample.so.1.2.101
        /usr/lib/.debug/libswscale.so.3.1.101

So I'm not sure why this would be needed.

Ross

#8 lore raw
Quoted 24 lines · Ross

On 12 February 2016 at 03:58, Gary Thomas <[email protected] <mailto:[email protected]>> wrote:

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

oe-pkgdata-utils says:

ffmpeg-dbg:

         /usr/bin/.debug/ffmpeg
         /usr/bin/.debug/ffprobe
         /usr/bin/.debug/ffserver
         /usr/lib/.debug/libavcodec.so.56.60.100
         /usr/lib/.debug/libavdevice.so.56.4.100
         /usr/lib/.debug/libavfilter.so.5.40.101
         /usr/lib/.debug/libavformat.so.56.40.101
         /usr/lib/.debug/libavutil.so.54.31.100
         /usr/lib/.debug/libpostproc.so.53.3.100
         /usr/lib/.debug/libswresample.so.1.2.101
         /usr/lib/.debug/libswscale.so.3.1.101
Quoted 2 lines

So I'm not sure why this would be needed.

I'll check again, maybe it's as simple as ffmpeg-dbg wasn't brought in as an automatic dependency of mplayer2-dbg although a bunch of others were.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#9 lore raw
Quoted 25 lines · Gary Thomas
Quoted 24 lines · Ross

On 12 February 2016 at 03:58, Gary Thomas <[email protected] <mailto:[email protected]>> wrote:

Improve the packaging of the libraries built by this recipe. These are created using special code in the recipe and the debug (-dbg) packages were not being created. Adding these packages allow the libraries in question to be debugged using GDB.

oe-pkgdata-utils says:

ffmpeg-dbg:

         /usr/bin/.debug/ffmpeg
         /usr/bin/.debug/ffprobe
         /usr/bin/.debug/ffserver
         /usr/lib/.debug/libavcodec.so.56.60.100
         /usr/lib/.debug/libavdevice.so.56.4.100
         /usr/lib/.debug/libavfilter.so.5.40.101
         /usr/lib/.debug/libavformat.so.56.40.101
         /usr/lib/.debug/libavutil.so.54.31.100
         /usr/lib/.debug/libpostproc.so.53.3.100
         /usr/lib/.debug/libswresample.so.1.2.101
         /usr/lib/.debug/libswscale.so.3.1.101
Quoted 7 lines
Quoted 2 lines

So I'm not sure why this would be needed.

I'll check again, maybe it's as simple as ffmpeg-dbg wasn't brought in as an automatic dependency of mplayer2-dbg although a bunch of others were.

That's definitely it. When I install mplayer2-dbg which was has ffmpeg in DEPENDS, the library debug info was not found and ffmpeg-dbg was not installed:

# 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
...

So, how should this have worked, or is it a little broken?

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#10 lore raw
Quoted 13 lines · Gary Thomas
# 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
...
Quoted 2 lines

So, how should this have worked, or is it a little broken?

Well it *should* have worked, but clearly isn't! Can you file a bug?

Ross

#11 lore raw
Quoted 16 lines · Ross

On 12 February 2016 at 11:11, Gary Thomas <[email protected] <mailto:[email protected]>> wrote:

    # 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
    ...
Quoted 4 lines

So, how should this have worked, or is it a little broken?

Well it *should* have worked, but clearly isn't! Can you file a bug?

I already had, albeit with slightly different wording:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9104

I don't have one at hand, but maybe I'll try using different packaging, e.g. RPM, to see if there is a difference in how this is handled.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------