Search code examples
cmakeyoctobitbake

How do I see Cmake messages in bitbake output?


I am building libiio for my yocto image using this libiio recipe from meta-oe.

In the library's CMakeLists.txt file, there are lines like:

message(STATUS "cmake version: ${CMAKE_VERSION}")
[...]
message(SEND_ERROR "IPv6 is not available in your system.")
[...]
message(WARNING "Missing pkgbuild or productbuild: OSX installer won't be created.")

However, when I run bitbake libiio I do not see any messages

How do I set up my yocto/bitbake environment in a way I can see these messages and errors?


Solution

  • If you inherit cmake in your recipe or you don't, I assume that cmake command is executed during do_configure, in Yocto, task logs are saved in the working directory of the recipe under:

    WORKDIR/temp/log.do_configure
    

    So, follow the following:

    1. Get the working directory of your recipe
    bitbake -e libiio | grep ^WORKDIR=
    
    1. Change directory to that path

    2. Check the content of temp/log.do_configure

    If you want to see them directly through the bitbake command use -v option:

    -v, --verbose Enable tracing of shell tasks (with 'set -x'). Also print bb.note(...) messages to stdout (in addition to writing them to ${T}/log.do_)

    bitbake -v -c do_configure libiio