diff mbox series

[v2] libunwind: fix multilib conflict

Message ID 20250516092238.1182-1-liuyd.fnst@fujitsu.com
State New
Headers show
Series [v2] libunwind: fix multilib conflict | expand

Commit Message

Liu Yiding May 16, 2025, 9:22 a.m. UTC
fix issue that
| Error: Transaction test error:
|   file /usr/libexec/libunwind/check-namespace.sh conflicts between attempted installs of libunwind-1.8.1-r0.core2_64 and lib32-libunwind-1.8.1-r0.core2_32
|   file /usr/libexec/libunwind/test-runner conflicts between attempted installs of libunwind-1.8.1-r0.core2_64 and lib32-libunwind-1.8.1-r0.core2_32

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 meta/recipes-support/libunwind/libunwind_1.8.1.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Ross Burton May 16, 2025, 9:32 a.m. UTC | #1
On 16 May 2025, at 10:22, Yiding Liu (Fujitsu) via lists.openembedded.org <liuyd.fnst=fujitsu.com@lists.openembedded.org> wrote:
> 
> fix issue that
> | Error: Transaction test error:
> |   file /usr/libexec/libunwind/check-namespace.sh conflicts between attempted installs of libunwind-1.8.1-r0.core2_64 and lib32-libunwind-1.8.1-r0.core2_32
> |   file /usr/libexec/libunwind/test-runner conflicts between attempted installs of libunwind-1.8.1-r0.core2_64 and lib32-libunwind-1.8.1-r0.core2_32

The clue is in the names: these are test binaries that should be in libunwind-ptest.   Please don’t immediately reach for multilib_script when that is actually a last resort.

Ross
Liu Yiding May 20, 2025, 8:31 a.m. UTC | #2
> -----Original Message-----
> From: Ross Burton <Ross.Burton@arm.com>
> Sent: 2025年5月16日 17:33
> To: Liu, Yiding/刘 乙丁 <liuyd.fnst@fujitsu.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v2] libunwind: fix multilib conflict
> 
> On 16 May 2025, at 10:22, Yiding Liu (Fujitsu) via lists.openembedded.org
> <liuyd.fnst=fujitsu.com@lists.openembedded.org> wrote:
> >
> > fix issue that
> > | Error: Transaction test error:
> > |   file /usr/libexec/libunwind/check-namespace.sh conflicts between
> attempted installs of libunwind-1.8.1-r0.core2_64 and
> lib32-libunwind-1.8.1-r0.core2_32
> > |   file /usr/libexec/libunwind/test-runner conflicts between attempted
> installs of libunwind-1.8.1-r0.core2_64 and lib32-libunwind-1.8.1-r0.core2_32
> 
> The clue is in the names: these are test binaries that should be in libunwind-ptest.
> Please don’t immediately reach for multilib_script when that is actually a last
> resort.

Currently, libunwind does not support ptest yet, so I need to add ptest for libunwind, right?
This is not easy for me.

Because several ptest cases keep failing, and I don’t know how to fix them...


Liu Yiding



> 
> Ross
Liu Yiding May 20, 2025, 8:57 a.m. UTC | #3
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org
> <openembedded-core@lists.openembedded.org> On Behalf Of Yiding Liu (Fujitsu)
> via lists.openembedded.org
> Sent: 2025年5月20日 16:32
> To: Ross Burton <Ross.Burton@arm.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v2] libunwind: fix multilib conflict
> 
> 
> 
> > -----Original Message-----
> > From: Ross Burton <Ross.Burton@arm.com>
> > Sent: 2025年5月16日 17:33
> > To: Liu, Yiding/刘 乙丁 <liuyd.fnst@fujitsu.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH v2] libunwind: fix multilib conflict
> >
> > On 16 May 2025, at 10:22, Yiding Liu (Fujitsu) via
> > lists.openembedded.org <liuyd.fnst=fujitsu.com@lists.openembedded.org>
> wrote:
> > >
> > > fix issue that
> > > | Error: Transaction test error:
> > > |   file /usr/libexec/libunwind/check-namespace.sh conflicts between
> > attempted installs of libunwind-1.8.1-r0.core2_64 and
> > lib32-libunwind-1.8.1-r0.core2_32
> > > |   file /usr/libexec/libunwind/test-runner conflicts between
> > > | attempted
> > installs of libunwind-1.8.1-r0.core2_64 and
> > lib32-libunwind-1.8.1-r0.core2_32
> >
> > The clue is in the names: these are test binaries that should be in
> libunwind-ptest.
> > Please don’t immediately reach for multilib_script when that is
> > actually a last resort.
> 
> Currently, libunwind does not support ptest yet, so I need to add ptest for
> libunwind, right?
> This is not easy for me.
> 
> Because several ptest cases keep failing, and I don’t know how to fix them...

There are 3 failed cases(total 47):
28 not ok - test-ptrace returned 255
32 not ok - x64-unwind-badjmp-signal-frame returned 1
33 not ok - check-namespace.sh returned 1

Firstly, I am working on check-namespace.sh.
check-namespace.sh test case need to "nm -g /usr/lib/libunwind.so" and check symbols.
Which means we should pack unstripped /usr/lib/libunwind.so to core-image-ptest-libunwind.
Now /usr/lib/libunwind.so in core-image-ptest-libunwind is stripped that "nm -g" always fail.


Liu Yiding

> 
> 
> Liu Yiding
> 
> 
> 
> >
> > Ross
Ross Burton May 20, 2025, 10:27 a.m. UTC | #4
> On 20 May 2025, at 09:31, Yiding Liu (Fujitsu) <liuyd.fnst@fujitsu.com> wrote:
> Currently, libunwind does not support ptest yet, so I need to add ptest for libunwind, right?
> This is not easy for me.

Then the right fix would be to disable installation of the test suite, or to wrap the installation of those files so they’re not installed if the tests are disabled.

Ross
diff mbox series

Patch

diff --git a/meta/recipes-support/libunwind/libunwind_1.8.1.bb b/meta/recipes-support/libunwind/libunwind_1.8.1.bb
index 68d7a98ee4..e8c5a3d474 100644
--- a/meta/recipes-support/libunwind/libunwind_1.8.1.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.8.1.bb
@@ -19,7 +19,7 @@  SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
 
 SRC_URI[sha256sum] = "ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157"
 
-inherit autotools multilib_header github-releases
+inherit autotools multilib_header github-releases multilib_script
 
 COMPATIBLE_HOST:riscv32 = "null"
 
@@ -30,6 +30,9 @@  PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, lat
 
 EXTRA_OECONF = "--enable-static"
 
+MULTILIB_SCRIPTS = "${PN}:${libexecdir}/libunwind/check-namespace.sh \
+                    ${PN}:${libexecdir}/libunwind/test-runner"
+
 # http://errors.yoctoproject.org/Errors/Details/20487/
 ARM_INSTRUCTION_SET:armv4 = "arm"
 ARM_INSTRUCTION_SET:armv5 = "arm"