<?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>13122</bug_id>
          
          <creation_ts>2019-01-04 19:09:29 +0000</creation_ts>
          <short_desc>Multilib check error: duplicate files pyconfig.h is not the same</short_desc>
          <delta_ts>2026-09-30 14:30:02 +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>unspecified</version>
          <rep_platform>All</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>5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Athanasios Oikonomou">athoik</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>akuster808</cc>
    
    <cc>kai.kang</cc>
    
    <cc>Martin.Jansa</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82684</commentid>
    <comment_count>0</comment_count>
    <who name="Athanasios Oikonomou">athoik</who>
    <bug_when>2019-01-04 19:09:29 +0000</bug_when>
    <thetext>Building multilib python-core and lib32-python-core results in the following error:

$ bitbake core-image-minimal
...
ERROR: core-image-minimal-1.0-r0 do_rootfs: Multilib check error: duplicate files /opt/openembedded-core/build/tmp-musl/work/qemuarm64-oe-linux-musl/core-image-minimal/1.0-r0/multilib/lib32/usr/include/python2.7/pyconfig.h /opt/openembedded-core/build/tmp-musl/work/qemuarm64-oe-linux-musl/core-image-minimal/1.0-r0/rootfs/usr/include/python2.7/pyconfig.h is not the same

ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /opt/openembedded-core/build/tmp-musl/work/qemuarm64-oe-linux-musl/core-image-minimal/1.0-r0/temp/log.do_rootfs.10995
ERROR: Task (/opt/openembedded-core/meta/recipes-core/images/core-image-minimal.bb:do_rootfs) failed with exit code &apos;1&apos;

I am using the following settings in local.conf

MACHINE = &quot;qemuarm64&quot;
BB_NUMBER_THREADS = &quot;4&quot;
PARALLEL_MAKE = &quot;-j 8&quot;
TCLIBC = &quot;musl&quot;
INHERIT += &quot;rm_work&quot;
DL_DIR = &quot;/opt/sources&quot;
TOPDIR = &quot;/opt/openembedded-core/build&quot;
DISTRO_FEATURES_BACKFILL_CONSIDERED += &quot;gobject-introspection-data&quot;
GIO_MODULE_PACKAGES = &quot;&quot;
LICENSE_FLAGS_WHITELIST=&quot;commercial&quot;

require conf/multilib.conf
MULTILIBS = &quot;multilib:lib32&quot;
DEFAULTTUNE_virtclass-multilib-lib32 = &quot;armv7ahf-neon-vfpv4&quot;
# Specify the 32-bit libraries to be added to the image
IMAGE_INSTALL_append = &quot; lib32-libgcc lib32-libstdc++ python-core lib32-python-core&quot;

Please note that TCLIBC seems the culprit. Tried with default glibc and problem doesn&apos;t appear.

Tests performed with master OE-Core e0db1beb6.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82689</commentid>
    <comment_count>1</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2019-01-07 03:28:30 +0000</bug_when>
    <thetext>It calls function oe_multilib_header() to deal pyconfig.h for multilib in python recipe. The function is from multilib_header.bbclass and disabled for musl by commit 7e84ec1


commit 7e84ec1a7420b63932d3aaf141e62db550f9bd13
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Thu May 29 00:01:03 2014 -0700

    multilib_header: Do not install mutlilib headers for musl
    
    musl is not multilib and this creates trouble. eg. when
    util-linux probes for ncurses it does not find it because
    ncurses has installed the multilibbed header and this
    header includes bits/wordsize.h and this header does not
    exist on musl systems. If and when musl adds multilib
    support we will revisit it.
    
    (From OE-Core rev: dad1c2746326912db41a3ff180679cdfe0e844f9)
    
    Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82707</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-01-08 12:38:11 +0000</bug_when>
    <thetext>Khem: does musl support multilib?

I guess we either should enable multilib headers under musl, or make musl error out if multilib is enabled.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82710</commentid>
    <comment_count>3</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2019-01-08 15:25:28 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Khem: does musl support multilib?
&gt; 
&gt; I guess we either should enable multilib headers under musl, or make musl
&gt; error out if multilib is enabled.

it can we have never added it and it does not have to since it s a new library.
lets disable it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82729</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-01-10 15:42:31 +0000</bug_when>
    <thetext>Khem: by &apos;it&apos; do you mean lets disable multilib under musl?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86941</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-04-08 23:19:18 +0000</bug_when>
    <thetext>I&apos;ve sent a patch to disable musl if multilibs are enabled so the user is told clearly its not supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86944</commentid>
    <comment_count>6</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-04-09 01:11:51 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; I&apos;ve sent a patch to disable musl if multilibs are enabled so the user is
&gt; told clearly its not supported.

I think an alternate to enable multilib headers for musl is better, I have tested exact same image as reported in image and its working ok with the patch [1] applied to oe-core.

[1] https://lists.openembedded.org/g/openembedded-core/topic/patch_multilib_enable/72887956</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87754</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-07-13 06:07:58 +0000</bug_when>
    <thetext>Sadly we were unable to enable multilib for musl. Any update on that khem?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87756</commentid>
    <comment_count>8</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-07-13 17:20:51 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Sadly we were unable to enable multilib for musl. Any update on that khem?

it should work fine these days, I have fixed the ldso issues which were the problem</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88003</commentid>
    <comment_count>9</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2020-08-20 21:42:50 +0000</bug_when>
    <thetext>Patch to finally enable multilib with musl is sent to mailing list for review, the test mentioned in comment #1 should work fine now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88638</commentid>
    <comment_count>10</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-11-19 16:30:04 +0000</bug_when>
    <thetext>Does this address the issue?

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-core/musl?id=23c467ae7e73a56b7903c1450c24f9d2d2f02324</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94363</commentid>
    <comment_count>11</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-11-03 15:27:31 +0000</bug_when>
    <thetext>RP said: musl has been enabled but just needs to be retested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99497</commentid>
    <comment_count>12</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-08-06 09:25:55 +0000</bug_when>
    <thetext>MACHINE = &quot;qemuarm64&quot;
TCLIBC = &quot;musl&quot;
require conf/multilib.conf
MULTILIBS = &quot;multilib:lib32&quot;
DEFAULTTUNE:virtclass-multilib-lib32 = &quot;armv7ahf-neon-vfpv4&quot;
IMAGE_INSTALL:append = &quot; lib32-libgcc lib32-libstdc++ python3-core lib32-python3-cor

and running &quot;bitbake core-image-minimal&quot; results in:

Error: Transaction test error:
  file /usr/bin/ldd conflicts between attempted installs of musl-1.2.4+git0+79bdacff83-r0.cortexa57 and lib32-musl-1.2.4+git0+79bdacff83-r0.armv7ahf_neon_vfpv4
  file /usr/include/python3.12/pyconfig.h conflicts between attempted installs of lib32-python3-core-3.12.4-r0.armv7ahf_neon_vfpv4 and python3-core-3.12.4-r0.cortexa57

so the issue is still present as of 5.1 M2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99498</commentid>
    <comment_count>13</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-08-06 09:33:29 +0000</bug_when>
    <thetext>musl multilib headers are disabled. If I enable them:

diff --git a/meta/classes-recipe/multilib_header.bbclass b/meta/classes-recipe/multilib_header.bbclass
index 33f7e027f06..7c454f4f06d 100644
--- a/meta/classes-recipe/multilib_header.bbclass
+++ b/meta/classes-recipe/multilib_header.bbclass
@@ -13,12 +13,6 @@ inherit siteinfo
 #
 oe_multilib_header() {
 
-       case ${HOST_OS} in
-       *-musl*)
-               return
-               ;;
-       *)
-       esac
         # For MIPS: &quot;n32&quot; is a special case, which needs to be
         # distinct from both 64-bit and 32-bit.
         case ${TARGET_ARCH} in

then the build breaks as the multilib header code doesn&apos;t work on musl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99499</commentid>
    <comment_count>14</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-08-06 09:47:07 +0000</bug_when>
    <thetext>I&apos;m sending my patch to error for this config again. We can remove the patch if this does get fixed to work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99506</commentid>
    <comment_count>15</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-08-07 16:09:25 +0000</bug_when>
    <thetext>musl marked as not compatible with multilib: https://git.yoctoproject.org/poky/commit/?id=4ca98d99046da0297eb7cb8c7444427bbfc0b9b7</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>