Yocto 4.0.15 encounter error doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]

111 views Asked by At

have studied: https://docs.yoctoproject.org/ref-manual/qa-checks.html

didn't pass LDFLAGS? [ldflags]

how to solve ldflags error in yocto

Yocto QA issue: test-dev doesn't have GNU_HASH error has never gone

the error is as followings

qtporductest-1.0-r0 do_package_qa: QA Issue: File /usr/lib/libftd2xx.so in package qtporductest doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]

have tried adding follows in recipe

INSANE_SKIP_${PN} += "ldflags"
INSANE_SKIP_${PN}-dev += "ldflags"
FILES_${PN}-dev += "includedir/*"

or

File '<file>' in package '<package>' doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]

This indicates that binaries produced when building the recipe have not been linked with the LDFLAGS options provided by the build system. Check to be sure that the LDFLAGS variable is being passed to the linker command. A common workaround for this situation is to pass in LDFLAGS using TARGET_CC_ARCH within the recipe as follows:

TARGET_CC_ARCH += "${LDFLAGS}"

or

LDFLAGS += "-Wl,--hash-style=gnu"

trying all of the example above founds out the same error still happened

and try with

INSANE_SKIP:${PN} += "ldflags"

although the error did not show again but after studying it might influence other recipe this is not I want

here is my .bb file

SUMMARY = "ftdi"
DESCRIPTION = "${SUMMARY}"

LICENSE = "CLOSED"


SRC_URI = " \
        file://libftd2xx.so \
"

S = "${WORKDIR}"

INSANE_SKIP_${PN} += "ldflags"


do_install() {
    
    install -d ${D}${libdir}

    
    install -m 0755 libftd2xx.so ${D}${libdir}
    
}
FILES:${PN} += "/usr/lib/libftd2xx.so \"

anyone know any better way to fix?

0

There are 0 answers