QorIQ-SDK-V2.0-2016 bitbake issue on Debian 9 building Linux images for Ls1043ardb

cancel
Showing results for 
Search instead for 
Did you mean: 

QorIQ-SDK-V2.0-2016 bitbake issue on Debian 9 building Linux images for Ls1043ardb

591 Views
j_wallace
Contributor II

Hi everybody.

I tried to follow the installation guide (QORIQ_SDK_LS1043A_RN.pdf). I did not find the iso file referenced in the doc (Linux-LS1043A-SDK-<version>-<target>-<yyyymmdd>-yocto.iso ), but the following:

QorIQ Linux SDK v2.0 AARCH64 Yocto Cache.iso
QorIQ Linux SDK v2.0 SOURCE.iso
QorIQ Linux SDK v2.0 AARCH64 IMAGE.iso

So I made the assumption that the doc is not up to date...

The document suggests doing

$ source ./poky/fsl-setup-poky -m <machine> but my install does not have ./poky/fsl-setup-poky file but fsl-setup-env in the install directory root. I supposed this will do the job (wrong?).  Everything seemed nice till I tried to build. I got the log bellow. I'm not Python fluent ... Did I miss some packages or steps?

~/QorIQ-SDK-V2.0-20160527-yocto/build_ls1043ardb$ bitbake fsl-image-minimal
Traceback (most recent call last):
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/bin/bitbake", line 31, in <module>
import bb
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 1769, in <module>
from . import wget
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/fetch2/wget.py", line 40, in <module>
from bs4 import BeautifulSoup
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bs4/__init__.py", line 30, in <module>
from .builder import builder_registry, ParserRejectedMarkup
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bs4/builder/__init__.py", line 311, in <module>
from . import _html5lib
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/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/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/event.py:118: 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/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/event.py", line 118, in print_ui_queue
from bb.msg import BBLogFormatter
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 39, 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/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/event.py", line 118, in print_ui_queue
from bb.msg import BBLogFormatter
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/__init__.py", line 77, in <module>
from bb import fetch2 as fetch
File "/home/martines/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bb/fetch2/__init__.py", line 39, in <module>
from bb import data
ImportError: cannot import name data

Tags (1)
0 Kudos
5 Replies

204 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

204 Views
j_wallace
Contributor II

Hi John,

1) I first tried the second option (edit sources/poky/bitbake/lib/bs4/builder/_html5lib.py and replace all instances of "html5lib.treebuilders._base" with "html5lib.treebuilders.base".) but I got the same error. My python-html5lib version was 0.999999999-1 (9 nine)

2) I removed my original python-html5lib, reverted the modified file and installed an older, html5lib-0.9999999.tar.gz (html5lib 0.9999999 : Python Package Index ). I did not work too. As Bitbake seems to have local html5 tools (see log below) maybe it is required to properly reinstall everything.

3) At this point It is tempting to install the latest Layerscape SDK release mentioned in a newsletter I received, so I have one question. is LS1043A a Layerscape or a QorIQ or both? The newsletter mentions QorIQ SDK vs Layerscape SDK and Both seems to support the LS1043A.

Thanks.

-----------------------------------------------------------------------------------------------------------------------------

~/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-openembedded/meta-python/recipes-devtools/python/python-html5lib_0.999.bb
~/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bs4/tests/test_html5lib.py
~/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bs4/builder/_html5lib.py
~/QorIQ-SDK-V2.0-20160527-yocto/sources/poky/bitbake/lib/bs4/builder/_html5lib.pyc
~/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-cloud-services/meta-openstack/recipes-devtools/python/python-html5lib_0.999.bb
~/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-cloud-services/meta-openstack/recipes-support/spice-html5/spice-html5_git.bb

0 Kudos

204 Views
flxjander
Contributor I

Sorry, I think I might have overstepped a bit -- I actually found this fix for the i.MX6UL Yocto tree, and haven't used QorIQ.  I'm also using Debian, and ran into the problem because a package upgrade broke my build.

I'm still confident that you're seeing the same error I did -- the following from the error report is a dead giveaway:

class TreeBuilderForHtml5lib(html5lib.treebuilders._base.TreeBuilder):
AttributeError: 'module' object has no attribute '_base'

My Yocto tree also has that "recipes-devtools/python/python-html5lib_0.999.bb" file, but it's not being used to run Bitbake.  I think it's the other way around; if Bitbake depended on that .bb file then we'd have a chicken-and-egg problem.

For reference, I'm using the editing fix, and there were 5 different places in the file that I had to replace "_base" with "base".  My python-html5lib package is the same version as yours, 0.999999999-1, and I haven't installed any packages from PyPI.

0 Kudos

204 Views
Pavel
NXP TechSupport
NXP TechSupport

Look at NXP SDK 2.0-1703 documentation:

http://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf


Have a great day,
Pavel Chubakov

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

204 Views
j_wallace
Contributor II

Thanks Pavel. As time was going I decided to use a tested platform (Ubuntu 12.04 LTS) to go further in the first phase of my development, which is to validate some functionalities and identify potential risks. Nonetheless I'm glad to get the SDK 2.0 documentation. I'll try to fix previous issues on my Debian machine in the weeks to come. 

Thanks a lot.

0 Kudos