Bug 9758

Summary: [build appliance] yocto 2.2: bitbake fails to build image
Product: [Build System, Metadata & Runtime] Runtime Reporter: Ke Zou <ke.zou>
Component: build-applianceAssignee: Juro Bystricky <juro.bystricky>
Status: VERIFIED FIXED QA Contact: Ke Zou <ke.zou>
Severity: normal    
Priority: High CC: jose.perez.carranza, richard.purdie, yi.zhao
Version: 2.2   
Target Milestone: 2.2 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 Ke Zou 2016-06-12 06:46:38 UTC
Using nightly build to test:
http://autobuilder.yoctoproject.org/pub/nightly/20160605-1/build-appliance/

using vmplayer to load VM

after setting environment, bitbake fails when try to build image

sh-4.3$ bitbake core-image-minimal
Traceback (most recent call last):
  File "/home/builder/poky/bitbake/bin/bitbake", line 31, in <module>
    import bb
  File "/home/builder/poky/bitbake/lib/bb/__init__.py", line 77, in <module>
    import bb.msg
  File "/home/builder/poky/bitbake/lib/bb/msg.py", line 32, in <module>
    import bb.event
  File "/home/builder/poky/bitbake/lib/bb/event.py", line 32, in <module>
    import bb.utils
  File "/home/builder/poky/bitbake/lib/bb/utils.py", line 28, in <module>
    import multiprocessing
ImportError: No module named 'multiprocessing'
Comment 1 Richard Purdie 2016-06-16 13:01:35 UTC
Good news is that after bumping the b-a revision, we avoid this issue. We do run into a locale problem, unless the bitbake environment has LC_ALL=en_US.utf-8 though...
Comment 2 Juro Bystricky 2016-06-16 14:19:32 UTC
(In reply to comment #1)
> Good news is that after bumping the b-a revision, we avoid this issue. We do
> run into a locale problem, unless the bitbake environment has
> LC_ALL=en_US.utf-8 though...


yes, but even then I ran into some problems with network (not coming up).
Comment 3 Richard Purdie 2016-06-17 16:09:57 UTC
I think we have a patch for the network issue and Ross has just added a patch to add python2 back into the image which should resolve some of the build issues we were seeing. Could someone run a build inside an image with master and check if there are any further issues?
Comment 4 Juro Bystricky 2016-06-17 16:39:51 UTC
(In reply to comment #3)
> I think we have a patch for the network issue and Ross has just added a
> patch to add python2 back into the image which should resolve some of the
> build issues we were seeing. Could someone run a build inside an image with
> master and check if there are any further issues?

yes, I will do it. (Juro)
Comment 5 Juro Bystricky 2016-06-20 22:46:13 UTC
It looks like all issues with BA have been resolved.
There were several patches involved:

1. BA recipe needed new SRCREV
2. BA recipe needed envar for locale LC_ALL=en_US.utf-8 (needed by python3)
3. BA recipe needed to explicitly include network components, these were removed from "packagegroup-self-hosted"
4. Some packages (i.e. xcb-proto, glib) would not build in BA due to some python2 modules missing 

The last commit needed was the commit 0006a7fada2fcf1d3194f6a377b5b516da08bfc7 addressing the issue #4.
(https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0006a7fada2fcf1d3194f6a377b5b516da08bfc7)

In the end I was able to run in BA:

$ bitbake core-image-minimal
$ runqemu qemux86 <path>core-image-minimal.ext4
Comment 6 Ke Zou 2016-06-27 08:50:03 UTC
verified with build 2.2M1 rc2  (06-21 build)