[yocto] problems with cmake finding the c++ includes

Burton, Ross ross.burton at intel.com
Tue Apr 26 01:39:26 PDT 2016


On 26 April 2016 at 09:04, <S.Jaritz at esa-grimma.de> wrote:

> I am new to yocto. I like to create an recipe for the g3log library. I
> managed to get the git sources and start the cmake compile. But it stops
> when it tries to compile "#include <string>". Do you have an idea how to
> fix that?
>

Actually including the output of do_configure would be helpful to see what
the errors are.  It's fairly common for cmake-using recipes to override the
CFLAGS/CXXFLAGS provided by the user (in this case, bitbake) which tell it
where the compiler is, so the CMakeLists need fixing.

I'll also review your recipe.

Below there is the content of the "g3log.bb":
> ################################
> SUMMARY = "g3log"
> SECTION = "sek4"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://$
> {COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>

This should point to the LICENSE file in the clone, and that license file
doesn't say MIT.

DEPENDS ="boost"
>
> SRC_URI[md5sum] = "0dd4767bd072159e64ad69052bb1dbba"
> SRC_URI[sha256sum] =
> "4fbcc9afe24f6d8b5b90ff04481e88dd0b34f6a797825dab02cd88f129d3ccb7"
>

If you're doing a git clone then you don't need SRC_URI checksums.


> SRC_URI = "git://github.com/KjellKod/g3log.git;rev=1.2"
>

It's best practise to use a SHA instead of a tag name, as the tag name
needs to be resolved on every build which means a network operation.

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160426/cf17e948/attachment.html>


More information about the yocto mailing list