[Webkit-unassigned] [Bug 161697] [CMake] Build failure with GCC 6 (fatal error: stdlib.h: No such file or directory)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 7 15:24:16 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=161697

--- Comment #8 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
(In reply to comment #6)
> (In reply to comment #5)
> > The problem seems to be adding -isystem $DEFAULTINCLUDEPATH before the
> > others -isystems. Removing that one it builds.
> 
> It's what I suspected, so the question now is: why is it happening? Or
> rather: why ISN'T it happening with /usr/include, when surely many
> pkg-config files put /usr/include in their CFLAGS? Is /usr/include being
> stripped out by pkg-config, or by CMake?
> 
> This might be a tough issue. :(

Seems that CMake ignores some directories on the include_directories list when passing the -I/-isystem arguments to the compiler. /usr/include is one of this directories
That explains why is working on the 99% of the cases, but this is broken when cross-compiling or when using a non default system include path.

The list of directories to remove is defined on the CMakes variables CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES and CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES.

So I understand that if we find a way of getting the default include directory, is a matter of appending it to this variables.

However this feels like we are work-arounding the bugs of others (GCC: i'm looking at you)

More info at https://public.kitware.com/Bug/view.php?id=8598 and CMake commits 39f8b91, cb788e8 and 8c3290b

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160907/3ec00f32/attachment.html>


More information about the webkit-unassigned mailing list