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

Paul Eggleton paul.eggleton at linux.intel.com
Wed Apr 27 20:26:30 PDT 2016


Hi Stefan,

On Wed, 27 Apr 2016 08:35:51 S.Jaritz at esa-grimma.de wrote:
> Thank you for taking time to check my problem. I fixed that. Maybe not how
> you will do it.
> My main problem still exists - the compiling problem when the std. c++
> includes needed to be compiled. Maybee you have an idea how to tell the
> cmake class where to search it's header files.

The problem is Build.cmake in the g3log sources is setting CMAKE_CXX_FLAGS 
outright instead of adding to it, with the result that the default arguments 
set by OE (most importantly --sysroot) aren't being supplied to the compiler, 
so it can't find the standard headers. Really that file needs to be patched - 
I've attached a patch to fix it which you can put in a "files" or "g3log" 
directory alongside the recipe and add a file:// pointer to in SRC_URI, see 
other recipes for examples).

Also attached is a patch to fix the fact that the libg3log.so library produced 
wasn't versioned, which our build system expects and if it's not the case you 
will get a QA error. It is possible to disable that check but this is a little 
neater.

(I wouldn't normally go this far, but I was in a curious mood this afternoon.)

Cheers,
Paul

PS if you could please retain the mailing list on replies (unless they need to 
be private) that would be great.

-- 

Paul Eggleton
Intel Open Source Technology Centre
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Ensure-default-CXX-flags-such-as-sysroot-don-t-get-w.patch
Type: text/x-patch
Size: 1957 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160428/0d43cd50/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Use-a-versioned-library.patch
Type: text/x-patch
Size: 843 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160428/0d43cd50/attachment-0001.bin>


More information about the yocto mailing list