Thanks for the fast reply!

- The library is *not* pre-compiled, here's the makefile rule that produce
it :

CFLAGS ?= -std=gnu99 -Wall -Wextra -Wno-parentheses -Wno-switch

shared-lib:
        $(CC) -fPIC -c $(LDFLAGS) $(CFLAGS) rj2d.c
        $(CC) $(LDFLAGS) -shared -o librj2d.so.1 rj2d.o
        ln -sf librj2d.so.1 librj2d.so

It seems ok to me, but there might be something missing?

- I don't think that the name "librj2d.so" is problematic however when I
remove the line INSANE_SKIP:${PN} += "dev-so" I get the following error:

ERROR: librj2d-1.1-r0 do_package_qa: QA Issue: non -dev/-dbg/nativesdk-
package librj2d contains symlink .so '/usr/lib/librj2d.so' [dev-so]
ERROR: librj2d-1.1-r0 do_package_qa: Fatal QA errors were found, failing
task.

- Here's the recipe :

SUMMARY = "RJ2D lib"
DEPENDS = ""
LICENSE = "..."
LIC_FILES_CHKSUM = "file:/..."

SRC_URI = "git://...rj2d-lib;protocol=ssh;branch=master;"
SRCREV = "..."

S = "${WORKDIR}/git"

do_compile() {
        oe_runmake all
}

do_install() {
        install -d ${D}${libdir}
        install -m 0655 librj2d.so.1 ${D}${libdir}
        ln --relative --symbolic ${D}${libdir}/librj2d.so.1
${D}${libdir}/librj2d.so
        install -d ${D}${includedir}
        install -m 0655 rj2d.h ${D}${includedir}/rj2d.h
}


FILES:${PN} += "${libdir}/*.so"
FILES_SOLIBSDEV = ""
INSANE_SKIP:${PN} += "dev-so"

RPROVIDES:${PN} += "librj2d.so librj2d.so()(64bit)"

That's not the first time I have this kind of problem with shared libs and
yocto, so I really wish to make it right this time !

Bests,

Yann

On Wed, Aug 7, 2024 at 11:21 AM Mikko Rapeli <mikko.rap...@linaro.org>
wrote:

> Hi,
>
> On Wed, Aug 07, 2024 at 10:47:57AM +0200, Yann CARDAILLAC via
> lists.yoctoproject.org wrote:
> > Hi all,
> >
> > I'm working on upgrading different yocto BSPs to scarthgap, I'm having an
> > error that I haven't seen. It's the one described here on stack overflow
> by
> > someone else:
> >
> >
> https://stackoverflow.com/questions/64984897/yocto-package-requires-shared-library-but-no-providers-found-in-rdepends
> >
> > I have a very simple C library package that provides a shared library.
> >
> > My package is looking very close to:
> > meta-openembedded/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
> > <
> https://github.com/openembedded/meta-openembedded/blob/master/meta-oe/recipes-extended/p7zip/p7zip_16.02.bb
> >
> >
> > I don't really understand why we need to add the lib7z.so()(64bit)? Is
> > there a "proper" way of avoiding that as it's not so common in other
> libs?
> >
> > I'm also not comfortable adding :
> > INSANE_SKIP:${PN} += "dev-so"
> >
> > If any, can you point me to a simple library build that doesn't require
> the
> > (64bit) that I don't really understand nor the INSANE_SKIP ? To sum up my
> > need is to have a simple recipe for a shared library.
>
> Please set soname correctly, see
> https://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
>
> Shared libraries without soname are bad and this test correctly finds them.
>
> Cheers,
>
> -Mikko
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#63672): https://lists.yoctoproject.org/g/yocto/message/63672
Mute This Topic: https://lists.yoctoproject.org/mt/107766049/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to