bitbake autoconf libevent not found

103 Views Asked by At

I'm trying to create a bitbake recipe for trickle. I can successfully build it on the target hardware if I have libevent-dev installed. However, despite including libevent (I cannot include libevent-dev) in my DEPENDS, the bitbake build fails at:

| checking for libevent... no
| configure: error: libevent not found

my complete recipe is:

DESCRIPTION = "trickle is a voluntary, cooperative bandwidth shaper. trickle works entirely in userland and is cross platform compatible."
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=d3a2bbd2a4afe8c5578c24d761f580f8"

DEPENDS += "libevent libtirpc"

SRCREV = "09a1d955c6554eb7e625c99bf96b2d99ec7db3dc"
PV = "1.07+git09a1d95"
SRC_URI = "git://github.com/mariusae/trickle;protocol=https"

S = "${WORKDIR}/git"

inherit autotools

do_install() {
    install -d ${D}${bindir}
    install -m 0755 trickle ${D}${bindir}
    install -m 0755 tricklectl ${D}${bindir}
    install -m 0755 trickled ${D}${bindir}
}

How do I get bitbake to find libevent?

(I am more specifically using Petalinux 2020.1 which is Yocto Zeus)

1

There are 1 best solutions below

0
Furious007 On

To find libevent, the prefix variable is used in the configuration. The default is /usr/local. But you need to change it to your sysroot directory. To do this you need to add a command line argument to the configure step:

EXTRA_OECONF_append="--prefix=${STAGING_EXECPREFIXDIR}"