On 3/25/21 1:06 AM, Tuomas Huuki wrote:
Hello all,
I have an interesting situation with libcansocket and bitbake that I
cannot wrap my head around. For some reason, the packages are being
split up somewhat strangely and I cannot figure out why.
First of all, the recipe used is:
https://github.com/openembedded/meta-openembedded/blob/9a0de2779b9b31f134ffe19388b5b9b37bb6450e/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb
<https://github.com/openembedded/meta-openembedded/blob/9a0de2779b9b31f134ffe19388b5b9b37bb6450e/meta-oe/recipes-extended/socketcan/libsocketcan_0.0.11.bb>
So no strange things there.
Additionally, looking at the built items:
../build/tmp/work/aarch64-poky-linux/libsocketcan/0.0.11-r0/image/usr/lib$ ls
-lah libsocketcan*
lrwxrwxrwx 1 tuomas tuomas 21 maali 18 10:38 libsocketcan.so ->
libsocketcan.so.2.3.0
lrwxrwxrwx 1 tuomas tuomas 21 maali 18 10:38 libsocketcan.so.2 ->
libsocketcan.so.2.3.0
-rwxr-xr-x 1 tuomas tuomas 58K maali 18 10:38 libsocketcan.so.2.3.0
All looks good at this point. Now, when I deploy the image, the first
link is missing.
When I look at pkgdata I can see that the link ends up in libsocketcan-dev:
$ oe-pkgdata-util list-pkg-files libsocketcan
libsocketcan:
/usr/lib/libsocketcan.so.2
/usr/lib/libsocketcan.so.2.3.0
$ oe-pkgdata-util list-pkg-files libsocketcan-dev
libsocketcan-dev:
/usr/include/can_netlink.h
/usr/include/libsocketcan.h
/usr/lib/libsocketcan.so
/usr/lib/pkgconfig/libsocketcan.pc
Its following usual soname naming conventions [1] for versioned shared
libs where .so is a symlink which is used when something is linking to
it during build time. thats why its in -dev package, if you want to use
it at runtime then linker
will add proper versioned .so into DT_NEEDED sections of dependent
package which will be libsocketcan.so.2 in this case. So if your program
is trying to dlopen it then I would suggest to use libsocketcan.so.2 and
if its trying to link to it during build time then it should add right
entry into DT_NEEDED sections.
I am also wondering why would you want to move .so to main package.
[1] https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#52904): https://lists.yoctoproject.org/g/yocto/message/52904
Mute This Topic: https://lists.yoctoproject.org/mt/81597169/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-