13

Im trying to setup bitbake tool and trying to follow the tutorial

https://www.yoctoproject.org/docs/1.8/bitbake-user-manual/bitbake-user-manual.html#bitbake-examples

Now when I run the bitbake command I get the following error,

p@p-ubuntu:~/ba/bitbake$ bitbake
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/p/ba/bitbake/lib/bb/main.py", line 428, in setup_bitbake
    topdir, lock = lockBitbake()
  File "/home/p/ba/bitbake/lib/bb/main.py", line 480, in lockBitbake
    lockfile = topdir + "/bitbake.lock"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
)
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/p/ba/bitbake/lib/bb/main.py", line 428, in setup_bitbake
    topdir, lock = lockBitbake()
  File "/home/p/ba/bitbake/lib/bb/main.py", line 480, in lockBitbake
    lockfile = topdir + "/bitbake.lock"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

How do I start the bitbake server?

user1050619
  • 19,822
  • 85
  • 237
  • 413
  • Provide the exact steps you have followed, – Ash Jul 25 '17 at 10:23
  • I suggest to use some more remarkable user name. It shouldn't have any connection to your true identity, but it makes you much better recognizable and thus it improves your treatment (upvotes, better answers, and so on). Off: I started a bounty on your [this](https://serverfault.com/q/858377/200053) question, maybe you could interact with the comments and the answers, too. – peterh Jul 26 '17 at 18:53
  • As far as I understood, this is a network related issue. Try setting eth0 up and down, and then try again. Also, see if you've setup the environment correctly. Remember that environment should be setup from BSP_DIR. – surendra nath Jul 28 '17 at 13:34

9 Answers9

63

I had the same problem after I canceled a bitbake-process harshly (ctrl-c).

After removing the file bitbake.lock in the build-folder, bitbake worked again as intended.

rm bitbake.lock
dertom
  • 780
  • 5
  • 5
5

I was following the Yocto tutorial too and had the exact same error. I am running Ubuntu 16.04 in a Virtual Box 6.0 environment on my Windows 10 system.

I finally figured out that using BitBake on a shared folder produce that error. For some reason, installing the Yocto project with the Bitbake on a Virtual Box "sf_" shared folder produce that error.

I then created a fresh folder not on a shared folder of my Ubuntu and redone the Yocto tutorial steps there and the Bitbake command ran succesfully ! It's building the tutorial project while I write those lines.

Hope it will help you with your problem !

3
$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
 xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
 xterm

I accidentally skipped this step in the manual - resolved my issue, hopefully yours

dianaleeg
  • 69
  • 6
2

You have to run bitbake command from build directory. I also had the same issue since i was not running it from build directory.

Nithin Kurian
  • 91
  • 2
  • 12
1

This is because new function findTopdir (Submitted on July 18, 2017) does not handle errors. For example, the lack of BBPATH environment variable and the inability to find conf/bblayers.conf in BBPATH. findTopdir just returns None in case of that errors.

ljonya
  • 11
  • 2
1

Install needed support packages: install gawk wget git-core diffstat unzip texinfo gcc-multilib \ build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ xz-utils debianutils iputils-ping

ghecu
  • 11
  • 2
0

I received the same error, after I managed to run a bitbake command that deleted my current derictory. (bitbake -c clean <something> while I was in the work directory of <something>).

The solution is then quite simple: change to another directory, e.g. cd $BUILDDIR.

honggoff
  • 33
  • 6
0

In my way, It works fine when I delete the dir build/ and source oe-init.. again. You can try this if you don't have built the project.

BBear
  • 1
-4

install these packages:

sudo apt-get install makeinfo textinfo texi2html
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103