<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 24, 2018 at 8:48 AM &lt;<a href="mailto:Mikko.Rapeli@bmw.de">Mikko.Rapeli@bmw.de</a>&gt; 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>
&gt;  <br>
&gt; &gt; &gt; Fixes problems which we have also seen on sumo branch. Thanks for this!<br>
&gt; &gt; <br>
&gt; &gt; Sorry, spoke too soon. This fixes compilation on a few recipes in my tree but<br>
&gt; &gt; there are still lots failures with the same error message. We had a hacky<br>
&gt; &gt; patch to cmake as a workaround but that too causes some problems:<br>
&gt; <br>
&gt; I have not yet figured out what CMake based projects are affected and why.<br>
&gt; 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 &lt;stdlib.h&gt;<br>
|                ^~~~~~~~~~<br>
| compilation terminated.<br>
<br>
or<br>
<br>
| cc1plus: warning: include location &quot;/usr/include&quot; 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>
&quot;(&quot;<br>
|  #if __HAVE_FLOAT16 &amp;&amp; __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 &gt; 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>
&gt; &gt; --- a/Modules/Compiler/GNU.cmake<br>
&gt; &gt; +++ b/Modules/Compiler/GNU.cmake<br>
&gt; &gt; @@ -45,7 +45,7 @@<br>
&gt; &gt;    set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE<br>
&gt; &gt; &quot;&lt;CMAKE_${lang}_COMPILER&gt; &lt;DEFINES&gt; &lt;INCLUDES&gt; &lt;FLAGS&gt; -E<br>
&gt; &gt; &lt;SOURCE&gt; &gt; &lt;PREPROCESSED_SOURCE&gt;&quot;)<br>
&gt; &gt;    set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE<br>
&gt; &gt; &quot;&lt;CMAKE_${lang}_COMPILER&gt; &lt;DEFINES&gt; &lt;INCLUDES&gt; &lt;FLAGS&gt; -S<br>
&gt; &gt; &lt;SOURCE&gt; -o &lt;ASSEMBLY_SOURCE&gt;&quot;)<br>
&gt; &gt;    if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS<br>
&gt; &gt; 4) # work around #4462<br>
&gt; &gt; -    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} &quot;-isystem &quot;)<br>
&gt; &gt; +    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} &quot;-I &quot;)<br>
&gt; &gt;    endif()<br>
&gt; &gt; <br>
&gt; &gt;    set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)<br>
&gt; &gt; <br>
&gt; &gt; I wonder what the real fix could be...<br>
&gt; &gt; <br>
&gt; <br>
&gt; This looks similar to another workaround I saw.<br>
&gt; Setting CMAKE_NO_SYSTEM_FROM_IMPORTED to True. I&#39;m also not sure what the real fix is.<br>
&gt; 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>