All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [poky] shared library location and linking
       [not found] <17995B12D8E7BA2D.25909@lists.yoctoproject.org>
@ 2023-11-21 15:13 ` star
  2024-05-02 12:00   ` avahi configuration (without d-bus/X11) Arno Steffens
  0 siblings, 1 reply; 6+ messages in thread
From: star @ 2023-11-21 15:13 UTC (permalink / raw)
  To: poky

I found my issue described here, more or less exactly:

https://docs.yoctoproject.org/ref-manual/variables.html#term-SYSROOT_DIRS_IGNORE

For me it turns out to need in recipe of lib:
SYSROOT_DIRS:append = " /opt/lib"

and in recipe of app, using that lib:
TARGET_LDFLAGS:append = " -L${RECIPE_SYSROOT}/opt/lib"

But that's not helping. Looking at bitbake <recipe_app> -e I can't see
why linker does not find it. As mentioned
${WORKDIR}/recipe-sysroot/opt/lib is populated for the app.
A bug? Usually I am just miss something, but I don't have a clue how to
debug.

Best regards,
Steve


> Hello,
> I have a problem if a shared lib should be located in some other than
> usual folder - in /opt/lib in my example. Althoug not usual, it should
> be possible, right?
> The lib itself is created well and with that including in recipe (which
> tooks me some time to find):
> SYSROOT_DIRS += "/opt/lib"
> this lib is also populated into sysroot-destdir/opt/lib
>
> But recipe of app, that is depending on that lib, will not link -
> although the lib is located in build directory of app in
> recipe-sysroot/opt/lib (thanks to the trick above).
>
> I couldn't figure out what is the problem:
>
> | arm-poky-linux-gnueabi-gcc  -mfpu=neon -mfloat-abi=hard
> -mcpu=cortex-a9 -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2
> -Wformat -Wformat-security -Werror=format-security
> --sysroot=/home/user/y/yocto_4014_sp2/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/sps/0.1-r0/recipe-sysroot
> sps.c -L/opt/lib -lvision-device -o sps
> |
> /home/user/y/yocto_4014_sp2/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/sps/0.1-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/11.4.0/ld:
> cannot find -lvision-device: No such file or directory
> | collect2: error: ld returned 1 exit status
>
> I don't know where the linker is looking for? Just as a dirty hack I
> copied the libs in recipe as below, it works:
>
> do_compile () {
>      cp recipe-sysroot/opt/lib/* recipe-sysroot/usr/lib
>      oe_runmake -f Makefile-sps
> }
>
> I seems the -L is not passed through!? Is it a bug? Or what do I miss?
>
> Best regards and any help is welcome.
> Steve
>
> PS: Makefile is as simple:
>
> LIBSINC  = -L/opt/lib
> LIBS     = -lvision-device
>
> all: sps
>
> sps: *.c
>          $(CC) sps.c $(LIBSINC) $(LIBS) -o sps
>
> clean:
>          rm -f sps
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13208): https://lists.yoctoproject.org/g/poky/message/13208
> Mute This Topic: https://lists.yoctoproject.org/mt/102707949/3618575
> Group Owner: poky+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [star@gmx.li]
> -=-=-=-=-=-=-=-=-=-=-=-
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* avahi configuration (without d-bus/X11)
  2023-11-21 15:13 ` [poky] shared library location and linking star
@ 2024-05-02 12:00   ` Arno Steffens
  2024-05-02 12:54     ` [poky] " Ross Burton
  0 siblings, 1 reply; 6+ messages in thread
From: Arno Steffens @ 2024-05-02 12:00 UTC (permalink / raw)
  To: poky

Hello,
I need the avahi to announce my embedded device to network and give it
an IP if DCHP is not working.
Over the normal "avahi-daemon.conf" I want to disable d-bus and ipv6.
That is working by do_install:append changing that file.

But, adding to image the package "avahi-daemon" (avahi-autoipd is not a
problem) bloats my rootfs with dbus-daemon and libs and  libX11 libs. I
don't have an screen attached.

So question: How to avoid that?

In my avahi_%.bbappend I added:
EXTRA_OECONF += " \
     --disable-dbus \
     --disable-gtk \
     --disable-gtk3 \
     --disable-libevent \
     --disable-qt5 \
"
But that doesn't seem to help.

I am using a sysV system with poky distro (Yocto 4.0)

Best regards,
Arno


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] avahi configuration (without d-bus/X11)
  2024-05-02 12:00   ` avahi configuration (without d-bus/X11) Arno Steffens
@ 2024-05-02 12:54     ` Ross Burton
  2024-05-02 14:18       ` star
  0 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2024-05-02 12:54 UTC (permalink / raw)
  To: star; +Cc: poky

On 2 May 2024, at 13:00, Steve via lists.yoctoproject.org <star=gmx.li@lists.yoctoproject.org> wrote:
> 
> Hello,
> I need the avahi to announce my embedded device to network and give it
> an IP if DCHP is not working.
> Over the normal "avahi-daemon.conf" I want to disable d-bus and ipv6.
> That is working by do_install:append changing that file.
> 
> But, adding to image the package "avahi-daemon" (avahi-autoipd is not a
> problem) bloats my rootfs with dbus-daemon and libs and  libX11 libs. I
> don't have an screen attached.
> 
> So question: How to avoid that?
> 
> In my avahi_%.bbappend I added:
> EXTRA_OECONF += " \
>    --disable-dbus \
>    --disable-gtk \
>    --disable-gtk3 \
>    --disable-libevent \
>    --disable-qt5 \
> "
> But that doesn't seem to help.

Have a look at the recipe, specifically the PACKAGECONFIG options.  You want to disable the dbus and gtk3 options.  Note that if you have a headless device so don’t need X11 at all, then remove x11 from DISTRO_FEATURES and that will never be built.

Ross

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] avahi configuration (without d-bus/X11)
  2024-05-02 12:54     ` [poky] " Ross Burton
@ 2024-05-02 14:18       ` star
  2024-05-02 14:34         ` Tim Orling
  0 siblings, 1 reply; 6+ messages in thread
From: star @ 2024-05-02 14:18 UTC (permalink / raw)
  To: poky

On 5/2/24 14:54, Ross Burton via lists.yoctoproject.org wrote:
> On 2 May 2024, at 13:00, Steve via lists.yoctoproject.org <star=gmx.li@lists.yoctoproject.org> wrote:
>>
>> Hello,
>> I need the avahi to announce my embedded device to network and give it
>> an IP if DCHP is not working.
>> Over the normal "avahi-daemon.conf" I want to disable d-bus and ipv6.
>> That is working by do_install:append changing that file.
>>
>> But, adding to image the package "avahi-daemon" (avahi-autoipd is not a
>> problem) bloats my rootfs with dbus-daemon and libs and  libX11 libs. I
>> don't have an screen attached.
>>
>> So question: How to avoid that?
>>
>> In my avahi_%.bbappend I added:
>> EXTRA_OECONF += " \
>>     --disable-dbus \
>>     --disable-gtk \
>>     --disable-gtk3 \
>>     --disable-libevent \
>>     --disable-qt5 \
>> "
>> But that doesn't seem to help.
>
> Have a look at the recipe, specifically the PACKAGECONFIG options.  You want to disable the dbus and gtk3 options.  Note that if you have a headless device so don’t need X11 at all, then remove x11 from DISTRO_FEATURES and that will never be built.
>
> Ross

Well Ross, you made my day ... again! Thanks.
Yes, as above mentioned I already disabled dbus and gtk3. But it seems I
have to write also PACKAGECONFIG[dbus] = "--disable-dbus,
--disable-dbus,dbus"
Frankly speaking I don't understand why this is to be configured twice
and why PACKAGECONFIG overrule that, but that helps to get rid of both
d-bus and libX11.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] avahi configuration (without d-bus/X11)
  2024-05-02 14:18       ` star
@ 2024-05-02 14:34         ` Tim Orling
  2024-05-03 12:26           ` star
  0 siblings, 1 reply; 6+ messages in thread
From: Tim Orling @ 2024-05-02 14:34 UTC (permalink / raw)
  To: star; +Cc: poky

[-- Attachment #1: Type: text/plain, Size: 2474 bytes --]

On Thu, May 2, 2024 at 7:18 AM Steve via lists.yoctoproject.org <star=
gmx.li@lists.yoctoproject.org> wrote:

> On 5/2/24 14:54, Ross Burton via lists.yoctoproject.org wrote:
> > On 2 May 2024, at 13:00, Steve via lists.yoctoproject.org <star=
> gmx.li@lists.yoctoproject.org> wrote:
> >>
> >> Hello,
> >> I need the avahi to announce my embedded device to network and give it
> >> an IP if DCHP is not working.
> >> Over the normal "avahi-daemon.conf" I want to disable d-bus and ipv6.
> >> That is working by do_install:append changing that file.
> >>
> >> But, adding to image the package "avahi-daemon" (avahi-autoipd is not a
> >> problem) bloats my rootfs with dbus-daemon and libs and  libX11 libs. I
> >> don't have an screen attached.
> >>
> >> So question: How to avoid that?
> >>
> >> In my avahi_%.bbappend I added:
> >> EXTRA_OECONF += " \
> >>     --disable-dbus \
> >>     --disable-gtk \
> >>     --disable-gtk3 \
> >>     --disable-libevent \
> >>     --disable-qt5 \
> >> "
> >> But that doesn't seem to help.
> >
> > Have a look at the recipe, specifically the PACKAGECONFIG options.  You
> want to disable the dbus and gtk3 options.  Note that if you have a
> headless device so don’t need X11 at all, then remove x11 from
> DISTRO_FEATURES and that will never be built.
> >
> > Ross
>
> Well Ross, you made my day ... again! Thanks.
> Yes, as above mentioned I already disabled dbus and gtk3. But it seems I
> have to write also PACKAGECONFIG[dbus] = "--disable-dbus,
> --disable-dbus,dbus"
>

That is not what you needed to change. What you need to change is the
"weak" default value of the PACKACONFIG ??= "dbus ..."
So just setting PACKAGECONFIG = ""

https://docs.yoctoproject.org/ref-manual/variables.html#term-PACKAGECONFIG
https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/avahi/avahi_0.8.bb#n50


> Frankly speaking I don't understand why this is to be configured twice
> and why PACKAGECONFIG overrule that, but that helps to get rid of both
> d-bus and libX11.
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#13338):
> https://lists.yoctoproject.org/g/poky/message/13338
> Mute This Topic: https://lists.yoctoproject.org/mt/105861001/924729
> Group Owner: poky+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [
> ticotimo@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 4176 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [poky] avahi configuration (without d-bus/X11)
  2024-05-02 14:34         ` Tim Orling
@ 2024-05-03 12:26           ` star
  0 siblings, 0 replies; 6+ messages in thread
From: star @ 2024-05-03 12:26 UTC (permalink / raw)
  To: poky

On 5/2/24 16:34, Tim Orling via lists.yoctoproject.org wrote:
>
>
> On Thu, May 2, 2024 at 7:18 AM Steve via lists.yoctoproject.org
> <http://lists.yoctoproject.org> <star=gmx.li@lists.yoctoproject.org
> <mailto:gmx.li@lists.yoctoproject.org>> wrote:
>
>     On 5/2/24 14:54, Ross Burton via lists.yoctoproject.org
>     <http://lists.yoctoproject.org> wrote:
>      > On 2 May 2024, at 13:00, Steve via lists.yoctoproject.org
>     <http://lists.yoctoproject.org> <star=gmx.li@lists.yoctoproject.org
>     <mailto:gmx.li@lists.yoctoproject.org>> wrote:
>      >>
>      >> Hello,
>      >> I need the avahi to announce my embedded device to network and
>     give it
>      >> an IP if DCHP is not working.
>      >> Over the normal "avahi-daemon.conf" I want to disable d-bus and
>     ipv6.
>      >> That is working by do_install:append changing that file.
>      >>
>      >> But, adding to image the package "avahi-daemon" (avahi-autoipd
>     is not a
>      >> problem) bloats my rootfs with dbus-daemon and libs and  libX11
>     libs. I
>      >> don't have an screen attached.
>      >>
>      >> So question: How to avoid that?
>      >>
>      >> In my avahi_%.bbappend I added:
>      >> EXTRA_OECONF += " \
>      >>     --disable-dbus \
>      >>     --disable-gtk \
>      >>     --disable-gtk3 \
>      >>     --disable-libevent \
>      >>     --disable-qt5 \
>      >> "
>      >> But that doesn't seem to help.
>      >
>      > Have a look at the recipe, specifically the PACKAGECONFIG
>     options.  You want to disable the dbus and gtk3 options.  Note that
>     if you have a headless device so don’t need X11 at all, then remove
>     x11 from DISTRO_FEATURES and that will never be built.
>      >
>      > Ross
>
>     Well Ross, you made my day ... again! Thanks.
>     Yes, as above mentioned I already disabled dbus and gtk3. But it seems I
>     have to write also PACKAGECONFIG[dbus] = "--disable-dbus,
>     --disable-dbus,dbus"
>
>
> That is not what you needed to change. What you need to change is the
> "weak" default value of the PACKACONFIG ??= "dbus ..."
> So just setting PACKAGECONFIG = ""
>
> https://docs.yoctoproject.org/ref-manual/variables.html#term-PACKAGECONFIG <https://docs.yoctoproject.org/ref-manual/variables.html#term-PACKAGECONFIG>
> https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/avahi/avahi_0.8.bb#n50 <https://git.yoctoproject.org/poky/tree/meta/recipes-connectivity/avahi/avahi_0.8.bb#n50>
>

Thanks Tim, you are right!
That is even better.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-03 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <17995B12D8E7BA2D.25909@lists.yoctoproject.org>
2023-11-21 15:13 ` [poky] shared library location and linking star
2024-05-02 12:00   ` avahi configuration (without d-bus/X11) Arno Steffens
2024-05-02 12:54     ` [poky] " Ross Burton
2024-05-02 14:18       ` star
2024-05-02 14:34         ` Tim Orling
2024-05-03 12:26           ` star

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.