* [PATCH] elfutils: add PACKAGECONFIG for compression algorithms
@ 2019-10-15 5:48 Dan Callaghan
2019-10-15 6:01 ` Dan Callaghan
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 5:48 UTC (permalink / raw)
To: openembedded-core
Elfutils has optional support for zlib, bzip2, and xz (lzma). It uses
this for decompressing embedded ELF sections like the .gnu_debugdata
section for "mini debuginfo":
https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
Previously these were unconditionally disabled but the reasons for
disabling them seem to no longer apply. Both the target and native
variants of elfutils can build successfully against all three
compression libraries.
Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
---
meta/recipes-devtools/elfutils/elfutils_0.177.bb | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
index 78c3791936..ff033d287a 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -46,8 +46,13 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
inherit autotools gettext ptest
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
+EXTRA_OECONF = "--program-prefix=eu-"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
+PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
+
RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
--
2.20.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 5:48 [PATCH] elfutils: add PACKAGECONFIG for compression algorithms Dan Callaghan
@ 2019-10-15 6:01 ` Dan Callaghan
2019-10-15 6:15 ` [PATCH v2] " Dan Callaghan
2019-10-16 0:02 ` ✗ patchtest: failure for elfutils: add PACKAGECONFIG for compression algorithms (rev3) Patchwork
2 siblings, 0 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 6:01 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Excerpts from Dan Callaghan's message of 2019-10-15 15:48:27 +10:00:
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
I just realised that the --without-zlib option doesn't make sense, zlib
is actually mandatory.
And bzip2 should probably be in the default PACKAGECONFIG, because the
recipe is currently enabling it for the target (although not for the
native variant).
--
Dan Callaghan <dan.callaghan@opengear.com>
Software Engineer
Opengear <https://opengear.com/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 5:48 [PATCH] elfutils: add PACKAGECONFIG for compression algorithms Dan Callaghan
2019-10-15 6:01 ` Dan Callaghan
@ 2019-10-15 6:15 ` Dan Callaghan
2019-10-15 6:59 ` Jacob Kroon
2019-10-15 22:44 ` [PATCH v3] " Dan Callaghan
2019-10-16 0:02 ` ✗ patchtest: failure for elfutils: add PACKAGECONFIG for compression algorithms (rev3) Patchwork
2 siblings, 2 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 6:15 UTC (permalink / raw)
To: openembedded-core
Elfutils has optional support for bzip2 and xz (lzma). It uses
this for decompressing embedded ELF sections like the .gnu_debugdata
section for "mini debuginfo":
https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
Previously this support was unconditionally disabled but the reasons for
disabling them seem to no longer apply. Both the target and native
variants of elfutils can build successfully against both bzip2 and xz.
Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
---
meta/recipes-devtools/elfutils/elfutils_0.177.bb | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
index 78c3791936..86e76d706a 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://sourceware.org/elfutils"
SECTION = "base"
LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
+DEPENDS = "libtool zlib virtual/libintl"
DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
# The Debian patches below are from:
# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
@@ -46,8 +46,12 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
inherit autotools gettext ptest
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
+EXTRA_OECONF = "--program-prefix=eu-"
+
+PACKAGECONFIG ??= "bzip2"
+PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
+PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
+
RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
--
2.20.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 6:15 ` [PATCH v2] " Dan Callaghan
@ 2019-10-15 6:59 ` Jacob Kroon
2019-10-15 7:21 ` Dan Callaghan
2019-10-15 22:44 ` [PATCH v3] " Dan Callaghan
1 sibling, 1 reply; 19+ messages in thread
From: Jacob Kroon @ 2019-10-15 6:59 UTC (permalink / raw)
To: Dan Callaghan, openembedded-core
Den 2019-10-15 kl. 08:15, skrev Dan Callaghan:
> Elfutils has optional support for bzip2 and xz (lzma). It uses
> this for decompressing embedded ELF sections like the .gnu_debugdata
> section for "mini debuginfo":
>
> https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
>
> Previously this support was unconditionally disabled but the reasons for
> disabling them seem to no longer apply. Both the target and native
> variants of elfutils can build successfully against both bzip2 and xz.
>
> Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
> ---
> meta/recipes-devtools/elfutils/elfutils_0.177.bb | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> index 78c3791936..86e76d706a 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> @@ -3,7 +3,7 @@ HOMEPAGE = "https://sourceware.org/elfutils"
> SECTION = "base"
> LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
> LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> -DEPENDS = "libtool bzip2 zlib virtual/libintl"
> +DEPENDS = "libtool zlib virtual/libintl"
> DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
> # The Debian patches below are from:
> # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
> @@ -46,8 +46,12 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
>
> inherit autotools gettext ptest
>
> -EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
> -EXTRA_OECONF_append_class-native = " --without-bzlib"
> +EXTRA_OECONF = "--program-prefix=eu-"
> +
> +PACKAGECONFIG ??= "bzip2"
> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
> +
> RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
>
> EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
>
If I get it correctly, previously the recipe depended on bzip2, but for
native it was actually disabled at configure time. Can't we just skip it
for native then, since it hasn't been required sofar ?
You can do
PACKAGECONFIG_class-native = ""
Jacob
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 6:59 ` Jacob Kroon
@ 2019-10-15 7:21 ` Dan Callaghan
2019-10-15 7:46 ` Jacob Kroon
2019-10-15 10:55 ` Ross Burton
0 siblings, 2 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 7:21 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2562 bytes --]
Excerpts from Jacob Kroon's message of 2019-10-15 08:59:56 +02:00:
> Den 2019-10-15 kl. 08:15, skrev Dan Callaghan:
> > @@ -46,8 +46,12 @@ SRC_URI[sha256sum]
> > = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
> >
> > inherit autotools gettext ptest
> >
> > -EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
> > -EXTRA_OECONF_append_class-native = " --without-bzlib"
> > +EXTRA_OECONF = "--program-prefix=eu-"
> > +
> > +PACKAGECONFIG ??= "bzip2"
> > +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
> > +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
> > +
> > RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
> >
> > EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
> >
>
> If I get it correctly, previously the recipe depended on bzip2, but for
> native it was actually disabled at configure time. Can't we just skip it
> for native then, since it hasn't been required sofar ?
>
> You can do
>
> PACKAGECONFIG_class-native = ""
Yes true, that would work, although it seems like needless complication
to have different build configurations for the target recipe and native
variant.
Anyway, I figured out why the --without-bzlib was originally added for
the native variant. The commit message wasn't clear to me, but I have
seen the problem in action now.
I saw that elfutils-native correctly depends on bzip2-native, and the
build worked on my PC. But it was actually the host bzip2 library
leaking into the build.
Poky has "bzip2-native" in ASSUME_PROVIDED. Presumably, this is because
bzip2 (the command line program) is a required host tool and so there is
no need to build bzip2-native just to get a working bzip2 program.
However that also means that bzip2-native libraries and headers are
silently omitted from the recipe-sysroot-native for elfutils-native,
even though it depends on bzip2-native. On our Jenkins, which has a very
minimal build environment and lacks the bzip2 headers, elfutils-native
fails to configure:
| checking for library containing BZ2_bzdopen... no
| configure: error: missing -lbz2 for --with-bzlib
It seems to me the real problem here is that "bzip2-native" does not
really belong in ASSUME_PROVIDED. Recipes can assume that the host
provides the bzip2 *command* but not necessarily its headers and
libraries.
So now I am not quite sure what to do...
--
Dan Callaghan <dan.callaghan@opengear.com>
Software Engineer
Opengear <https://opengear.com/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 7:21 ` Dan Callaghan
@ 2019-10-15 7:46 ` Jacob Kroon
2019-10-15 10:55 ` Ross Burton
1 sibling, 0 replies; 19+ messages in thread
From: Jacob Kroon @ 2019-10-15 7:46 UTC (permalink / raw)
To: Dan Callaghan, openembedded-core
Den 2019-10-15 kl. 09:21, skrev Dan Callaghan:
> Excerpts from Jacob Kroon's message of 2019-10-15 08:59:56 +02:00:
>> Den 2019-10-15 kl. 08:15, skrev Dan Callaghan:
>>> @@ -46,8 +46,12 @@ SRC_URI[sha256sum]
>>> = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
>>>
>>> inherit autotools gettext ptest
>>>
>>> -EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
>>> -EXTRA_OECONF_append_class-native = " --without-bzlib"
>>> +EXTRA_OECONF = "--program-prefix=eu-"
>>> +
>>> +PACKAGECONFIG ??= "bzip2"
>>> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,bzip2"
>>> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
>>> +
>>> RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
>>>
>>> EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
>>>
>>
>> If I get it correctly, previously the recipe depended on bzip2, but for
>> native it was actually disabled at configure time. Can't we just skip it
>> for native then, since it hasn't been required sofar ?
>>
>> You can do
>>
>> PACKAGECONFIG_class-native = ""
>
> Yes true, that would work, although it seems like needless complication
> to have different build configurations for the target recipe and native
> variant.
>
Lots of recipes do this. I personally think its ok if it helps keeping
build times down by avoiding unnecessary deps.
> Anyway, I figured out why the --without-bzlib was originally added for
> the native variant. The commit message wasn't clear to me, but I have
> seen the problem in action now.
>
> I saw that elfutils-native correctly depends on bzip2-native, and the
> build worked on my PC. But it was actually the host bzip2 library
> leaking into the build.
>
> Poky has "bzip2-native" in ASSUME_PROVIDED. Presumably, this is because
> bzip2 (the command line program) is a required host tool and so there is
> no need to build bzip2-native just to get a working bzip2 program.
>
> However that also means that bzip2-native libraries and headers are
> silently omitted from the recipe-sysroot-native for elfutils-native,
> even though it depends on bzip2-native. On our Jenkins, which has a very
> minimal build environment and lacks the bzip2 headers, elfutils-native
> fails to configure:
>
> | checking for library containing BZ2_bzdopen... no
> | configure: error: missing -lbz2 for --with-bzlib
>
> It seems to me the real problem here is that "bzip2-native" does not
> really belong in ASSUME_PROVIDED. Recipes can assume that the host
> provides the bzip2 *command* but not necessarily its headers and
> libraries.
>
Maybe try removing bzip2-native from ASSUME_PROVIDED in your local
jenkins builds ? Something like 'ASSUME_PROVIDED_remove =
"bzip2-native"' in local.conf.
Jacob
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 7:21 ` Dan Callaghan
2019-10-15 7:46 ` Jacob Kroon
@ 2019-10-15 10:55 ` Ross Burton
2019-10-15 22:46 ` Dan Callaghan
1 sibling, 1 reply; 19+ messages in thread
From: Ross Burton @ 2019-10-15 10:55 UTC (permalink / raw)
To: openembedded-core
On 15/10/2019 08:21, Dan Callaghan wrote:
> Poky has "bzip2-native" in ASSUME_PROVIDED. Presumably, this is because
> bzip2 (the command line program) is a required host tool and so there is
> no need to build bzip2-native just to get a working bzip2 program.
>
> However that also means that bzip2-native libraries and headers are
> silently omitted from the recipe-sysroot-native for elfutils-native,
> even though it depends on bzip2-native. On our Jenkins, which has a very
> minimal build environment and lacks the bzip2 headers, elfutils-native
> fails to configure:
>
> | checking for library containing BZ2_bzdopen... no
> | configure: error: missing -lbz2 for --with-bzlib
>
> It seems to me the real problem here is that "bzip2-native" does not
> really belong in ASSUME_PROVIDED. Recipes can assume that the host
> provides the bzip2 *command* but not necessarily its headers and
> libraries.
>
> So now I am not quite sure what to do...
If you need bzip-native for the libraries, DEPEND on
bzip2-replacement-native.
Ross
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 6:15 ` [PATCH v2] " Dan Callaghan
2019-10-15 6:59 ` Jacob Kroon
@ 2019-10-15 22:44 ` Dan Callaghan
2019-10-22 12:53 ` Richard Purdie
2019-10-29 20:18 ` Adrian Bunk
1 sibling, 2 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 22:44 UTC (permalink / raw)
To: openembedded-core
Elfutils has optional support for bzip2 and xz (lzma). It uses
this for decompressing embedded ELF sections like the .gnu_debugdata
section for "mini debuginfo":
https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
Previously this support was unconditionally disabled but the reasons for
disabling them seem to no longer apply. Both the target and native
variants of elfutils can build successfully against both bzip2 and xz.
Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
---
meta/recipes-devtools/elfutils/elfutils_0.177.bb | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
index 78c3791936..f050577c0d 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "https://sourceware.org/elfutils"
SECTION = "base"
LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
+DEPENDS = "libtool zlib virtual/libintl"
DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
# The Debian patches below are from:
# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
@@ -46,8 +46,15 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
inherit autotools gettext ptest
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
+EXTRA_OECONF = "--program-prefix=eu-"
+
+DEPENDS_BZIP2 = "bzip2-replacement-native"
+DEPENDS_BZIP2_class-target = "bzip2"
+
+PACKAGECONFIG ??= "bzip2"
+PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
+PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
+
RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
--
2.20.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 10:55 ` Ross Burton
@ 2019-10-15 22:46 ` Dan Callaghan
2019-10-16 10:10 ` Ross Burton
2019-10-16 12:14 ` Richard Purdie
0 siblings, 2 replies; 19+ messages in thread
From: Dan Callaghan @ 2019-10-15 22:46 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 598 bytes --]
Excerpts from Ross Burton's message of 2019-10-15 11:55:31 +01:00:
> If you need bzip-native for the libraries, DEPEND on
> bzip2-replacement-native.
Oh, thanks for the hint! I hadn't seen that trick used before but now
I see it is in quite a few places. I will post a fresh patch using that.
It does seem like it would be simpler to just take bzip2-native out of
ASSUME_PROVIDED, but I guess leaving it in there lets people avoid
building bzip2-native under some circumstances.
--
Dan Callaghan <dan.callaghan@opengear.com>
Software Engineer
Opengear <https://opengear.com/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* ✗ patchtest: failure for elfutils: add PACKAGECONFIG for compression algorithms (rev3)
2019-10-15 5:48 [PATCH] elfutils: add PACKAGECONFIG for compression algorithms Dan Callaghan
2019-10-15 6:01 ` Dan Callaghan
2019-10-15 6:15 ` [PATCH v2] " Dan Callaghan
@ 2019-10-16 0:02 ` Patchwork
2 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2019-10-16 0:02 UTC (permalink / raw)
To: Callaghan, Dan; +Cc: openembedded-core
== Series Details ==
Series: elfutils: add PACKAGECONFIG for compression algorithms (rev3)
Revision: 3
URL : https://patchwork.openembedded.org/series/20471/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 0ad21fe63f)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 22:46 ` Dan Callaghan
@ 2019-10-16 10:10 ` Ross Burton
2019-10-17 0:46 ` Randy MacLeod
2019-10-16 12:14 ` Richard Purdie
1 sibling, 1 reply; 19+ messages in thread
From: Ross Burton @ 2019-10-16 10:10 UTC (permalink / raw)
To: openembedded-core
On 15/10/2019 23:46, Dan Callaghan wrote:
> It does seem like it would be simpler to just take bzip2-native out of
> ASSUME_PROVIDED, but I guess leaving it in there lets people avoid
> building bzip2-native under some circumstances.
I believe it's a bootstrap speed thing. If we can assume bzip2 on the
host exists we don't need to build it to get going, which is especially
fun if you need to decompress bzip2 files to build bzip2...
Ross
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 22:46 ` Dan Callaghan
2019-10-16 10:10 ` Ross Burton
@ 2019-10-16 12:14 ` Richard Purdie
1 sibling, 0 replies; 19+ messages in thread
From: Richard Purdie @ 2019-10-16 12:14 UTC (permalink / raw)
To: Dan Callaghan, openembedded-core
On Wed, 2019-10-16 at 08:46 +1000, Dan Callaghan wrote:
> Excerpts from Ross Burton's message of 2019-10-15 11:55:31 +01:00:
> > If you need bzip-native for the libraries, DEPEND on
> > bzip2-replacement-native.
>
> Oh, thanks for the hint! I hadn't seen that trick used before but
> now
> I see it is in quite a few places. I will post a fresh patch using
> that.
>
> It does seem like it would be simpler to just take bzip2-native out
> of
> ASSUME_PROVIDED, but I guess leaving it in there lets people avoid
> building bzip2-native under some circumstances.
Its in ASSUME_PROVIDED since we do rely on bzip2 being there so that
people can have .bz2 files in SRC_URI.
I have a small preference for disabling bzip2 in elfutils-native, just
because we only really want to build things that are necessary. The
more dependencies we add in, the longer builds take.
Do we really need bzip2 in elfutils-native?
Cheers,
Richard
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-16 10:10 ` Ross Burton
@ 2019-10-17 0:46 ` Randy MacLeod
0 siblings, 0 replies; 19+ messages in thread
From: Randy MacLeod @ 2019-10-17 0:46 UTC (permalink / raw)
To: Ross Burton, openembedded-core
On 10/16/19 6:10 AM, Ross Burton wrote:
> On 15/10/2019 23:46, Dan Callaghan wrote:
>> It does seem like it would be simpler to just take bzip2-native out of
>> ASSUME_PROVIDED, but I guess leaving it in there lets people avoid
>> building bzip2-native under some circumstances.
>
> I believe it's a bootstrap speed thing. If we can assume bzip2 on the
> host exists we don't need to build it to get going, which is especially
> fun if you need to decompress bzip2 files to build bzip2...
To save other people from checking if the bzip2 recipe and Ross are mad:
$ grep "SRC_URI =" meta/recipes-extended/bzip2/bzip2_1.0.8.bb
SRC_URI = "https://sourceware.org/pub/${BPN}/${BPN}-${PV}.tar.gz \
so the recipe is sane at least. ;-)
../Randy
>
> Ross
--
# Randy MacLeod
# Wind River Linux
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 22:44 ` [PATCH v3] " Dan Callaghan
@ 2019-10-22 12:53 ` Richard Purdie
2019-10-29 20:00 ` Ross Burton
2019-10-29 20:18 ` Adrian Bunk
1 sibling, 1 reply; 19+ messages in thread
From: Richard Purdie @ 2019-10-22 12:53 UTC (permalink / raw)
To: Dan Callaghan, openembedded-core
On Wed, 2019-10-16 at 08:44 +1000, Dan Callaghan wrote:
> Elfutils has optional support for bzip2 and xz (lzma). It uses
> this for decompressing embedded ELF sections like the .gnu_debugdata
> section for "mini debuginfo":
>
> https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
>
> Previously this support was unconditionally disabled but the reasons for
> disabling them seem to no longer apply. Both the target and native
> variants of elfutils can build successfully against both bzip2 and xz.
>
> Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com>
> ---
> meta/recipes-devtools/elfutils/elfutils_0.177.bb | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/elfutils/elfutils_0.177.bb b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> index 78c3791936..f050577c0d 100644
> --- a/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> +++ b/meta/recipes-devtools/elfutils/elfutils_0.177.bb
> @@ -3,7 +3,7 @@ HOMEPAGE = "https://sourceware.org/elfutils"
> SECTION = "base"
> LICENSE = "GPLv2 & LGPLv3+ & GPLv3+"
> LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
> -DEPENDS = "libtool bzip2 zlib virtual/libintl"
> +DEPENDS = "libtool zlib virtual/libintl"
> DEPENDS_append_libc-musl = " argp-standalone fts musl-obstack "
> # The Debian patches below are from:
> # http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.176-1.debian.tar.xz
> @@ -46,8 +46,15 @@ SRC_URI[sha256sum] = "fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc
>
> inherit autotools gettext ptest
>
> -EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
> -EXTRA_OECONF_append_class-native = " --without-bzlib"
> +EXTRA_OECONF = "--program-prefix=eu-"
> +
> +DEPENDS_BZIP2 = "bzip2-replacement-native"
> +DEPENDS_BZIP2_class-target = "bzip2"
> +
> +PACKAGECONFIG ??= "bzip2"
> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
> +
> RDEPENDS_${PN}-ptest += "libasm libelf bash make coreutils ${PN}-binutils"
>
> EXTRA_OECONF_append_class-target += "--disable-tests-rpath"
Breaks nativesdk-elftutils:
https://autobuilder.yoctoproject.org/typhoon/#/builders/62/builds/1157
Probably need to do:
DEPENDS_BZIP2 = "bzip2"
DEPENDS_BZIP2_class-native = "bzip2-replacement-native"
but I still think the default should be bzip2 off for -native unless
someone can tell me why we need it. That would mean adding something
like:
PACKAGECONFIG_class-native ??= ""
Cheers,
Richard
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-22 12:53 ` Richard Purdie
@ 2019-10-29 20:00 ` Ross Burton
0 siblings, 0 replies; 19+ messages in thread
From: Ross Burton @ 2019-10-29 20:00 UTC (permalink / raw)
To: openembedded-core
On 22/10/2019 13:53, Richard Purdie wrote:
> Breaks nativesdk-elftutils:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/62/builds/1157
>
> Probably need to do:
>
> DEPENDS_BZIP2 = "bzip2"
> DEPENDS_BZIP2_class-native = "bzip2-replacement-native"
>
>
> but I still think the default should be bzip2 off for -native unless
> someone can tell me why we need it. That would mean adding something
> like:
>
> PACKAGECONFIG_class-native ??= ""
Proposal: lets just disable bzip2 support in elfutils by default.
Ross
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-15 22:44 ` [PATCH v3] " Dan Callaghan
2019-10-22 12:53 ` Richard Purdie
@ 2019-10-29 20:18 ` Adrian Bunk
2019-10-29 20:51 ` Ross Burton
2019-10-29 21:46 ` Dan Callaghan
1 sibling, 2 replies; 19+ messages in thread
From: Adrian Bunk @ 2019-10-29 20:18 UTC (permalink / raw)
To: Dan Callaghan; +Cc: openembedded-core
On Wed, Oct 16, 2019 at 08:44:56AM +1000, Dan Callaghan wrote:
> Elfutils has optional support for bzip2 and xz (lzma). It uses
> this for decompressing embedded ELF sections like the .gnu_debugdata
> section for "mini debuginfo":
>
> https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
>...
> +PACKAGECONFIG ??= "bzip2"
> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
>...
Is any tooling actually doing this compression by default?
It is a bit surprising that this has the mostly-obsolete bzip2 enabled
by default but not the more common (and better compressing) xz.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-29 20:18 ` Adrian Bunk
@ 2019-10-29 20:51 ` Ross Burton
2019-10-29 21:46 ` Dan Callaghan
1 sibling, 0 replies; 19+ messages in thread
From: Ross Burton @ 2019-10-29 20:51 UTC (permalink / raw)
To: openembedded-core
On 29/10/2019 20:18, Adrian Bunk wrote:
> On Wed, Oct 16, 2019 at 08:44:56AM +1000, Dan Callaghan wrote:
>> Elfutils has optional support for bzip2 and xz (lzma). It uses
>> this for decompressing embedded ELF sections like the .gnu_debugdata
>> section for "mini debuginfo":
>>
>> https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
>> ...
>> +PACKAGECONFIG ??= "bzip2"
>> +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
>> +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
>> ...
>
> Is any tooling actually doing this compression by default?
>
> It is a bit surprising that this has the mostly-obsolete bzip2 enabled
> by default but not the more common (and better compressing) xz.
Exactly.
Ross
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-29 20:18 ` Adrian Bunk
2019-10-29 20:51 ` Ross Burton
@ 2019-10-29 21:46 ` Dan Callaghan
2019-10-30 23:05 ` Ross Burton
1 sibling, 1 reply; 19+ messages in thread
From: Dan Callaghan @ 2019-10-29 21:46 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]
Excerpts from Adrian Bunk's message of 2019-10-29 22:18:21 +02:00:
> On Wed, Oct 16, 2019 at 08:44:56AM +1000, Dan Callaghan wrote:
> > Elfutils has optional support for bzip2 and xz (lzma). It uses
> > this for decompressing embedded ELF sections like the .gnu_debugdata
> > section for "mini debuginfo":
> >
> > https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
> >...
> > +PACKAGECONFIG ??= "bzip2"
> > +PACKAGECONFIG[bzip2] = "--with-bzlib,--without-bzlib,${DEPENDS_BZIP2}"
> > +PACKAGECONFIG[xz] = "--with-lzma,--without-lzma,xz"
> >...
>
> Is any tooling actually doing this compression by default?
>
> It is a bit surprising that this has the mostly-obsolete bzip2 enabled
> by default but not the more common (and better compressing) xz.
I couldn't find anything that would ever use the bzip2 decompression in
elfutils, so I had a quick look at why they even added bzip2 support in
the first place. It turns out it was for reading compressed kernel
images (presumably, in the elfutils tools like eu-readelf):
https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=d6ccdc1a05f27bf0bb5d802ec14f879aa9fe3e98
commit d6ccdc1a05f27bf0bb5d802ec14f879aa9fe3e98
Author: Roland McGrath <roland@redhat.com>
Date: Wed Aug 26 00:23:01 2009 -0700
libdwfl: Support Linux bzip2 kernel images for automatic decompression.
And indeed on my Fedora host eu-readelf can decode ELF information from
a kernel bzImage, but the eu-readelf built by Yocto's elfutils-native
recipe says "not a valid ELF file" when I feed it the same bzImage.
Whether that's useful or not is a different question. In our product
I am planning to disable bzip2 (because we don't use the elfutils tools
for anything) and enable xz (for .gnu_debugdata sections).
--
Dan Callaghan <dan.callaghan@opengear.com>
Software Engineer
Opengear <https://opengear.com/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 849 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v3] elfutils: add PACKAGECONFIG for compression algorithms
2019-10-29 21:46 ` Dan Callaghan
@ 2019-10-30 23:05 ` Ross Burton
0 siblings, 0 replies; 19+ messages in thread
From: Ross Burton @ 2019-10-30 23:05 UTC (permalink / raw)
To: Dan Callaghan, openembedded-core
On 29/10/2019 21:46, Dan Callaghan wrote:
> I couldn't find anything that would ever use the bzip2 decompression in
> elfutils, so I had a quick look at why they even added bzip2 support in
> the first place. It turns out it was for reading compressed kernel
> images (presumably, in the elfutils tools like eu-readelf):
>
> https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=d6ccdc1a05f27bf0bb5d802ec14f879aa9fe3e98
>
> commit d6ccdc1a05f27bf0bb5d802ec14f879aa9fe3e98
> Author: Roland McGrath <roland@redhat.com>
> Date: Wed Aug 26 00:23:01 2009 -0700
>
> libdwfl: Support Linux bzip2 kernel images for automatic decompression.
>
> And indeed on my Fedora host eu-readelf can decode ELF information from
> a kernel bzImage, but the eu-readelf built by Yocto's elfutils-native
> recipe says "not a valid ELF file" when I feed it the same bzImage.
>
> Whether that's useful or not is a different question. In our product
> I am planning to disable bzip2 (because we don't use the elfutils tools
> for anything) and enable xz (for .gnu_debugdata sections).
Good digging, thanks.
Lets default to bzip being off for now, and then if anyone does want
this then they can just turn it on.
Ross
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2019-10-30 23:06 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 5:48 [PATCH] elfutils: add PACKAGECONFIG for compression algorithms Dan Callaghan
2019-10-15 6:01 ` Dan Callaghan
2019-10-15 6:15 ` [PATCH v2] " Dan Callaghan
2019-10-15 6:59 ` Jacob Kroon
2019-10-15 7:21 ` Dan Callaghan
2019-10-15 7:46 ` Jacob Kroon
2019-10-15 10:55 ` Ross Burton
2019-10-15 22:46 ` Dan Callaghan
2019-10-16 10:10 ` Ross Burton
2019-10-17 0:46 ` Randy MacLeod
2019-10-16 12:14 ` Richard Purdie
2019-10-15 22:44 ` [PATCH v3] " Dan Callaghan
2019-10-22 12:53 ` Richard Purdie
2019-10-29 20:00 ` Ross Burton
2019-10-29 20:18 ` Adrian Bunk
2019-10-29 20:51 ` Ross Burton
2019-10-29 21:46 ` Dan Callaghan
2019-10-30 23:05 ` Ross Burton
2019-10-16 0:02 ` ✗ patchtest: failure for elfutils: add PACKAGECONFIG for compression algorithms (rev3) Patchwork
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.