Bitbake failing to build

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bitbake failing to build

Jump to solution
9,388 Views
pyraohms
Contributor III

I am trying to get familiar with the Yocto system. I have succesfully followed the latest version of imx yocto project user manual. When i try to execute bitbake core-image-base i get the following:

Traceback (most recent call last):
File "/home/per/fsl-release-bsp/sources/poky/bitbake/bin/bitbake", line 31, in <module>
import bb
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/__init__.py", line 79, in <module>
from bb import fetch2 as fetch
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 1749, in <module>
from . import wget
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/fetch2/wget.py", line 41, in <module>
from bs4 import BeautifulSoup
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bs4/builder/__init__.py", line 311, in <module>
from . import _html5lib
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bs4/builder/_html5lib.py", line 57, in <module>
class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'
/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/event.py:119: RuntimeWarning: Parent module 'bb' not found while handling absolute import
from bb.msg import BBLogFormatter
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/event.py", line 119, in print_ui_queue
from bb.msg import BBLogFormatter
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/__init__.py", line 79, in <module>
from bb import fetch2 as fetch
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 37, in <module>
from bb import data
ImportError: cannot import name data
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/event.py", line 119, in print_ui_queue
from bb.msg import BBLogFormatter
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/__init__.py", line 79, in <module>
from bb import fetch2 as fetch
File "/home/per/fsl-release-bsp/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 37, in <module>
from bb import data
ImportError: cannot import name data

I can't make any sense out of it....

Labels (1)
1 Solution
6,289 Views
pyraohms
Contributor III

Never mind. This error (and probably similar ones) was caused by a dirty build environment. A reinstallation of the OS (in my case Ubuntu 17.04) solved the problem.

View solution in original post

0 Kudos
3 Replies
6,289 Views
flxjander
Contributor I

This problem is caused by a change in the "html5lib" Python package.  If you're using an html5lib version > 0.9999999 (seven nines), then you'll see this problem.

The change that causes the problem is that "html5lib.treebuilders._base" was renamed to "html5lib.treebuilders.base".

beautifulsoup, html5lib: module object has no attribute _base - Stack Overflow 

Bug #1603299 “Crash with latest html5lib” : Bugs : Beautiful Soup 

To fix the problem, you can either:

  • install html5lib version 0.9999999 (in place of the newer version)

or:

  • edit sources/poky/bitbake/lib/bs4/builder/_html5lib.py and replace all instances of "html5lib.treebuilders._base" with "html5lib.treebuilders.base".
0 Kudos
6,290 Views
pyraohms
Contributor III

Never mind. This error (and probably similar ones) was caused by a dirty build environment. A reinstallation of the OS (in my case Ubuntu 17.04) solved the problem.

0 Kudos
6,289 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Per Ekelund,

Thank you for updating this thread! I'm glad you managed to get it running!

Regards,

0 Kudos