Skip to contentSkip to conversation

musl: removes aliases for glibc provided libraries

PATCH Superseded Khem Raj 2 participants 5 messages Mar 12, 2020 – Mar 13, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 musl: removes aliases for glibc provided libraries

From: Jan Kaisrlik <[email protected]>

Based on the recommendation in musl mailing list[1] All symlinks have been removed from musl recipe.

[1]: https://www.openwall.com/lists/musl/2020/03/10/11

---
 meta/recipes-core/musl/musl_git.bb | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
meta/recipes-core/musl/musl_git.bb +1 -14
index afc8446547..f4fbb03092 100644
@@ -66,24 +66,11 @@ do_install() {
 	rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO}
 	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
-		ln -sf libc.so ${D}${libdir}/lib$l.so
-	done
-	for i in libc.so.6 libcrypt.so.1 libdl.so.2 libm.so.6 libpthread.so.0 libresolv.so.2 librt.so.1 libutil.so.1; do
-		ln -sf libc.so ${D}${libdir}/$i
-	done
 }
 
 PACKAGES =+ "${PN}-glibc-compat"
 
-FILES_${PN}-glibc-compat += "\
-                ${libdir}/libc.so.6 ${libdir}/libcrypt.so.1 \
-                ${libdir}/libdl.so.2 ${libdir}/libm.so.6 \
-                ${libdir}/libpthread.so.0 ${libdir}/libresolv.so.2 \
-                ${libdir}/librt.so.1 ${libdir}/libutil.so.1 \
-                ${GLIBC_LDSO} \
-                "
+FILES_${PN}-glibc-compat += "${GLIBC_LDSO}"
 
 RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev libssp-nonshared-staticdev"
 RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
Signature · 1 line
2.25.1
author
#1 lore raw

PATCH 1/1 weston-init: Launch weston with WESTON_DISABLE_ATOMIC on musl/x86

Since we enabled drm/kms backend for qemux86, it does not work with musl fdbdev worked ok, we see this error

[18:58:45.628] launching '/usr/libexec/weston-desktop-shell' [18:58:45.737] atomic: couldn't commit new state: Invalid argument [18:58:45.737] repaint-flush failed: Invalid argument

There seems to be some problem with atomics in libdrm, until that gets diagnosed, simple solution is to not use it on musl when drm backend is used thats why WESTON_DISABLE_ATOMIC=Y is set in environment file for such cases

---
 meta/recipes-graphics/wayland/weston-init.bb       | 14 ++++++++++++--
 .../wayland/weston-init/weston.env                 |  0
 2 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston-init/weston.env
meta/recipes-graphics/wayland/weston-init.bb +12 -2
index e3e739e2b7..40aa76295f 100644
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 SRC_URI = "file://init \
+           file://weston.env \
            file://weston.ini \
            file://[email protected] \
            file://71-weston-drm.rules \
@@ -15,6 +16,7 @@ S = "${WORKDIR}"
 do_install() {
 	install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
 	install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
+	install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
 
 	# Install Weston systemd service and accompanying udev rule
 	install -D -p -m0644 ${WORKDIR}/[email protected] ${D}${systemd_system_unitdir}/[email protected]
@@ -30,6 +32,14 @@ do_install() {
 	sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
 }
 
+do_install_append_libc-musl_qemux86() {
+        echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
+}
+
+do_install_append_libc-musl_qemux86-64() {
+        echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
+}
+
 inherit update-rc.d features_check systemd
 
 # rdepends on weston which depends on virtual/egl
@@ -40,9 +50,9 @@ RDEPENDS_${PN} = "weston kbd"
 INITSCRIPT_NAME = "weston"
 INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 
-FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/[email protected]"
+FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/[email protected] ${sysconfdir}/default/weston"
 
-CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini"
+CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
 
 SYSTEMD_SERVICE_${PN} = "weston@%i.service"
 SYSTEMD_AUTO_ENABLE = "disable"
meta/recipes-graphics/wayland/weston-init/weston.env new file +0 -0
new file mode 100644
index 0000000000..e69de29bb2
Signature · 1 line
2.25.1
#2 lore raw
In reply to Khem Raj
Quoted 5 lines · Khem Raj

From: Jan Kaisrlik <[email protected]>

Based on the recommendation in musl mailing list[1] All symlinks have been removed from musl recipe.

Quoted 7 lines

[1]: https://www.openwall.com/lists/musl/2020/03/10/11

---
 meta/recipes-core/musl/musl_git.bb | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

Breaks SDK tests:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1697

Cheers,

Richard

#3 lore raw
Quoted 15 lines · Richard Purdie
Quoted 6 lines · Khem Raj

From: Jan Kaisrlik <[email protected]>

Based on the recommendation in musl mailing list[1] All symlinks have
been removed from musl recipe.

Quoted 7 lines

[1]: https://www.openwall.com/lists/musl/2020/03/10/11

---
 meta/recipes-core/musl/musl_git.bb | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
Quoted 3 lines

Breaks SDK tests:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1697

I mean on target toolchain tests...

Cheers,

Richard

author
#4 lore raw
In reply to Richard Purdie
Quoted 14 lines · Richard Purdie
Quoted 5 lines · Khem Raj

From: Jan Kaisrlik <[email protected]>

Based on the recommendation in musl mailing list[1] All symlinks have been removed from musl recipe.

Quoted 7 lines

[1]: https://www.openwall.com/lists/musl/2020/03/10/11

---
  meta/recipes-core/musl/musl_git.bb | 15 +--------------
  1 file changed, 1 insertion(+), 14 deletions(-)
Quoted 4 lines

Breaks SDK tests:

https://autobuilder.yoctoproject.org/typhoon/#/builders/64/builds/1697

yeah its failing a simple test to link with -lm but this works ok on my end here, so I wonder whats different on AB ?

Quoted 4 lines

Cheers,

Richard