All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: yocto@yoctoproject.org
Subject: Re: bitbake error
Date: Mon, 21 Sep 2015 09:12:00 -0600	[thread overview]
Message-ID: <56001E40.8060505@mlbassoc.com> (raw)
In-Reply-To: <4469300.QUMfge1DHy@peggleto-mobl.ger.corp.intel.com>

Sorry for the dups - I forgot to CC the list.

On 2015-09-21 08:35, Paul Eggleton wrote:
> On Monday 21 September 2015 07:55:35 Gary Thomas wrote:
>> On 2015-09-21 07:38, Paul Eggleton wrote:
>>> On Monday 21 September 2015 07:10:00 Gary Thomas wrote:
>>>> When trying to build using latest Poky/Yocto master
>>>> (7b86c771c80d0759c2ca0e57c46c4c966f89c49e) I'm getting this error:
>>>>
>>>> =========================================================================
>>>> === ===================== Build Configuration:
>>>> BB_VERSION        = "1.27.1"
>>>> BUILD_SYS         = "x86_64-linux"
>>>> NATIVELSBSTRING   = "Ubuntu-15.04"
>>>> TARGET_SYS        = "arm-amltd-linux-gnueabi"
>>>> MACHINE           = "teton-p0382"
>>>> DISTRO            = "amltd"
>>>> DISTRO_VERSION    = "1.8+snapshot-20150921"
>>>> TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard
>>>> cortexa9" TARGET_FPU        = "vfp-neon"
>>>> meta              = "master:7b86c771c80d0759c2ca0e57c46c4c966f89c49e"
>>>>
>>>> ERROR: Error executing a python function in
>>>> /local/poky-cutting-edge/meta/recipes-devtools/quilt/quilt-native_0.64.bb
>>>> :
>>>>
>>>> The stack trace of python calls that resulted in this exception/failure
>>>> was: File: 'relocatable_binaries_preprocess', lineno: 6, function:
>>>> <module>>>
>>>> 0002:def relocatable_binaries_preprocess(d):
>>>>         0003:
>>>> rpath_replace(d.expand('/local/p0382-cutting-edge_2014-11-21/tmp/work/x86
>>>> _6
>>>>
>>>> 4-linux/quilt-native/0.64-r0/sysroot-destdir/'), d) 0004:
>>>>         0005:
>>>>     *** 0006:relocatable_binaries_preprocess(d)
>>>>
>>>>         0007:
>>>> File: 'relocatable_binaries_preprocess', lineno: 3, function:
>>>>
>>>> relocatable_binaries_preprocess 0001:
>>>>         0002:def relocatable_binaries_preprocess(d):
>>>>     *** 0003:
>>>> rpath_replace(d.expand('/local/p0382-cutting-edge_2014-11-21/tmp/work/x86
>>>> _6
>>>>
>>>> 4-linux/quilt-native/0.64-r0/sysroot-destdir/'), d) 0004:
>>>>         0005:
>>>>         0006:relocatable_binaries_preprocess(d)
>>>>
>>>>         0007:
>>>> File: 'chrpath.bbclass', lineno: 7, function: rpath_replace
>>>>
>>>>         0003:
>>>>         0004:    for bindir in bindirs:
>>>>         0005:        #bb.note ("Processing directory " + bindir)
>>>>         0006:        directory = path + "/" + bindir
>>>>
>>>>     *** 0007:        process_dir (path, directory, d)
>>>>
>>>>         0008:
>>>> File: 'chrpath.bbclass', lineno: 44, function: process_dir
>>>>
>>>>         0040:                perms = None
>>>>         0041:            else:
>>>>         0042:                # Temporarily make the file writeable so we
>>>>         can
>>>>
>>>> chrpath it 0043:                os.chmod(fpath, perms|stat.S_IRWXU)
>>>>
>>>>     *** 0044:            process_file(cmd, fpath, rootdir, baseprefix,
>>>>     tmpdir,
>>>>
>>>> d) 0045:
>>>>         0046:            if perms:
>>>>         0047:                os.chmod(fpath, perms)
>>>>
>>>>         0048:
>>>> File: 'chrpath.bbclass', lineno: 4, function: process_file_linux
>>>>
>>>>         0001:def process_file_linux(cmd, fpath, rootdir, baseprefix,
>>>>         tmpdir,
>>>>
>>>> d): 0002:    import subprocess as sub
>>>>
>>>>         0003:
>>>>     *** 0004:    p = sub.Popen([cmd, '-l',
>>>>
>>>> fpath],stdout=sub.PIPE,stderr=sub.PIPE) 0005:    err, out =
>>>> p.communicate()
>>>>
>>>>         0006:    # If returned succesfully, process stderr for results
>>>>         0007:    if p.returncode != 0:
>>>>         0008:        return
>>>>
>>>> File: '/usr/lib/python2.7/subprocess.py', lineno: 710, function: __init__
>>>>
>>>>         0706:                                cwd, env, universal_newlines,
>>>>         0707:                                startupinfo, creationflags,
>>>>
>>>> shell, to_close, 0708:                                p2cread, p2cwrite,
>>>>
>>>>         0709:                                c2pread, c2pwrite,
>>>>
>>>>     *** 0710:                                errread, errwrite)
>>>>
>>>>         0711:        except Exception:
>>>>         0712:            # Preserve original exception in case os.close
>>>>
>>>> raises. 0713:            exc_type, exc_value, exc_trace = sys.exc_info()
>>>> 0714:
>>>> File: '/usr/lib/python2.7/subprocess.py', lineno: 1335, function:
>>>>
>>>> _execute_child 1331:                except OSError as e:
>>>>         1332:                    if e.errno != errno.ECHILD:
>>>>         1333:                        raise
>>>>         1334:                child_exception = pickle.loads(data)
>>>>
>>>>     *** 1335:                raise child_exception
>>>>
>>>>         1336:
>>>>         1337:
>>>>         1338:        def _handle_exitstatus(self, sts,
>>>>
>>>> _WIFSIGNALED=os.WIFSIGNALED, 1339:                _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:
>>>> /local/p0382-cutting-edge_2014-11-21/tmp/work/x86_64-linux/quilt-native/0
>>>> .6
>>>> 4-r0/temp/log.do_populate_sysroot.12966 ERROR: Task 11
>>>> (/local/poky-cutting-edge/meta/recipes-devtools/quilt/quilt-native_0.64.b
>>>> b,
>>>> do_populate_sysroot) failed with exit code '1'
>>>> =========================================================================
>>>> ==
>>>> ======================
>>>>
>>>> Sadly, I don't see enough info in this error trace to really tell me
>>>> what file/directory is missing (i.e. what the real problem is)
>>>>
>>>> I tried 'bitbake quilt-native -c cleanstate', but the problem persists.
>>>> Note that this is a build in a older tree, one which I've been using
>>>> successfully (as you can tell) since late 2014.
>>>>
>>>> Interestingly, I can build using the same meta-data on a different build
>>>> box!
>>>>
>>>> I get the same error when using a totally fresh tree, so I'm really
>>>> perplexed by this one...
>>>
>>> I believe this code is trying to run chrpath - do you have that installed
>>> on the host where it's failing?
>>
>> Yes (or at least I USED TO!)
>>
>> I've done some more digging and it seems that this build machine (where this
>> error happened) has been totally eaten (corrupted) :-(  My home directory
>> (and who knows what else?) is empty.  I'm going to blame it on my attempt
>> to try out OpenWRT builds on this box (not my choice - customers seem to
>> always get in the way)
>
> Hmm, that doesn't sound good.
>
> Just as a check, you didn't by any chance try to use the subpath= option with
> a value that has a trailing '/' using an older version of bitbake did you?

No.  As I said, I've been using this machine (for years), always with the
same processes, and never a problem until today.

Time to rebuild the machine from scratch

>
>> BTW, how did you come to the conclusion about chrpath?
>
> According to the stack trace the error happened in a part of the code that
> uses chrpath to adjust the rpath in binaries, and I know that
> subprocess.Popen() will raise "No such file or directory" exception if it can't
> find the chrpath binary. We do have a check to ensure chrpath is installed as
> part of the sanity tests at startup - except IIRC if that check has been run
> before it won't be run again unless you delete build/conf/sanity_info.

Fair enough (and indeed the sanity check would have been skipped since that
tree was initially built on 2014-11-21).  Too bad errors (like this) couldn't
be trapped a bit higher up to indicate what really failed, as opposed to a
lengthy stack trace which isn't very useful, at least not to those not totally
familiar with the code.

Thanks again

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


  reply	other threads:[~2015-09-21 15:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 13:10 bitbake error Gary Thomas
2015-09-21 13:38 ` Paul Eggleton
2015-09-21 13:55   ` Gary Thomas
2015-09-21 14:35     ` Paul Eggleton
2015-09-21 15:12       ` Gary Thomas [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-21 11:23 Iñigo Vicente Waliño
2020-02-21 19:53 ` Khem Raj
2020-02-21  9:16 Bitbake error Iñigo Vicente Waliño
2019-09-26  4:47 Bitbake Error SHOAIB MUHAMMAD
2019-09-26 21:08 ` Richard Purdie
2018-09-13 13:15 bitbake error idealsim
2018-09-13 16:57 ` Alexander Kanavin
2018-09-13 17:32   ` Dimitris Tassopoulos
2015-01-18  9:38 Luigi Ravina
2015-01-18 17:26 ` Jacob Kroon
2014-08-25 19:04 Aravind Ganesan
2014-08-25 19:41 ` Eric Bénard
2014-08-25 20:13 ` Carlos Rafael Giani
2014-01-15  4:30 Solomon Kinard
2014-01-14 17:24 johan wadefalk
2014-01-14 23:45 ` Gary Thomas
2014-01-13  0:29 johan wadefalk
2014-01-13 19:00 ` John Weber
2012-07-12 10:53 Girija B
2012-07-13  7:18 ` Robert Yang
2012-07-13 11:08   ` Mihai Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56001E40.8060505@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.