<?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>5625</bug_id>
          
          <creation_ts>2013-12-03 10:46:33 +0000</creation_ts>
          <short_desc>Bitbake ungracefully crashed when chrpath is not installed.</short_desc>
          <delta_ts>2014-01-16 16:37: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>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Nyström">david.nystrom</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>39197</commentid>
    <comment_count>0</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2013-12-03 10:46:33 +0000</bug_when>
    <thetext>Bitbake ungracefully crashes when chrpath is not installed.

A warning or error should be displayed when trying to build without it.


----------------------------------------------------------------
ERROR: Error executing a python function in /media/sdb5/eel/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb:
 
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;relocatable_binaries_preprocess&apos;, lineno: 6, function: &lt;module&gt;
     0002:def relocatable_binaries_preprocess(d):
     0003:    rpath_replace(d.expand(&apos;/media/sdb5/eel/build/tmp/work/x86_64-linux/quilt-native/0.60-r0/sysroot-destdir/&apos;), d)
     0004:
     0005:
 *** 0006:relocatable_binaries_preprocess(d)
     0007:
File: &apos;relocatable_binaries_preprocess&apos;, lineno: 3, function: relocatable_binaries_preprocess
     0001:
     0002:def relocatable_binaries_preprocess(d):
 *** 0003:    rpath_replace(d.expand(&apos;/media/sdb5/eel/build/tmp/work/x86_64-linux/quilt-native/0.60-r0/sysroot-destdir/&apos;), d)
     0004:
     0005:
     0006:relocatable_binaries_preprocess(d)
     0007:
File: &apos;chrpath.bbclass&apos;, lineno: 7, function: rpath_replace
     0003:
     0004:    for bindir in bindirs:
     0005:        #bb.note (&quot;Processing directory &quot; + bindir)
     0006:        directory = path + &quot;/&quot; + bindir
 *** 0007:        process_dir (path, directory, d)
     0008:
File: &apos;chrpath.bbclass&apos;, lineno: 43, function: process_dir
     0039:                perms = None
     0040:            else:
     0041:                # Temporarily make the file writeable so we can chrpath it
     0042:                os.chmod(fpath, perms|stat.S_IRWXU)
 *** 0043:            process_file(cmd, fpath, rootdir, baseprefix, tmpdir, d)
     0044:
     0045:            if perms:
     0046:                os.chmod(fpath, perms)
     0047:
File: &apos;chrpath.bbclass&apos;, lineno: 4, function: process_file_linux
  File &quot;chrpath.bbclass&quot;, line 4, in process_file_linux
 
File: &apos;/usr/lib/python2.7/subprocess.py&apos;, lineno: 709, function: __init__
     0705:                                cwd, env, universal_newlines,
     0706:                                startupinfo, creationflags, shell, to_close,
     0707:                                p2cread, p2cwrite,
     0708:                                c2pread, c2pwrite,
 *** 0709:                                errread, errwrite)
     0710:        except Exception:
     0711:            # Preserve original exception in case os.close raises.
     0712:            exc_type, exc_value, exc_trace = sys.exc_info()
     0713:
File: &apos;/usr/lib/python2.7/subprocess.py&apos;, lineno: 1326, function: _execute_child
     1322:                except OSError as e:
     1323:                    if e.errno != errno.ECHILD:
     1324:                        raise
     1325:                child_exception = pickle.loads(data)
 *** 1326:                raise child_exception
     1327:
     1328:
     1329:        def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
     1330:                _WTERMSIG=os.WTERMSIG, _WIFEXITED=os.WIFEXITED,
Exception: OSError: [Errno 2] No such file or directory
 
ERROR: Function failed: relocatable_binaries_preprocess
ERROR: Logfile of failure stored in: /media/sdb5/eel/build/tmp/work/x86_64-linux/quilt-native/0.60-r0/temp/log.do_populate_sysroot.4713
ERROR: Task 17 (/media/sdb5/eel/poky/meta/recipes-devtools/quilt/quilt-native_0.60.bb, do_populate_sysroot) failed with exit code &apos;1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39198</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-03 13:32:36 +0000</bug_when>
    <thetext>chrpath is in the default value of SANITY_REQUIRED_UTILITIES, so it should be checked for at startup - are you overriding this in your configuration?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39246</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-12-05 15:43:37 +0000</bug_when>
    <thetext>Can you give us some more details if you are overriding the sanity tests</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39474</commentid>
    <comment_count>3</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2013-12-18 15:10:31 +0000</bug_when>
    <thetext>Hi,

As far as I remember, this was a vanilla poky-clone on a new ubuntu installation, which was missing chrpath.

Hmm, ubuntu has this wierd behaviour of trying to locate missing binaries for you, i.e. 
---
/media/sdb5/oel/meta-openembedded/meta-oe/recipes-support/pcsc-lite [(fb0f8dc...)]
$ banana
The program &apos;banana&apos; is currently not installed. You can install it by typing:
sudo apt-get install emboss
---

I wonder if this might be affecting the sanity check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39475</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-12-18 15:16:33 +0000</bug_when>
    <thetext>Well, it seems unlikely because the method sanity.bbclass uses is effectively bb.utils.which() which does its own path traversal/existence checking - it doesn&apos;t try running the command.

Which version of Ubuntu was this on?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39476</commentid>
    <comment_count>5</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2013-12-18 15:25:21 +0000</bug_when>
    <thetext>Well, I don&apos;t have the setup anymore.
So I guess if I&apos;m alone seeing this, it can be closed.

uname -a 
Linux nysan 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/os-release 
NAME=&quot;Ubuntu&quot;
VERSION=&quot;13.10, Saucy Salamander&quot;
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=&quot;Ubuntu 13.10&quot;
VERSION_ID=&quot;13.10&quot;
HOME_URL=&quot;http://www.ubuntu.com/&quot;
SUPPORT_URL=&quot;http://help.ubuntu.com/&quot;
BUG_REPORT_URL=&quot;http://bugs.launchpad.net/ubuntu/&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39666</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-01-06 10:04:34 +0000</bug_when>
    <thetext>I&apos;ve been able to confirm this, however I&apos;m fairly sure the sanity check has to have passed once previously to get into this situation, since the check for required utilities is done in the check_sanity_version_change() function which is only called when SANITY_VERSION changes or &lt;builddir&gt;/conf/sanity_info doesn&apos;t exist. 

Did you by any chance have chrpath installed at one time and then remove it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39873</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-01-16 16:37:02 +0000</bug_when>
    <thetext>As above, I&apos;m pretty sure this is a result of us deliberately not running these sanity tests on every build (in order to save time) and chrpath being removed or otherwise becoming unavailable after the test was run on a prior build. If the issue can be reproduced in circumstances other than what I&apos;ve described, please reopen.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>