[OE-core] Fwd: Recipe [patch] modification to generate a static library instead of shared library

Ravi chandra reddy vlsireddy at gmail.com
Wed Apr 5 18:09:50 UTC 2017


Hi,
    Let me thank you guys for quick reply.
let me put my  email in correct steps

1. below local/local.conf changes makes bitbake fail.

                            IMAGE_INSTALL_append = "lib32-glibc
lib32-libgcc lib32-libstdc++ libedit libxml2-*staticdev*"

error:=============
================================== i get the following
errors==================================
ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
ERROR: Logfile of failure stored in: /home/polar/zcu_yocto/poky/
build/tmp/work/zcu102_zynqmp-poky-linux/core-image-minimal/
1.0-r0/temp/log.do_rootfs.17721
ERROR: Task 9 (/home/polar/zcu_yocto/poky/meta/recipes-core/images/core-
image-minimal.bb, do_rootfs) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2144 tasks of which 2143 didn't need to be
rerun and 1 failed.
===================================

2.  without staticdev changes [in local/local.conf], it
[bitbake-core-image-minimal] goes through and it builds [but there is only
.so [dynamic library] generated]

IMAGE_INSTALL_append = "lib32-glibc lib32-libgcc lib32-libstdc++ libedit
libxml2"


3. i ran the search and found that all "no-static" lines are commented

bitbake -e | grep static-libs


and all the "no-static-libs.inc" are commented [#]

Thanks
RC

On Wed, Apr 5, 2017 at 2:04 PM, Ravi chandra reddy <vlsireddy at gmail.com>
wrote:

> Hi,
>        in local/local.conf it [bitbake core-image-minimal] fails, if i use
> libxml2-staticdev
>
>   # Specify the 32-bit libraries to be added to all images
> IMAGE_INSTALL_append = "lib32-glibc lib32-libgcc lib32-libstdc++ libedit
> libxml2-staticdev"
>
> ================================== i get the following
> errors==================================
> ERROR: core-image-minimal-1.0-r0 do_rootfs: Function failed: do_rootfs
> ERROR: Logfile of failure stored in: /home/polar/zcu_yocto/poky/
> build/tmp/work/zcu102_zynqmp-poky-linux/core-image-minimal/
> 1.0-r0/temp/log.do_rootfs.17721
> ERROR: Task 9 (/home/polar/zcu_yocto/poky/meta/recipes-core/images/core-
> image-minimal.bb, do_rootfs) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 2144 tasks of which 2143 didn't need to be
> rerun and 1 failed.
> ===================================
>
> if i use as below, there is no issue. however there is no .so
>
> # Specify the 32-bit libraries to be added to all images
> IMAGE_INSTALL_append = "lib32-glibc lib32-libgcc lib32-libstdc++ libedit
> libxml2"
>
> i ran
>
> bitbake -e | grep static-libs
>
> and all the "no-static-libs.inc" are commented [#]
>
> Thanks
> RC
>
>
>
> On Wed, Apr 5, 2017 at 11:48 AM, Richard Purdie <richard.purdie@
> linuxfoundation.org> wrote:
>
>> On Wed, 2017-04-05 at 10:33 -0500, Matthew McClintock wrote:
>> > On Wed, Apr 5, 2017 at 10:18 AM, Ravi chandra reddy <vlsireddy at gmail.
>> > com> wrote:
>> > >
>> > > Hi All,
>> > >           I am using meta-oe to generate libxml2 library using
>> > > AARCH64
>> > > compiler. However it generates shared object [.so] library.
>> > >
>> > > is there any setting in recipe to modify this, to generate static
>> > > library
>> > > [instead of shared library]
>> > >
>> > > if so, please point me to the recipe/file to change.
>> > >
>> > > if not, i will try to add it as patch, plz point me to appropriate
>> > > files to
>> > > change
>> > Is the ${PN}-staticdev package getting generated for you?
>>
>> Its possible you have conf/distro/include/no-static-libs.inc included
>> in your build (bitbake -e would tell you).
>>
>> If so, you could remove that include or set:
>>
>> DISABLE_STATIC = ""
>>
>> as it would currently be set to this if that include file is included:
>>
>> DISABLE_STATIC = " --disable-static"
>>
>> We tend not to build static libraries as they're a waste of space/time
>> on the most part.
>>
>> Cheers,
>>
>> Richard
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170405/dcf60b08/attachment-0002.html>


More information about the Openembedded-core mailing list