1

My project uses a old distribution of poky where the meson version is 0.44.1. My objective is to upgrade this distribution of meson, without changing anything on the static poky layer.

So I created a new meson_0.53.1.bb file located inside my-custom-layer/recipes-devtools/meson/, with the appropriate references to its SRC_URI and its hashes.

However, my custom recipes are not being built with/don't recognize this version of meson, for example I have this recipe:

SUMMARY = "Detection algorithm"
LICENSE = "CLOSED"
PR = "2"
PV = "0.1.1"

DEPENDS = "meson boost libeigen"

SRC_URI = "git://git@eng-server:9022/perseus-libraries/detection.git;protocol=ssh"
SRCREV = "f7747c2bbb72a08e116d22a941645b2703ac6b26"

S = "${WORKDIR}/git"

inherit meson pkgconfig

SYSROOT_DIRS += "${PERSEUS_APP_DIR}"

MESON_VERSION = "0.53.1"
MESONOPTS = " --prefix ${PERSEUS_APP_DIR} \
              --buildtype plain \
              --bindir ${PERSEUS_APP_DIR}/bin/ \
              --libdir ${PERSEUS_APP_DIR}/lib/  "

FILES_${PN} = "${libdir}/* ${PERSEUS_APP_DIR}/ ${includedir}"
FILES_${PN}-dev = "${libdir}/pkgconfig/* ${includedir}"

I have already checked that my layer has a higher priority with bitbake-layers show-layers, and I have altered my local.conf file to add

MESON_VERSION = "0.53.1"
PREFERRED_VERSION_meson = "0.53.1"

What should I do to make my custom recipes recognize this newer version of meson, and be compiled/built from it?

hao123
  • 381
  • 2
  • 6
  • 21
  • 1
    Note that by default when you create a recipe like this, it will be built only for the target machine. However meson *usually* is not used on the target machine, but it is used to build other recipes, on the build machine - consequently you need a native version of it, not a target version. Make sure to add at least `BBCLASSEXTEND = "native"` to the recipe, and you might want to consider about adding a `nativesdk` version also. This is also true for the `PREFERRED_VERSION` variable - by default it is for the target machine, unless you specify that it should for the build machine. – skandigraun Aug 15 '23 at 04:56
  • @skandigraun I tried it out. Thanks. Do i need to define again the meson.bbclass file? Because it is giving errors now `temp/run.do_configure.147: line 117: meson: command not found` – hao123 Aug 15 '23 at 17:26

0 Answers0