All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: Minimal BitBake template
Date: Mon, 14 Jan 2013 14:04:30 +0000	[thread overview]
Message-ID: <50F4106E.8070404@codesourcery.com> (raw)

Hi all,

I'm trying to evaluate use of BitBake for projects other than OE.

As part of that I've been experimenting, and trying to learn how it 
works by writing a minimalist working recipe set starting from a blank 
slate. I had hoped that, with the documentation and error/warning 
messages, I would be able to do this step-by-step through trial and 
error, and thus learn more than doing a straight cut-and-paste. This 
works up to a point, but I've now hit a dead end:

> ERROR: An uncaught exception occured in runqueue, please see the failure below:
> ERROR: Running idle function
> Traceback (most recent call last):
>   File "/opt/bitbake/lib/bb/cooker.py", line 1152, in buildTargetsIdle(server=<ProcessServer(ProcessServer-1, started)>, rq=<bb.runqueue.RunQueue instance at 0x14654d0>, abort=False):
>                  try:
>     >                retval = rq.execute_runqueue()
>                  except runqueue.TaskFailure as exc:
>   File "/opt/bitbake/lib/bb/runqueue.py", line 934, in RunQueue.execute_runqueue():
>              try:
>     >            return self._execute_runqueue()
>              except bb.runqueue.TaskFailure:
>   File "/opt/bitbake/lib/bb/runqueue.py", line 901, in RunQueue._execute_runqueue():
>              if self.state is runQueueRunning:
>     >            retval = self.rqexe.execute()
>
>   File "/opt/bitbake/lib/bb/runqueue.py", line 1365, in RunQueueExecuteTasks.execute():
>
>     >            if self.rq.check_stamp_task(task, taskname, cache=self.stampcache):
>                      logger.debug(2, "Stamp current task %s (%s)", task,
>   File "/opt/bitbake/lib/bb/runqueue.py", line 821, in RunQueue.check_stamp_task(task=0, taskname='do_build', recurse=False, cache={}):
>              # If the stamp is missing its not current
>     >        if not os.access(stampfile, os.F_OK):
>                  logger.debug(2, "Stampfile %s not available", stampfile)
> TypeError: coercing to Unicode: need string or buffer, NoneType found

Apparently BitBake has some kind of internal assumption about what the 
recipes/classes will look like that it doesn't explicitly check, and I 
haven't satisfied, somehow? Googling around suggests that the problem 
might be related to loops in the dependency chain, or something, but my 
recipe only has one task.

Essentially, I have three files:

conf/bitbake.conf
---8<--------------->8---
BBFILES = "*.bb"
CACHE = "/tmp/bbcache"
---8<--------------->8---

classes/base.bbclass
---8<--------------->8---
addtask build

do_build () {
	:
}
---8<--------------->8---

hello.bb
---8<--------------->8---
PROVIDES="hello"

do_build () {
	echo "Hello, World!"
}
---8<--------------->8---

I then invoke "env BBPATH=$PWD bitbake hello" and get the above exception.

Clearly, I'm missing something crucial, but what? Can you help me figure 
out what the minimal "hello world" recipe might look like?

Thanks in advance

Andrew

P.S. I will probably end up using something based on a copy of the OE 
base-class, given there's no point in reinventing the wheel, but I'd 
like to understand how these things work from first-principles first.



             reply	other threads:[~2013-01-14 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 14:04 Andrew Stubbs [this message]
2013-01-14 14:23 ` Minimal BitBake template Bill Traynor
2013-01-14 14:47   ` Andrew Stubbs
2013-01-16 12:54     ` Richard Purdie

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=50F4106E.8070404@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=bitbake-devel@lists.openembedded.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.