I'm trying to write a custom recipe for a library from github (Aravis). The build/install steps are done using meson and ninja.
$ meson build
$ cd build
$ ninja
$ ninja install
Before writing/adding the recipe, I've added meson, ninja and dependencies in my custom layer.conf
. Then, on system, I've cloned the library, compiled it and run some test. Everything works fine, so I'm sure meson, ninja and all dependencies are in place (at system level).
Now I've wrote the recipe
SUMMARY = "Aravis, Your industrial vision library"
LICENSE = "LGPL-2.1"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1-only;md5=1a6d268fd218675ffea8be556788b780"
inherit systemd
SRC_URI = "https://github.com/AravisProject/aravis/archive/refs/tags/0.8.22.tar.gz"
SRC_URI[md5sum] = "8d24f794b1c5160f21c2b0d77764c86d"
DEPENDS=" \
gstreamer1.0 \
gstreamer1.0-plugins-base \
libxml2 \
glib-2.0 \
glib-2.0-native \
zlib \
libusb1 \
gtk-doc \
gobject-introspection \
intltool-native \
meson \
"
S = "${WORKDIR}/aravis-0.8.22"
do_configure() {
( cd ${S}
meson build )
}
do_build() {
( cd ${S}/build
ninja )
}
do_install () {
( cd ${S}/build
ninja install )
}
The do_configure()
step fails with a meson: not found
error. I don't know about ninja yet (didn't reach the do_build()
), but it will probably fail, too.
How to have meson and ninja tools available at compile level?
As a blind test, I tried rebuilding the toolchain (bitbake meta-toolchain-qt5
), hoping those tools will be added for the next image build, but with no luck.
EDIT
I've also noticed that meson and ninja are already available in my sdk (the one installed on host for cross-compilation after build with mentioned command bitbake meta-toolchain-qt5
).
mix@SWDEV1:/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux$ find . -name ninja
./usr/bin/ninja
mix@SWDEV1:/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/x86_64-pokysdk-linux$ find . -name meson
./usr/share/meson
./usr/bin/meson
The tools are available. I just need to understand how to use them.
Found the problem.
Another test I did was adding
inherit meson
and removing the custom tasks, but without luck.Testing it a little more, I discovered the the problem was the recipe name, that was
aravis_%.bb
. Since I didn't define a recipe version, the resulting build path wastmp/work/cortexa53-crypto-poky-linux/aravis/%_r0/
, and it looks like meson doesn't like the character%
.So I've edited my recipe so that the version is defined
Now the library will be compiled and installed.