[yocto] Using a native tool from another recipe

Khem Raj raj.khem at gmail.com
Mon May 13 08:59:20 PDT 2019


You need to either build bpkg as a native recipe or install and make it
available as a hosttool from build machine distribution itself

On Mon, May 13, 2019 at 6:07 AM Gabriele Zampieri <gabbla.malist at gmail.com>
wrote:

> Hi all,
>
> I need to add a couple of tools to my build system (build2 and odb). The
> second one depends on the first. Following a snippet of the build2 recipe:
>
> --------------------------------------------------------------------------------------------
> DEPENDS = "openssl-native"
> SRC_URI = "https://download.build2.org/${PV}/build2-toolchain-${PV}.tar.gz
> "
> SRC_URI[sha256sum] =
> "42a254c46b59109b764afade0d50819b3d793a9167f46759fc6aa9d6d8a6ff37"
>
> S = "${WORKDIR}/build2-toolchain-${PV}"
>
> # build.sh located inside the tarball cannot be used to configure, compile
> and
> # install in different steps. This task is misleading, but I didn't find
> any
> # other way to make it works
> do_compile_prepend() {
>     ./build.sh --timeout 600 --sudo false \
>         --make ${MAKE} ${PARALLEL_MAKE} \
>         --trust yes \
>         --install-dir ${prefix} g++
> }
>
> FILES_${PN}_append_class-nativesdk = " ${SDKPATHNATIVE}"
> FILES_${PN} = "${D}${prefix}/*"
>
> BBCLASSEXTEND = "native nativesdk"
>
> --------------------------------------------------------------------------------------------
>
> Then the odb-compiler recipe
>
>
> --------------------------------------------------------------------------------------------
> SECTION = "devtools"
> DEPENDS = "build2-native"
> CONFIG_NAME = "odb-gcc-X"
> do_configure() {
>     cd ${B}
>     bpkg create -d ${CONFIG_NAME} cc    \
>         config.cxx=g++                  \
>         config.cc.coptions=-O3          \
>         config.bin.rpath=/usr/lib       \
>         config.install.root=/usr        \
>         config.install.sudo=false
>
> }
> BBCLASSEXTEND = "native nativesdk"
>
> --------------------------------------------------------------------------------------------
>
> When I try to build odb-compiler, bitbake complete the build2-native
> recipe, but fails on do_configure due to 'bpkg command not found'.
>
> Are my recipes correct?
>
> Thanks,
> Gabriele
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190513/eeeaa18c/attachment.html>


More information about the yocto mailing list