[Buildroot] Adding BR2_PACKAGE_PYTHON3 make U-Boot build fail

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Sep 15 13:44:50 UTC 2020


Hello,

Please keep the list in Cc. Thanks.

On Tue, 15 Sep 2020 13:42:43 +0000
Jonatan Hatakeyama Zeidler <jonatan.zeidler at brainlab.com> wrote:

> > When BR2_PACKAGE_PYTHON3=y, we create $(HOST_DIR)/bin/python as a
> > symlink to $(HOST_DIR)/bin/python3. This means that any script that
> > uses just "python" will be executed by the Python 3 interpreter built
> > by Buildroot. So if you have a Python 2.x script in the U-Boot build,
> > it won't work anymore.
> > 
> > While I can explain the situation, I don't immediately have a
> > good/simple solution to suggest. We have recently introduced
> > BR2_TARGET_UBOOT_NEEDS_PYTHON2 and BR2_TARGET_UBOOT_NEEDS_PYTHON3.
> > Perhaps these should ensure that the U-Boot build takes place with
> > the
> > PATH that points to a folder where a "python" symlink is created,
> > pointing to the correct Python interpreter ?
> > 
> > Thomas  
> 
> Thanks for the explanation. I get the issue with having
> BR2_TARGET_UBOOT_NEEDS_PYTHON2=y set, unfortunately.

Yes, as I explained: "Perhaps these should ensure that the U-Boot build
takes place with the PATH that points to a folder where a "python"
symlink is created, pointing to the correct Python interpreter ?"

Which implies this is not done at the moment, and therefore indeed
BR2_TARGET_UBOOT_NEEDS_PYTHON2=y will not solve your problem.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list