GNU bug report logs - #30756
GCC >= 6 '-isystem' and C_INCLUDE_PATH behavior changed, breaking #include_next

Previous Next

Package: guix;

Reported by: julien lepiller <julien <at> lepiller.eu>

Date: Fri, 9 Mar 2018 12:12:01 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #66 received at 30756 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: reza.housseini <at> gmx.ch, 30756 <at> debbugs.gnu.org,
 Reza Housseini <reza.housseini <at> gmail.com>
Subject: Re: bug#30756: GCC >= 6 '-isystem' and C_INCLUDE_PATH behavior
 changed, breaking
Date: Sun, 19 Jan 2020 22:25:39 -0500
Hello,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Hi,
>
> Reza Housseini <reza.housseini <at> gmail.com> skribis:
>
>> So what is the workaround for this bug when one wants to use gcc >= 6.0.0
>> with a cmake build system?
>
> Guix has been using GCC 7.x as its default compiler for some time, and
> everything works well, CMake or not.  However, we also switched to using
> ‘CPATH’ instead of ‘C_INCLUDE_PATH’ to work around this bug.
>
> HTH!
>
> Ludo’.

As has been mentioned by Giel van Schijndel earlier in this bug report,
using CPATH causes warnings to be emitted for core libraries such as
glibc since the headers found in CPATH are not (rightfully) treated as
system headers (and thus not muted by GCC).

That has bitten me here, where I was mislead to think there was a build
issue with the latest Inkscape:
https://gitlab.com/inkscape/inkscape/issues/807.  Many packages will end
up having to disable warnings to cope with this behavior.

It'd be nice to find a correct solution, but it seems I can't even make
the build system of Inkscape work after switching from CPATH to
CPLUS_INCLUDE_PATH and stripping it from any glibc/gcc include
directories (I don't get the "stdlib.h: No such file or directory."
error anymore, but I now get:
"/gnu/store/zw5f5g5aqlxam3imaylfla0i98nkridf-glibc-2.30/include/bits/errno.h:26:11:
fatal error: linux/errno.h: No such file or directory" instead, which I
don't understand).

I also tried moving the glibc include directory to the end of
CPLUS_INCLUDE_PATH and it would still wouldn't be happy.  Hmmph!

Maxim




This bug report was last modified 5 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.