<?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>15632</bug_id>
          
          <creation_ts>2024-10-25 09:10:24 +0000</creation_ts>
          <short_desc>FIXMESTAGINGDIRHOST broken when recipes use externalsrc.bbclass (devtool?)</short_desc>
          <delta_ts>2026-04-01 19:06:07 +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>oe-core other</component>
          <version>5.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ola Nilsson">ola.x.nilsson</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>yoann.congal</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>100027</commentid>
    <comment_count>0</comment_count>
    <who name="Ola Nilsson">ola.x.nilsson</who>
    <bug_when>2024-10-25 09:10:24 +0000</bug_when>
    <thetext>Start in a clean build dir, /mnt/build/poky/fixmestagingdirhost in my case

## Do devtool modify equivalent for automake

devtool modify automake

# devtool modify automake does not work for me, these are the steps I
# take to create a workspace for automake:

bitbake -c fetch automake
tar -C workspace/sources -xaf downloads/automake-1.17.tar.gz
mv workspace/sources/automake-1.17 workspace/sources/automake
cat &gt; workspace/appends/automake_%.bbappend &lt;&lt;-EOF
	inherit externalsrc
	EXTERNALSRC:pn-automake = &quot;$PWD/workspace/sources/automake&quot;
	EXTERNALSRC:pn-automake-native = &quot;$PWD/workspace/sources/automake&quot;
EOF
git -C workspace/sources/automake init
git -C workspace/sources/automake add .
git -C workspace/sources/automake commit -m &quot;automake 1.17&quot;
git -C workspace/sources/automake apply $PWD/../meta/recipes-devtools/automake/automake/*.patch

# build automake-native
bitbake automake-native

# attempt to build libtool-native
bitbake libtool-native
....
Can&apos;t locate Automake/Config.pm in @INC (you may need to install the Automake::Config module) (@INC contains: /mnt/build/poky/fixmestagingdirhost/tmp/work/x86_64-linux/automake-native/1.17/recipe-sysroot-native/usr/share/automake-1.17 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /mnt/build/poky/fixmestagingdirhost/tmp/work/x86_64-linux/libtool-native/2.5.2/recipe-sysroot-native/usr/bin/automake line 48.
| BEGIN failed--compilation aborted at /mnt/build/poky/fixmestagingdirhost/tmp/work/x86_64-linux/libtool-native/2.5.2/recipe-sysroot-native/usr/bin/automake line 48.
....

The error message contains the automake-native RECIPE_SYSROOT_NATIVE:
/mnt/build/poky/fixmestagingdirhost/tmp/work/x86_64-linux/automake-native/1.17/recipe-sysroot-native/usr/share/automake-1.17
it should have been translated to
/mnt/build/poky/fixmestaginghost/tmp/work/x86_64-linux/libtool-native/2.5.2/recipe-sysroot-native/usr/share/automake-1.17
via the FIXMESTAGINGDIRHOST marker.

In a normal build
sysroot-destdir/${RECIPE_SYSROOT_NATIVE}/usr/bin/automake line 31 has
/mnt/build/poky/fixmestagingdirhost/tmp/work/x86_64-linux/automake-native/1.17/recipe-sysroot-native
replaced with the FIXMESTAGINGDIRHOST.  Likewise in
tmp/sysroots-components/x86_64/sysroots-components/x86_64/automake-native/usr/bin/automake.

In my devtooled builds,
sysroot-destdir/${RECIPE_SYSROOT_NATIVE}/usr/bin/automake line 31 has
not been changed and consequently neither has
tmp/sysroots-components/x86_64/sysroots-components/x86_64/automake-native/usr/bin/automake
and
tmp/work/x86_64-linux/libtool-native/2.5.2/recipe-sysroot-native/usr/bin/automake
There are also no fixmepath* files in
tmp/sysroots-components/x86_64/sysroots-components/x86_64/automake-native.

All of the instances of automake (in automake-native&apos;s D and
SYSROOT_DESTDIR, in the sysroot-components and in libtool-native&apos;s
RECIPE_SYSROOT_NATIVE) is the same hardlinked file both in the
normal and devtooled case.  Not sure whether that is relevant. 

As far as I can tell, the SYSROOT_RECIPE_NATIVE -&gt; FIXMESTAGINGDIRHOST
transformation is done in sstate_hardcode_path, which is not called
for recipes using externalsrc.bbclass because it sets
SSTATE_SKIP_CREATION = 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100037</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2024-10-25 10:20:09 +0000</bug_when>
    <thetext>From IRC so the context is not lost:

11:08:37) olani: RP: When I run &apos;devtool modify automake&apos; I get an error:
(11:08:40) olani: RP:  ERROR: Command &apos;[&apos;rm&apos;, &apos;-rf&apos;, &apos;/mnt/build/poky/fixmestagingdirhost/tmp/work/core2-64-poky-linux/automake/1.17/devtooltmp-2l27ojdj/workdir/sources-unpack&apos;]&apos; returned non-zero exit status 1.
(11:10:15) olani: RP: I don&apos;t get that for &apos;devtool modify quilt&apos;, so I think it&apos;s something special with automake.  I tried to figure out what was going on, but it was blocking me so I created the workspace by hand instead.
olani olof</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100038</commentid>
    <comment_count>2</comment_count>
    <who name="Ola Nilsson">ola.x.nilsson</who>
    <bug_when>2024-10-25 10:33:12 +0000</bug_when>
    <thetext>Trying to eliminate the hand-made automake workspace, I did 

devtool modify automake-native

which worked, but a subsequent

bitbake libtool-native

still fails with the same error.

The files in automake-natives SYSROOT_DESTDIR and tmp/sysroots-component/x86_64/automake-native are still not transformed with the marker.  No fixmepath* files are created.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101835</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-05-01 14:07:10 +0000</bug_when>
    <thetext>Bulk move of all unassigned 5.2 medium importance bugs to 5.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>104910</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2026-04-01 19:06:07 +0000</bug_when>
    <thetext>Still borken (sic), bump to 6.99

on bitbake/oe-core commits:

7cf11787e   2026-03-29   (HEAD -&gt; master, origin/master, origin/HEAD) doc: document new bitbake-setup init and update features

c56990178b   2026-03-27   (origin/master, origin/HEAD) python3: Add warning comment before PACKAGECONFIG[freethreading]


$ devtool modify automake --&gt; still broken 
# new project
$ devtool modify  automake-native --&gt; works
$ bitbake libtool-native --&gt; fails with:

| DEBUG: SITE files [&apos;endian-little&apos;, &apos;common-linux&apos;, &apos;common-glibc&apos;, &apos;bit-64&apos;, &apos;x86_64-linux&apos;, &apos;common&apos;]
| DEBUG: Python function autotools_sitefiles finished
| DEBUG: Executing shell function do_configure
| NOTE: Executing ACLOCAL=&quot;aclocal --aclocal-path=/media/rmacleod/gitter/rmacleod/src/distro/yocto/b/yp-15632/tmp/work/x86_64-linux/libtool-native/2.5.4/recipe-sysroot-native/usr/share/aclocal/&quot; autoreconf -Wcross --verbose --install --force --exclude=libtoolize
| autoreconf: export WARNINGS=cross,no-obsolete
| autoreconf: Entering directory &apos;.&apos;
| autoreconf: configure.ac: not using Gettext
| autoreconf: running: aclocal --aclocal-path=/media/rmacleod/gitter/rmacleod/src/distro/yocto/b/yp-15632/tmp/work/x86_64-linux/libtool-native/2.5.4/recipe-sysroot-native/usr/share/aclocal/ --force -I m4
| Can&apos;t locate Automake/Config.pm in @INC (you may need to install the Automake::Config module) (@INC contains: /.../yp-15632/tmp/work/x86_64-linux/automake-native/1.18.1/recipe-sysroot-native/usr/share/automake-1.18 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at /.../yp-15632/tmp/work/x86_64-linux/libtool-native/2.5.4/recipe-sysroot-native/usr/bin/aclocal line 33.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>