AnsweredAssumed Answered

SDK LS1043 doesn't have /usr/local/lib in filesys after adding python-dev

Question asked by Tracy Smith on Feb 6, 2017
Latest reply on Feb 13, 2017 by Tracy Smith

Refer to SDK LS1043 doesn't have /usr/include/.../Python.h in filesys? 

 

After adding IMAGE_INSTALL_append = " python-dev" to layer.conf in ./sources/meta-openembedded/meta-python/conf, Python.h is included in /usr/include/python2.7/Python.h, but python libraries are now under /usr/lib instead of /usr/local/lib.  There is no longer a /usr/local after adding the IMAGE_INSTALL_append = " python-dev" to layer.conf.

 

Having trouble with the python library location and path after adding the SDK 2.0 python-dev package.  After adding the python-dev package, the sys.path changes from /usr/local/lib to /usr/lib and places python libraries into /usr/lib instead of /usr/local/lib breaking build bot that uses python on the LS1043A where the tools use /usr/local/lib instead of /usr/lib. 

 

Why is this and how can we indicate where to place the python-dev package on the rootfs using recipes?

 

How can we modify rootfs to place any needed libraries under /usr/local/lib and how can sys.path be changed as needed for the rootfs?

 

Thx,

Tracy

 

 

The base path difference, original path is /usr/lib vs /usr/local/lib after adding python-dev. Why and how can this be avoided using the rootfs python-dev .bb file(s)?

 

LS1043A ROOTFS AFTER ADDING PYTHON DEV PACKAGE

 

>>> print("\n".join(sys.path))

/usr/lib/python27.zip
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages/newrelic-2.22.0.19
/usr/lib/python2.7/site-packages/setuptools-18.2-py2.7.egg

LS1043A ROOTFS BEFORE ADDING PYTHON DEV PACKAGE

>>> print("\n".join(sys.path))

/usr/local/lib/python27.zip
/usr/local/lib/python2.7
/usr/local/lib/python2.7/plat-linux2
/usr/local/lib/python2.7/lib-tk
/usr/local/lib/python2.7/lib-old
/usr/local/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/site-packages

 

Outcomes