Re: native recipe question


Thanks that did the trick.

I actually needed to add the tool compilation in do_configure_prepend because the cmake configuration requires the output folder for bin2cpp.

Just out of completeness. I had created that arrayfire-native recipe and it looked like this:

SRCREV = "ee21c791d5af4fa56bca168804ba1597cf9d6503"


S = "${WORKDIR}/git"

inherit cmake cuda

    cd ${B}
    cmake ${S} \
        -DAF_BUILD_CPU=OFF \

    make bin2cpp

do_install() {
    install -d ${D}/${bindir}
    install -m 755 ${WORKDIR}/build/bin2cpp ${D}${bindir}

# Defining packages
FILES_${PN} = "${bindir}/*"

The recipe builds. When I try using with  DEPENDS += "arrayfire-native" in the arrayfire recipe I get this warning:
WARNING: arrayfire-3.6.0-r0 do_prepare_recipe_sysroot: Manifest /home/damien/pyro/build-jetson-tx2/tmp/sstate-control/manifest-x86_64-arrayfire-native.populate_sysroot not found?

and /home/damien/pyro/build-jetson-tx2/tmp/work/aarch64_tegra186-poky-linux/arrayfire/3.6.0-r0/recipe-sysroot-native did not contain the bin2cpp binary.

What did I miss?


On Tue, May 22, 2018 at 12:19 PM, Burton, Ross <ross.burton@...> wrote:
On 22 May 2018 at 08:43, Damien LEFEVRE <lefevre.da@...> wrote:
> I'm having to build a package (arrayfire) for Tegra. This package requires
> to first build a x86_64 utility (bin2cpp) which is then used for building
> the tegra arrayfire.
> Do I understand correctly that I should create:
> for compiling the x86_64 utility. If so how do I
> instruct the platform?
> for compiling the tegra platform. This recipe requires
> and I should get a copy in the recipe-sysroot-native
> folder?

That's one solution, but if it's jus a single tool that you need built
then you can build that yourself using the host compiler.  The best
practise here is for the upstream build to respect CC_FOR_BUILD ("use
this compiler to build binaries that I need to run at build time")
which we already export.  As presumably arrayfire doesn't do this,
then you can just build it yourself first.  For example, the Pango
recipe in oe-core basically does this:

do_compile_prepend_class-target () {
            make CC="${BUILD_CC}" LDFLAGS="${BUILD_LDFLAGS}" -C
${B}/tests gen-all-unicode

Which makes it build tests/gen-all-unicode using BUILD_CC (host
compiler, not cross compiler) for target builds before it goes and
builds the rest of the project.


Join to automatically receive all group messages.