[Buildroot] [PATCH 1/1] package/python: fix building _hashlib of host-python

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Thu Jul 20 09:19:13 UTC 2017


Hello,

On Thu, 20 Jul 2017 17:09:52 +0800, Diankun Zhang wrote:

> I'm cross-compiling host-python on my x86_64 box on which ubuntu 16.04

You are not cross-compiling host-python. host-python is a host package,
so it is natively compiled.

> installed.
> libssl is installed whereas openssl is not installed on my box. When

In Ubuntu 16.04, the package is named libssl, but it's actually
OpenSSL, see https://packages.ubuntu.com/xenial/libssl1.0.0. Its source
package is "openssl".

> cross-compiling
> host-python, I found _hashlib.so is not compiled whereas _md5.so,
> _sha256.so, _sha512.so
> and _md5.so are compiled. I think -disable-hashlib will not decrease the
> build time and
> the size of the host-python artifacts.

--disable-hashlib will make sure that our host-python build is more
reproducible. Instead of having _hashlib built when libssl-dev is
installed on the host machine, and _hashlib not built otherwise, it
will consistently not build _hashlib, which is what we want.

> As for the hash lib use case, i am integrating a third-party python tool
> pyang
> (https://github.com/mbj4668/pyang) into our project. The pyang tool will
> take advantage of python
> _hashlib module.

It pyang meant to be run on the host or on the target ? From a quick
look, it seems like something that runs on the host indeed. If that's
the case, then we will really need to start adding hidden options for
host packages, so that other host packages can request hashlib support
from host-python, without forcing everyone to build this.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the buildroot mailing list