<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 8:48 AM <<a href="mailto:Mikko.Rapeli@bmw.de">Mikko.Rapeli@bmw.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Aug 24, 2018 at 03:10:28PM +0000, Bach, Pascal wrote:<br>
> <br>
> > > Fixes problems which we have also seen on sumo branch. Thanks for this!<br>
> > <br>
> > Sorry, spoke too soon. This fixes compilation on a few recipes in my tree but<br>
> > there are still lots failures with the same error message. We had a hacky<br>
> > patch to cmake as a workaround but that too causes some problems:<br>
> <br>
> I have not yet figured out what CMake based projects are affected and why.<br>
> The error seems to happen only for certain projects.<br>
<br>
In our case it looks like a library is adding target_include_directories()<br>
with SYSTEM keyword in its cmake module. Everyone who includes the cmake module<br>
fails to build. This repeats with a handful of cmake modules and causes all<br>
of their dependencies to fail build with errors like:<br>
<br>
.../recipe-sysroot/usr/include/c++/7.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory<br>
| #include_next <stdlib.h><br>
| ^~~~~~~~~~<br>
| compilation terminated.<br>
<br>
or<br>
<br>
| cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]<br>
...<br>
.../recipe-sysroot/usr/include/stdlib.h:133:35: error: missing binary operator before token <br>
"("<br>
| #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)<br>
| ^<br>
<br>
So to me it looks like using SYSTEM with target_include_directories()<br>
is no longer possible with CMake and gcc > 6:<br>
<br>
<a href="https://cmake.org/cmake/help/v3.10/command/target_include_directories.html?highlight=target_include_directories" rel="noreferrer" target="_blank">https://cmake.org/cmake/help/v3.10/command/target_include_directories.html?highlight=target_include_directories</a><br>
</blockquote><div dir="auto"><br></div><div dir="auto">That’s right there is a patch I did in WebKitgtk recipe in Oe Core you might want to include similar fixes for this package the patch actually it a workaround but then I also think using isystem in apps is a bad idea </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> > --- a/Modules/Compiler/GNU.cmake<br>
> > +++ b/Modules/Compiler/GNU.cmake<br>
> > @@ -45,7 +45,7 @@<br>
> > set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE<br>
> > "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E<br>
> > <SOURCE> > <PREPROCESSED_SOURCE>")<br>
> > set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE<br>
> > "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S<br>
> > <SOURCE> -o <ASSEMBLY_SOURCE>")<br>
> > if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS<br>
> > 4) # work around #4462<br>
> > - set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")<br>
> > + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-I ")<br>
> > endif()<br>
> > <br>
> > set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)<br>
> > <br>
> > I wonder what the real fix could be...<br>
> > <br>
> <br>
> This looks similar to another workaround I saw.<br>
> Setting CMAKE_NO_SYSTEM_FROM_IMPORTED to True. I'm also not sure what the real fix is.<br>
> The issue is also discussed here: <a href="https://gitlab.kitware.com/cmake/cmake/issues/16291" rel="noreferrer" target="_blank">https://gitlab.kitware.com/cmake/cmake/issues/16291</a><br>
<br>
Thanks for the ticket link.<br>
<br>
-Mikko<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>