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
Hello Tracy Smith,
I check the fsl-image-core rootfs provided in SDK 2.0 prebuilt image ISO, python2.7 folder is located in /usr/lib/, the same path as python-dev package libraries deployed.
In the recipe sources/poky/meta/recipes-devtools/python/python_2.7.9.bb, the variable STAGING_LIBDIR used in the Makefile of python package is defined as /usr/lib in Yocto by default.
I am not sure why you got python libraries deployed in /usr/local, I suspect whether you used the same python recipe as I mentioned above.
Would you please recover your original build environment and run the command "bitbake python-dev -c patch -f" to get which python recipe is used from the building log?
Have a great day,
Yiping
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Working on getting details requested. Please don't close. Engineer on vacation until Monday so it may be sometime next week before being able to reply.