[yocto] static libraries missing from sdk
Robert Berger
yocto.user.mailinglist at gmail.com
Wed Feb 7 04:12:50 PST 2018
Hi,
On 2018-02-07 09:46, Mircea Gliga wrote:
> Thanks for your answer.
> I already have the ALLOW_EMPTY_${PN} = "1" in the recipe
>
> What I still don't get is why the -dev gets installed but the -staticdev
> doesn't, even though the dependency is satisfied (the empty pkg exists).
>
>
Just to understand what you are trying to do:
Would like to have both .a and .so files for your library in your SDK?
What should be on the rootfs? I guess the .so
You can check the contents of your packages with:
oe-pkgdata-util list-pkg-files -p <package-name>
How do you build your stuff? autotools?
I needed to do the following in my recipe with autotools:
# By default EXTRA_OECONF is set to --disable-static ...
# Let's get rid of this
DISABLE_STATIC = ""
EXTRA_OECONF := "${@oe_filter_out('--disable-static', '${EXTRA_OECONF}',
d)}"
# enable static and disable shared (for fun)
EXTRA_OECONF += "--enable-static --enable-shared"
----
I added this to local.conf:
# -->
IMAGE_INSTALL_append = " libhw-so-a"
# add libhw-so-a-dev and libhw-so-a-staticdev to SDK:
TOOLCHAIN_TARGET_TASK_append = " libhw-so-a-staticdev libhw-so-a-dev"
# <--
That's the content of the packages produced:
libhw-so-a:
/usr/lib/libhw.so.0
/usr/lib/libhw.so.0.0.0
libhw-so-a-dbg:
/usr/lib/debug/usr/lib/libhw.so.0.0.0.debug
/usr/src/debug/libhw-so-a/1.0-r0/libhw-so-a-1.0/lib/lib_hw1.c
/usr/src/debug/libhw-so-a/1.0-r0/libhw-so-a-1.0/lib/lib_hw2.c
libhw-so-a-dev:
/usr/include/lib_hw.h
/usr/lib/libhw.so
libhw-so-a-staticdev:
/usr/lib/libhw.a
in the rootfs:
./usr/lib/libhw.so.0
./usr/lib/libhw.so.0.0.0
in the SDK:
./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libhw.so
./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libhw.a
./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libhw.so.0
./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libhw.so.0.0.0
./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/include/lib_hw.h
Can you cook up an example where we can see/reproduce your problem?
----
Regards,
Robert
More information about the yocto
mailing list