[yocto] How should we handle GCC 6 and -isystem /usr/include?

Martin Kelly mkelly at xevo.com
Wed Apr 26 09:55:16 PDT 2017


On 04/25/2017 05:44 PM, Khem Raj wrote:
>
>
> On 4/20/17 5:04 PM, Martin Kelly wrote:
>> Hi,
>>
>> After compiling a package with GCC 6, I noticed the following error,
>> which is a known issue:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
>>
>> The problem is caused by adding -isystem /usr/include, which breaks the
>> GCC 6's #include_next. I see that Khem Raj already removed this for the
>> nativesdk [1], but it seems we need a similar fix for other packages, as
>> we are still adding -isystem in meta/conf/bitbake.conf:
>>
>> [snip]
>> BUILDSDK_CPPFLAGS = "-isystem${STAGING_INCDIR}"
>> [snip]
>
> You must be not using master since it has been fixed by
> http://git.openembedded.org/openembedded-core/commit/meta/conf/bitbake.conf?id=88ec93d152762aedeaa231d2732e9d4b9843795a
>

The bug is referenced is actually exactly that commit (just in poky 
rather than oe-core); it looks like I mistyped, as I should have said:

[snip]
export BUILD_CPPFLAGS = "-isystem${STAGING_INCDIR_NATIVE}"
[snip]

That said, after further root causing the issue, I found that -isystem 
/usr/include was *not* coming from BUILD_CPPFLAGS but instead from QMake 
translating -I /usr/include into -isystem /usr/include, as is mentioned 
in this Qt bug:

https://bugreports.qt.io/browse/QTBUG-53375

So, AFAICT, what I referenced in bitbake is not really an issue, and the 
real problem is related to QMake.



More information about the yocto mailing list