<?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>12553</bug_id>
          
          <creation_ts>2018-02-15 17:29:38 +0000</creation_ts>
          <short_desc>waf.bbclass fails to provide useful error</short_desc>
          <delta_ts>2018-03-26 08:55:51 +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>2.5 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Denys Dmytriyenko">denis</reporter>
          <assigned_to name="Amanda Brindle">amanda.r.brindle</assigned_to>
          <cc>JPEWhacker</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>stephano</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>79460</commentid>
    <comment_count>0</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2018-02-15 17:29:38 +0000</bug_when>
    <thetext>waf.bbclass fails to catch exception and dumps a trace instead of any useful error messages about missing waf:

ERROR: libtalloc-2.1.10-r0 do_configure: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:waf_preconfigure(d)
     0003:
File: &apos;/OE/master/sources/oe-core/meta/classes/waf.bbclass&apos;, lineno: 34, function: waf_preconfigure
     0030:    from distutils.version import StrictVersion
     0031:    subsrcdir = d.getVar(&apos;S&apos;)
     0032:    wafbin = os.path.join(subsrcdir, &apos;waf&apos;)
     0033:    try:
 *** 0034:        result = subprocess.check_output([wafbin, &apos;--version&apos;], cwd=subsrcdir, stderr=subprocess.STDOUT)
     0035:        version = result.decode(&apos;utf-8&apos;).split()[1]
     0036:        if StrictVersion(version) &gt;= StrictVersion(&quot;1.8.7&quot;):
     0037:            d.setVar(&quot;WAF_EXTRA_CONF&quot;, &quot;--bindir=${bindir} --libdir=${libdir}&quot;)
     0038:    except subprocess.CalledProcessError as e:
File: &apos;/usr/lib/python3.5/subprocess.py&apos;, lineno: 626, function: check_output
     0622:        # empty string. That is maintained here for backwards compatibility.
     0623:        kwargs[&apos;input&apos;] = &apos;&apos; if kwargs.get(&apos;universal_newlines&apos;, False) else b&apos;&apos;
     0624:
     0625:    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
 *** 0626:               **kwargs).stdout
     0627:
     0628:
     0629:class CompletedProcess(object):
     0630:    &quot;&quot;&quot;A process that has finished running.
File: &apos;/usr/lib/python3.5/subprocess.py&apos;, lineno: 693, function: run
     0689:        if &apos;stdin&apos; in kwargs:
     0690:            raise ValueError(&apos;stdin and input arguments may not both be used.&apos;)
     0691:        kwargs[&apos;stdin&apos;] = PIPE
     0692:
 *** 0693:    with Popen(*popenargs, **kwargs) as process:
     0694:        try:
     0695:            stdout, stderr = process.communicate(input, timeout=timeout)
     0696:        except TimeoutExpired:
     0697:            process.kill()
File: &apos;/usr/lib/python3.5/subprocess.py&apos;, lineno: 947, function: __init__
     0943:                                startupinfo, creationflags, shell,
     0944:                                p2cread, p2cwrite,
     0945:                                c2pread, c2pwrite,
     0946:                                errread, errwrite,
 *** 0947:                                restore_signals, start_new_session)
     0948:        except:
     0949:            # Cleanup if the child failed starting.
     0950:            for f in filter(None, (self.stdin, self.stdout, self.stderr)):
     0951:                try:
File: &apos;/usr/lib/python3.5/subprocess.py&apos;, lineno: 1551, function: _execute_child
     1547:                                # The error must be from chdir(cwd).
     1548:                                err_msg += &apos;: &apos; + repr(cwd)
     1549:                            else:
     1550:                                err_msg += &apos;: &apos; + repr(orig_executable)
 *** 1551:                    raise child_exception_type(errno_num, err_msg)
     1552:                raise child_exception_type(err_msg)
     1553:
     1554:
     1555:        def _handle_exitstatus(self, sts, _WIFSIGNALED=os.WIFSIGNALED,
Exception: FileNotFoundError: [Errno 2] No such file or directory: &apos;/OE/master/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libtalloc/2.1.10-r0/talloc-2.1.10/waf&apos;

ERROR: libtalloc-2.1.10-r0 do_configure: Function failed: waf_preconfigure
ERROR: Logfile of failure stored in: /OE/master/build/tmp-glibc/work/armv7ahf-neon-oe-linux-gnueabi/libtalloc/2.1.10-r0/temp/log.do_configure.3748
ERROR: Task (/OE/master/sources/meta-openembedded/meta-networking/recipes-support/libtalloc/libtalloc_2.1.10.bb:do_configure) failed with exit code &apos;1&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79891</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2018-03-21 07:17:48 +0000</bug_when>
    <thetext>I suspect this was fixed by:

29e280ee11c9a6f13c004ff25299668e4616f275 - waf-samba.bbclass: No longer inherit waf.bbclass

Can you verify that this is the case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79898</commentid>
    <comment_count>2</comment_count>
    <who name="Denys Dmytriyenko">denis</who>
    <bug_when>2018-03-21 19:13:35 +0000</bug_when>
    <thetext>No</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79905</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2018-03-22 06:34:01 +0000</bug_when>
    <thetext>Ok, right. The libtalloc failure is just an example. The actual bug being reported is that bitbake gives an unhelpful backtrace, not that libtalloc is broken.

Sorry for the confusion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79984</commentid>
    <comment_count>4</comment_count>
    <who name="Amanda Brindle">amanda.r.brindle</who>
    <bug_when>2018-03-26 08:55:51 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?id=b6b6e006f776f3ec47192c2dffab62b124c9082e</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>