multilib: Fix and improve support in musl and glibc
cover multilib: Fix and improve support in musl and glibc
Both changes target ldd helper handling in packages:
1) For musl this fixes do_install error where ldd provided in both main target and multilib packages.
2) For glibc make behaviour inline with musl by providing ldd via RRECOMMENDS and avoid filename clash as fixed in 1) for musl.
Build tested on IBM POWER8 running RHEL7 machine for ppc64p5 as main target and ppcp5 as multilib with package lib32-glib-2.0 from Yocto manual.
Boot tested as KVM-HV guest on IBM POWER8 machine.
Serhey Popovych (2):
musl: Fix ldd symlink install in case of multilib
glibc: Rename ldd in multilib package
meta/recipes-core/glibc/glibc-package.inc | 7 ++++++- meta/recipes-core/musl/musl_git.bb | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/2 musl: Fix ldd symlink install in case of multilib
Otherwise dnf install lib32-musl and musl will fail with below error:
ERROR: core-image-sato-1.0-r0 do_rootfs: Could not invoke dnf.
...
Error: Transaction check error:
file /usr/bin/ldd.musl conflicts between attempted installs of \
musl-1.1.20+git0+39ef612aa1-r0.ppc64p8 and \
lib32-musl-1.1.20+git0+39ef612aa1-r0.ppcp8
...
--- meta/recipes-core/musl/musl_git.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
meta/recipes-core/musl/musl_git.bb +3 -2
@@ -61,8 +61,9 @@ do_install() { oe_runmake install DESTDIR='${D}' install -d ${D}${bindir} - rm -f ${D}${bindir}/ldd - lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd + [ -n "${MLPREFIX}" ] && LDD="ldd.${PN}" || LDD="ldd" + rm -f ${D}${bindir}/${LDD} + lnr ${D}${libdir}/libc.so ${D}${bindir}/${LDD} lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO} for l in crypt dl m pthread resolv rt util xnet do
Signature · 1 line
2.7.4
PATCH 2/2 glibc: Rename ldd in multilib package
In reply to Serhey PopovychThis is symmetrical to musl change that renames ldd to ldd.${PN} for multilib package to avoid filename collision on install.
While there add ldd to glibc package RRECOMMENDS since it is a shell script not larger than 6Kb in size that costs nothing in compare with overall glibc binary size and utility could be useful for trivial debugging steps. If required recommendation can be easily dropped (e.g. via NO_RECOMMENDATIONS).
--- meta/recipes-core/glibc/glibc-package.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-package.inc +6 -1
@@ -19,7 +19,8 @@ libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1" INSANE_SKIP_${PN}_append_aarch64 = " libdir" FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf" -FILES_ldd = "${bindir}/ldd" +RRECOMMENDS_${PN} = "ldd" +FILES_ldd = "${bindir}/ldd${@['.${PN}', ''][not d.getVar('MLPREFIX')]}" FILES_libsegfault = "${base_libdir}/libSegFault*" FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*" FILES_libmemusage = "${base_libdir}/libmemusage.so"
@@ -92,6 +93,10 @@ do_install_append () { return fi + if [ -n "${MLPREFIX}" ]; then + mv "${D}${bindir}/ldd" "${D}${bindir}/ldd.${PN}" + fi + install -d ${D}${sysconfdir}/init.d install -d ${D}${localstatedir}/db/nscd install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
Signature · 1 line
2.7.4
Serhey Popovych wrote:
Does anyone have time to look at this? Reviews wanted!
Thanks,
Serhey
Quoted 22 lines
Both changes target ldd helper handling in packages:
1) For musl this fixes
do_installerror where ldd provided in both main target and multilib packages.2) For glibc make behaviour inline with musl by providing ldd via RRECOMMENDS and avoid filename clash as fixed in 1) for musl.
Build tested on IBM POWER8 running RHEL7 machine for ppc64p5 as main target and ppcp5 as multilib with package lib32-glib-2.0 from Yocto manual.
Boot tested as KVM-HV guest on IBM POWER8 machine.
Serhey Popovych (2):
musl: Fix ldd symlink install in case of multilib
glibc: Rename ldd in multilib packagemeta/recipes-core/glibc/glibc-package.inc | 7 ++++++- meta/recipes-core/musl/musl_git.bb | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-)