<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>14977</bug_id>
          
          <creation_ts>2022-11-30 15:01:24 +0000</creation_ts>
          <short_desc>qemu-usermode fails with musl systemd usrmerge</short_desc>
          <delta_ts>2023-01-27 10:04:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>4.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Vivien Didelot">vivien.didelot</reporter>
          <assigned_to name="Pavel Zhukov">pavel</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>pavel</cc>
    
    <cc>raj.khem</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>94464</commentid>
    <comment_count>0</comment_count>
    <who name="Vivien Didelot">vivien.didelot</who>
    <bug_when>2022-11-30 15:01:24 +0000</bug_when>
    <thetext>Building glib (pulled in by systemd) with a distro using TCLIBC=&quot;musl&quot;, INIT_MANAGER=&quot;systemd&quot; and DISTRO_FEATURES+=&quot;usrmerge&quot; fails with:

    qemu-arm: Could not open &apos;/lib/ld-musl-armhf.so.1&apos;: No such file or directory

Skipping qemu with MACHINE_FEATURES_BACKFILL_CONSIDERED:append:libc-musl = &quot; qemu-usermode&quot; works around the issue.

For details about the issue caused by the /lib path used by musl, see the related fix merge in Buildroot: https://git.buildroot.net/buildroot/commit/?id=47e8cc8e8ef7c64799495888fb16e92578f7dbf6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94465</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2022-11-30 16:04:39 +0000</bug_when>
    <thetext>Is this specific to usrmerge?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94466</commentid>
    <comment_count>2</comment_count>
    <who name="Vivien Didelot">vivien.didelot</who>
    <bug_when>2022-11-30 16:10:01 +0000</bug_when>
    <thetext>&gt; Is this specific to usrmerge?

Kinda, because the following fix could work:

    do_install:append () {
        ln -rs ${D}${libdir}/libc.so ${D}/lib/ld-musl-${MUSL_LDSO_ARCH}.so.1
    }

but then qa will error out with musl not obeying the usrmerge feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94709</commentid>
    <comment_count>3</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-12 16:45:57 +0000</bug_when>
    <thetext>Hello Vivien,

Can you please specify exact version you&apos;re building for? Seems like this issue has been fixed in OE-core few years ago (cc32ccc2fb928b0afce7d4add1b61a3073f8988e). I cannot reproduce it with kirkstone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94710</commentid>
    <comment_count>4</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-12 16:56:09 +0000</bug_when>
    <thetext>complete fix seems to be:
Author:     Khem Raj &lt;raj.khem@gmail.com&gt;
AuthorDate: Thu Apr 21 21:05:51 2022 -0700
Commit:     Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
CommitDate: Wed May 4 13:07:33 2022 +0100

Parent:     6107518b42 arch-armv8-2a.inc: fix a typo in TUNEVALID variable
Contained:  kirkstone
Follows:    kirkstone-4.0 (74)
Precedes:   kirkstone-4.0.1 (85)

musl: Fix build when usrmerge distro feature is enabled

(From OE-Core rev: 8a9f1d5a11b01de3145b16c19d98c3f030473326)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94711</commentid>
    <comment_count>5</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-12 17:03:46 +0000</bug_when>
    <thetext>Build Configuration:
BB_VERSION           = &quot;2.0.0&quot;
BUILD_SYS            = &quot;x86_64-linux&quot;
NATIVELSBSTRING      = &quot;universal&quot;
TARGET_SYS           = &quot;arm-poky-linux-musleabi&quot;
MACHINE              = &quot;qemuarm&quot;
DISTRO               = &quot;poky&quot;
DISTRO_VERSION       = &quot;4.0.6&quot;
TUNE_FEATURES        = &quot;arm vfp cortexa15 neon thumb callconvention-hard&quot;
TARGET_FPU           = &quot;hard&quot;
meta                 
meta-poky            
meta-yocto-bsp       = &quot;kirkstone:d3e378397395542179a8497fbff4b610f6f7e802&quot;


| DEBUG: Executing shell function do_configure
| NOTE: Executing meson -Dnobody-user=nobody -Dnobody-group=nobody -Drootlibdir=/usr/lib -Drootprefix=/usr -Ddefault-locale=C -Dmode=release -Dsystem-alloc-uid-min=101 -Dsystem-uid-max=999 -Dsystem-alloc-gid-min=101 -Dsystem-gid-max=999 -Dkexec-path=/usr/sbin/kexec -Dkmod-path=/usr/bin/kmod -Dmount-path=/usr/bin/mount -Dquotacheck-path=/usr/sbin/quotacheck -Dquotaon-path=/usr/sbin/quotaon -Dsulogin-path=/usr/sbin/sulogin -Dnologin-path=/usr/sbin/nologin -Dumount-path=/usr/bin/umount -Dacl=false -Daudit=false -Dbacklight=true -Dbinfmt=true -Dbzip2=false -Ddefault-hierarchy=hybrid -Dcoredump=false -Dlibcryptsetup=false -Ddbus=false -Defi=false -Delfutils=false -Dfirstboot=false -Dgcrypt=false -Dgnu-efi=false -Dgnutls=false -Dgshadow=false -Dhibernate=true -Dhomed=false -Dhostnamed=true -Didn=false -Dima=true -Dimportd=false -Dlibiptc=false -Dlibcurl=false -Dkmod=true -Dldconfig=false -Dlibidn=false -Dlibidn2=false -Dlink-udev-shared=true -Dlocaled=false -Dlogind=true -Dlz4=false -Dmachined=true -Dman=false -Dmicrohttpd=false -Dnss-myhostname=false -Dnetworkd=true -Dnss-systemd=false -Dnss-mymachines=false -Dnss-resolve=false -Doomd=false -Dopenssl=false -Dpam=false -Dpcre2=false -Dpolkit=false -Dportabled=false -Dqrencode=false -Dquotacheck=true -Drandomseed=true -Drepart=false -Dresolve=true -Drfkill=false -Dsplit-bin=true -Dseccomp=false -Dselinux=false -Dtime-epoch=1651167745 -Dsmack=false -Dsysusers=false -Dsysvinit-path=/etc/init.d -Dsysvrcnd-path=/etc -Dtimedated=true -Dtimesyncd=true -Dtpm2=false -Duserdb=false -Dsplit-usr=false -Dutmp=false -Dvconsole=true -Dwheel-group=true -Dxdg-autostart=false -Dxkbcommon=false -Dxz=false -Dzlib=false -Dzstd=true...
| qemu-arm: Could not open &apos;/lib/ld-musl-armhf.so.1&apos;: No such file or directory
| The Meson build system
| Version: 0.61.3
| Source dir: /home/pzhukov/repos/yocto/builds/build-14977/tmp/work/cortexa15t2hf-neon-poky-linux-musleabi/systemd/1_250.5-r0/git
| Build dir: /home/pzhukov/repos/yocto/builds/build-14977/tmp/work/cortexa15t2hf-neon-poky-linux-musleabi/systemd/1_250.5-r0/build
| Build type: cross build
| Project name: systemd
| Project version: 250</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94717</commentid>
    <comment_count>6</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-13 10:25:17 +0000</bug_when>
    <thetext>The commit which fixed this in langdale is update gcc to 12.1 [1].

[1]
commit fa72b850b1b1cdb87b186dc5deee0ca1b266272c (HEAD)
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Thu Apr 21 19:08:30 2022 -0700

    gcc: upgrade 11.3 -&gt; 12.1
    
    Major gcc release with lot of changes [2]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94721</commentid>
    <comment_count>7</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2023-01-13 16:41:51 +0000</bug_when>
    <thetext>Does your poky checkout has this commit 

https://git.yoctoproject.org/poky/commit/?id=fba37dce43370ab0cea30f28267676932a957100

If not then perhaps try it out and it will fix this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94726</commentid>
    <comment_count>8</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-13 17:08:51 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Does your poky checkout has this commit 
&gt; 
&gt; https://git.yoctoproject.org/poky/commit/
&gt; ?id=fba37dce43370ab0cea30f28267676932a957100
&gt; 
&gt; If not then perhaps try it out and it will fix this problem.

Yes, I&apos;ve checked this commit even before bisecting langdale. 
fa72b850b1b1cdb87b186dc5deee0ca1b266272c is gcc update from 11.3 to 12.1 and it fixes the build. So it&apos;s something in the gcc itself which fixes this in langdale (and that&apos;s why it&apos;s broken in kirkstone).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94728</commentid>
    <comment_count>9</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-16 07:00:50 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/175959</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94821</commentid>
    <comment_count>10</comment_count>
    <who name="Pavel Zhukov">pavel</who>
    <bug_when>2023-01-27 10:04:08 +0000</bug_when>
    <thetext>Fixed in: https://git.openembedded.org/openembedded-core/commit/?h=kirkstone&amp;id=d821a602c56a8d0c8171ee0d2ce31613121be3a6</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>