[OE-core] Libs compiled using Yocto has incorrect version appended to their names

Sunny Shukla ssshukla26 at gmail.com
Thu Aug 16 07:12:22 UTC 2018


Hi,

We are using Rocko build for our am335x starter kit. While building
core-image-minimal (rootfs) we are facing a strange problem, some of
the libs we have included are getting build but the version appended
to libs names are not proper, as shown in the examples below.

1) Building eventlog

BB file: "./sources/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb"

Lib formed after compiling (under rootfs folder)

sudo find . -name "*evt*"
./usr/lib/libevtlog.so.0.0.0
./usr/lib/libevtlog.so.0

ls -l ./usr/lib/libevtlog.so*
lrwxrwxrwx 1 root root 18 Aug 6 15:36 ./usr/lib/libevtlog.so.0 ->
libevtlog.so.0.0.0
-rwxr-xr-x 1 root root 13840 Aug 6 15:36 ./usr/lib/libevtlog.so.0.0.0

Here the version number appended after libevtlog.so under "./usr/lib/"
is 0.0.0 instead of 0.2.13 which is the version number of the package
as described by BB file eventlog_0.2.13.bb.

2) Building libffi

BB file: "./sources/oe-core/meta/recipes-support/libffi/libffi_3.2.1.bb"

Lib formed after compiling (under rootfs folder)

sudo find . -name "*libffi*"
./usr/lib/libffi.so.6.0.4
./usr/lib/libffi.so.6

ls -l ./usr/lib/libffi.so*
lrwxrwxrwx 1 root root 15 Jul 23 12:18 ./usr/lib/libffi.so.6 -> libffi.so.6.0.4
-rwxr-xr-x 1 root root 26220 Jul 23 12:18 ./usr/lib/libffi.so.6.0.4

Here the version number appended after libffi.so under "./usr/lib/" is
6.0.4 instead of 3.2.1 which is the version number of the package as
described by BB file libffi_3.2.1.bb.

3) Building libgcrypt

BB file: "./sources/oe-core/meta/recipes-support/libgcrypt/libgcrypt_1.8.0.bb"

Lib formed after compiling under rootfs

sudo find . -name "*gcrypt*"
./usr/lib/libgcrypt.so.20
./usr/lib/libgcrypt.so.20.2.0

ls -l ./usr/lib/libgcrypt.so*
lrwxrwxrwx 1 root root 19 Aug 6 20:24 ./usr/lib/libgcrypt.so.20 ->
libgcrypt.so.20.2.0
-rwxr-xr-x 1 root root 803960 Aug 6 20:24 ./usr/lib/libgcrypt.so.20.2.0

Here the version number appended after libgcrypt.so under "./usr/lib/"
is 20.2.0 instead of 1.8.0 which is the version number of the package
as described by BB file libgcrypt_1.8.0.bb.

4) Building opkg

BB file: "./sources/oe-core/meta/recipes-devtools/opkg/opkg_0.3.5.bb"

Lib formed after compiling under rootfs

sudo find . -name "*opkg*"
./usr/bin/opkg-check-config
./usr/bin/opkg
./usr/share/opkg
./usr/lib/libopkg.so.1
./usr/lib/libopkg.so.1.0.0
./usr/lib/opkg
./var/lib/opkg
./var/cache/opkg
./lib/systemd/system/opkg-configure.service
./etc/opkg
./etc/opkg/opkg.conf

ls -l ./usr/lib/libopkg.so*
lrwxrwxrwx 1 root root 16 Aug 9 14:46 ./usr/lib/libopkg.so.1 -> libopkg.so.1.0.0
-rwxr-xr-x 1 root root 143316 Aug 9 14:46 ./usr/lib/libopkg.so.1.0.0

Here the version number appended after libopkg.so under "./usr/lib/"
is 1.0.0 instead of 0.3.5 which is the version number of the package
as described by BB file opkg_0.3.5.bb.

5) Building libarchive

BB file: "./sources/oe-core/meta/recipes-extended/libarchive/libarchive_3.3.2.bb"

Lib formed after compiling under rootfs

sudo find . -name "*libarchive*"
./usr/lib/libarchive.so.13
./usr/lib/libarchive.so.13.3.2

ls -l ./usr/lib/libarchive.so*
lrwxrwxrwx 1 root root 20 Aug 3 15:09 ./usr/lib/libarchive.so.13 ->
libarchive.so.13.3.2
-rwxr-xr-x 1 root root 568860 Aug 3 15:09 ./usr/lib/libarchive.so.13.3.2

Here the version number appended after libarchive.so under
"./usr/lib/" is 3.3.2 which is same as that of 3.3.2 version number of
the package as described by BB file libarchive_3.3.2.bb.

In all of the above examples from number 1 to 4, the name of shared
object files has a version number not matching the version number of
BB files. We have tried to use LEAD_SONAME and DEBIANNAME_${PN}
variables in related BB files but still, we didn't get the desired
versions appended to the libs created.

For example, we want the following output (similar to that of example 5)

For Building eventlog

BB file: "./sources/meta-openembedded/meta-oe/recipes-support/eventlog/eventlog_0.2.13.bb"

Lib formed after compiling under rootfs should be as follows

sudo find . -name "*evt*"
./usr/lib/libevtlog.so.0.2.13
./usr/lib/libevtlog.so.0

ls -l ./usr/lib/libevtlog.so*
lrwxrwxrwx 1 root root 18 Aug 6 15:36 ./usr/lib/libevtlog.so.0 ->
libevtlog.so.0.2.13
-rwxr-xr-x 1 root root 13840 Aug 6 15:36 ./usr/lib/libevtlog.so.0.2.13

As described above, one can notice that what we need is that the
version appended after libevtlog.so (libevtlog.so.0.2.13) in
"./usr/lib/" is same as that of the version of the BB file
eventlog_0.2.13.bb. We are unable to achieve this. Let us know what
are we missing for the same.

Regards,
Sunny.



More information about the Openembedded-core mailing list