1

I have created my own recipe(test.bb), which is golang package, and build it with bitbake. However, on the do_package_qa flow it ran into error "test-dev doesn't have GNU_HASH (didn't pass LDFLAGS?).

...
inherit go
inherit features_check

TARGET_CC_ARCH += "${LDFLAGS}"

do_compile() {
    export CGO_CFLAGS="-I${STAGING_INCDIR}"
    export CGO_LDFLAGS="-Wl,--hash-style=gnu"

    cd ${S}/src/${GO_IMPORT}
    go build
}

I tried to add

  • TARGET_CC_ARCH += "${LDFLAGS}" in my recipe
  • export CGO_LDFLAGS="-Wl,--hash-stle=gnu"
  • INSANE_SKIP_${PN} = "ldflags"
  • and my "GO_LDFLAGS" env variable contains "-Wl,--hash-style=gnu" (checked by bitbake -e test | grep "^GO") but, they couldn't resolve it. Can anyone give hint for this?
Kyle
  • 11
  • 2
  • If you are using Honister or newer version of Yocto, then `INSANE_SKIP_${PN}` isn't valid syntax anymore. It should be `INSANE_SKIP:${PN}`. – skandigraun Jul 05 '23 at 11:40
  • Thank you, but it didn't still solve the issue – Kyle Jul 05 '23 at 14:58
  • Right. One thing I missed was that it is complaining about `test-dev`, which means that it should be `INSANE_SKIP:${PN}-dev` – skandigraun Jul 05 '23 at 15:02

0 Answers0