Bug 12163

Summary: Obtuse error if build dir != cwd
Product: [Build System, Metadata & Runtime] BitBake Reporter: Ross Burton <ross.burton>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: bluelightning, poky.bs.watcher, poky.watcher
Version: 2.4   
Target Milestone: 2.5 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2017-10-03 15:16:35 UTC
If I run a build from a directory that isn't the build directory:

$ cd poky
$ . oe-init-build-env
$ cd ..
$ bitbake m4
NOTE: Retrying server connection... (Traceback (most recent call last):
  File "/home/ross/Yocto/poky/bitbake/lib/bb/main.py", line 427, in setup_bitbake
    topdir, lock = lockBitbake()
  File "/home/ross/Yocto/poky/bitbake/lib/bb/main.py", line 494, in lockBitbake
    lockfile = topdir + "/bitbake.lock"
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
)

[ repeated ]

ERROR: Unable to connect to bitbake server, or start one
Comment 1 Paul Eggleton 2017-10-03 18:57:23 UTC
Right, I've seen this as well. 

Once upon a time you used to be able to run bitbake anywhere after having set up the environment, but that got broken some time ago (though this particular behaviour is fairly new).
Comment 2 Richard Purdie 2017-10-21 12:07:04 UTC
Patches for both issues on the lists (Oe-Core and Bitbake)