[OE-core] package.bbclass behaviour with multiple providers of a shared library

Richard Purdie richard.purdie at linuxfoundation.org
Thu Jul 25 21:57:04 UTC 2019


On Thu, 2019-07-25 at 14:43 +0200, Daniel Klauer wrote:
> Hi oe-core devs,
> 
> looking at package.bbclass and in particular the
> read_shlib_providers()
> function (although, without having fully understood it):
> 
> For scanning the SHLIBSDIRS, it uses os.listdir() but seemingly
> without
> sorting. There is a comment saying "the last one found wins".
> Couldn't
> this cause "undefined" behaviour in case there are multiple providers
> of
> a shared library? (meaning sometimes one provider wins, sometimes the
> others, since they are in separate files in the SHLIBSDIRS)
> 
> Specifically, I saw a build failure, which I can't seem to reproduce
> anymore now, with meta-freescale's openssl-qoriq, which packages
> libcrypto.so.1.1/libssl.so.1.1 in libcrypto/libssl packages but also
> in
> a openssl-qoriq-ptest package.
> 
> .../tmp/pkgdata/lx2160ardb/shlibs2$ grep -r
> 'libssl\.so\.1\.1\|libcrypto\.so\.1\.1'
> openssl-qoriq-ptest.list:libssl.so.1.1:/usr/lib/openssl-
> qoriq/ptest:1.1.0g
> openssl-qoriq-ptest.list:libcrypto.so.1.1:/usr/lib/openssl-
> qoriq/ptest:1.1.0g
> libcrypto.list:libcrypto.so.1.1:/usr/lib:1.1.0g
> libssl.list:libssl.so.1.1:/usr/lib:1.1.0g

We definitely should sort to make things deterministic. Since I don't
want to forget this I've added a patch into my testing queue.

Cheers,

Richard



More information about the Openembedded-core mailing list