<?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>16069</bug_id>
          
          <creation_ts>2025-11-19 00:11:37 +0000</creation_ts>
          <short_desc>Compiled kernel out-of-tree modules contain relative paths from $S to $KERNEL_SRC (also impact non-modules packages)</short_desc>
          <delta_ts>2025-11-27 16:08:05 +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>kernel</component>
          <version>unspecified</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>High</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yoann Congal">yoann.congal</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>skandigraun</cc>
    
    <cc>yoann.congal</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>103322</commentid>
    <comment_count>0</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-19 00:11:37 +0000</bug_when>
    <thetext>To reproduce, with the meta-skeleton enabled and without rm_work:

 $ bitbake hello-mod
 $ strings tmp/work/qemux86_64-poky-linux/hello-mod/0.1/image/lib/modules/6.16.11-yocto-standard/updates/hello.ko |grep &apos;work-shared&apos; |sort -u
../../../../../work-shared/qemux86-64/kernel-source/arch/x86/include/asm
../../../../../work-shared/qemux86-64/kernel-source/include/asm-generic
../../../../../work-shared/qemux86-64/kernel-source/include/linux
../../../../../work-shared/qemux86-64/kernel-source/include/linux/atomic
../../../../../work-shared/qemux86-64/kernel-source/include/linux/sched
../../../../../work-shared/qemux86-64/kernel-source/include/uapi/asm-generic
../../../../../work-shared/qemux86-64/kernel-source/include/uapi/linux
../../../../../work-shared/qemux86-64/kernel-source/include/vdso
../../../../../work-shared/qemux86-64/kernel-source/scripts
../../../../../work-shared/qemux86-64/kernel-source/scripts/module-common.c

Note: &quot;../../../../../work-shared/qemux86-64/kernel-source/&quot; is the relative path from $S to $KERNEL_SRC

That come from hello.ko having debug paths like &quot;/usr/src/debug/hello-mod/0.1/../../../../../work-shared/qemux86-64/kernel-source/include/linux/sched.h&quot; (which are wrong)

debugsources.list is also wrong:
 $ cat tmp/work/qemux86_64-poky-linux/hello-mod/0.1/debugsources.list |tr &apos;\0&apos; &apos;\n&apos; |grep work-shared |sort -u |head
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/asm.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/desc_defs.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/extable.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/mmu.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/module.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/pgtable_64_types.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/pgtable_types.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/processor.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/signal.h
/work-shared/qemux86-64/kernel-source/arch/x86/include/asm/thread_info.h</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103325</commentid>
    <comment_count>1</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-19 10:42:09 +0000</bug_when>
    <thetext>This patch looks related: [PATCH] bitbake.conf: add canon-prefix-map to DEBUG_PREFIX_MAP
https://lists.openembedded.org/g/openembedded-core/message/226545</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103326</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-19 11:08:14 +0000</bug_when>
    <thetext>Just tested, this patch does fix this bug : [PATCH] bitbake.conf: add canon-prefix-map to DEBUG_PREFIX_MAP
https://lists.openembedded.org/g/openembedded-core/message/226545</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103346</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-11-20 15:42:43 +0000</bug_when>
    <thetext>Not a release blocker. We might back-port a fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103350</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-11-20 15:48:02 +0000</bug_when>
    <thetext>My bad, this IS a release blocker for 5.3-M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103352</commentid>
    <comment_count>5</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-20 15:49:58 +0000</bug_when>
    <thetext>New patch iteration:
[PATCH 0/2] -fcanon-file-prefix and cc-rs compiler flag mixing
https://lists.openembedded.org/g/openembedded-core/message/226617
[PATCH 1/2] bitbake.conf, gcc toolchain: add -fcanon-prefix-map to map-prefixes
https://lists.openembedded.org/g/openembedded-core/message/226618
[PATCH 2/2] rust-common.bbclass: filter out incorrect compiler flags in wrapper
https://lists.openembedded.org/g/openembedded-core/message/226619</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103356</commentid>
    <comment_count>6</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-11-20 16:12:29 +0000</bug_when>
    <thetext>Added a note to the title to show that this impacts packages more generally than &quot;just&quot; out-of-tree kernel modules.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103414</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-11-27 16:08:05 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?id=3dbc4a79f01ebfc54da024c1460c06772659088d
https://git.openembedded.org/openembedded-core/commit/?id=f61379feed40f90345a6886df5eb959749a7b956</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>