<?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>15227</bug_id>
          
          <creation_ts>2023-10-09 09:31:16 +0000</creation_ts>
          <short_desc>bin_package.bbclass can not find objcopy or strip</short_desc>
          <delta_ts>2024-10-10 12:06:56 +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>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>5.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Thomas Roos">thomas</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>96665</commentid>
    <comment_count>0</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2023-10-09 09:31:16 +0000</bug_when>
    <thetext>Only on master, since a few weeks!
We see those errors: 
ERROR: firecracker-bin-1.3.3-r0 do_package: Fatal errors occurred in subprocesses:
[Errno 2] No such file or directory: &apos;x86_64-poky-linux-objcopy&apos;: Traceback (most recent call last):
  File &quot;/data/buildbot/worker/meta_aws_release_builder_master_qemux86_64/build/meta-aws-ci/meta-aws-tests/yocto_master/poky/meta/lib/oe/utils.py&quot;, line 288, in run
    ret = self._target(*self._args, **self._kwargs)
  File &quot;/data/buildbot/worker/meta_aws_release_builder_master_qemux86_64/build/meta-aws-ci/meta-aws-tests/yocto_master/poky/meta/lib/oe/package.py&quot;, line 805, in splitdebuginfo
    subprocess.check_output([objcopy, &apos;--only-keep-debug&apos;, file, debugfile], stderr=subprocess.STDOUT)
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: &apos;x86_64-poky-linux-objcopy&apos;

and then when setting INHIBIT_PACKAGE_DEBUG_SPLIT = &quot;1&quot;

  File &quot;/data/buildbot/worker/meta_aws_release_builder_master_qemuarm64/build/meta-aws-ci/meta-aws-tests/yocto_master/poky/meta/lib/oe/utils.py&quot;, line 288, in run
    ret = self._target(*self._args, **self._kwargs)
  File &quot;/data/buildbot/worker/meta_aws_release_builder_master_qemuarm64/build/meta-aws-ci/meta-aws-tests/yocto_master/poky/meta/lib/oe/package.py&quot;, line 66, in runstrip
    output = subprocess.check_output(stripcmd, stderr=subprocess.STDOUT)
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File &quot;/usr/lib/python3.8/subprocess.py&quot;, line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: &apos;aarch64-poky-linux-strip&apos;

so next try for a workaround
will be: INHIBIT_PACKAGE_STRIP

But might those options should be default in that class?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96684</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-10-12 14:35:47 +0000</bug_when>
    <thetext>Do you set INHIBIT_DEFAULT_DEPS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96686</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-10-12 14:40:47 +0000</bug_when>
    <thetext>My mistake, bin_package sets it.

This means it can&apos;t find strip because it doesn&apos;t have the dependency on binutils...

I have a patch somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96688</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-10-12 14:45:04 +0000</bug_when>
    <thetext>If you can replicate this on demand, try adding this to your recipe:

PACKAGE_DEPENDS:append:class-target = &quot; virtual/${TARGET_PREFIX}binutils&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98736</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-04-11 14:52:24 +0000</bug_when>
    <thetext>Bumping, but Thomas: please reply to the questions above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98751</commentid>
    <comment_count>5</comment_count>
    <who name="Thomas Roos">thomas</who>
    <bug_when>2024-04-15 15:35:30 +0000</bug_when>
    <thetext>can not replicate on demand, but changed solution to suggested:
 PACKAGE_DEPENDS:append:class-target = &quot; virtual/${TARGET_PREFIX}binutils&quot;
will give feedback if it failed or does not fail anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99811</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2024-10-10 12:06:56 +0000</bug_when>
    <thetext>This can&apos;t be a problem in master (or the last few releases) because of these two commits.

First, the default deps were inhibited. This is what causes objdump to not be available:

commit b7b382101b401deda2df5e7f71e581d8ced51f5f
Author: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Date:   Fri Aug 18 18:09:19 2023 +0200

    bin_package.bbclass: Inhibit the default dependencies

    Nothing is being built so there is no need for the cross-compiler.

    (From OE-Core rev: d1d09bd4d7be88f0e341d5fccbfbefeb98d4b727)


But this was reverted because it also meant that file depends also failed:

commit 50c57ee367dcb32d664e315d8e812de57cd24060
Author: Max Krummenacher &lt;max.krummenacher@toradex.com&gt;
Date:   Sun Aug 27 10:09:53 2023 +0200

    Revert &quot;bin_package.bbclass: Inhibit the default dependencies&quot;

    This reverts commit d1d09bd4d7be88f0e341d5fccbfbefeb98d4b727.

    The commit not only removes the dependencies on the cross compiler
    but also does not depend on e.g. virtual/${TARGET_PREFIX}compilerlibs
    and virtual/libc which in turn makes the file-rdeps qa check fail
    if installing binaries linked against e.g. libc or libstdc++.

    (From OE-Core rev: ababf6ceebe360c5f59a57428566c27b7a97a9e6)

Closing as if this is broken in a stable branch then backport the revert.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>