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


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Giel van Schijndel <giel <at> mortis.eu>
Cc: Marius Bakke <mbakke <at> fastmail.com>, julien lepiller <julien <at> lepiller.eu>, 30756 <at> debbugs.gnu.org
Subject: bug#30756: gcc7 doesn't find stdlib.h
Date: Fri, 04 May 2018 17:28:26 +0200
Giel van Schijndel <giel <at> mortis.eu> skribis:

> On 04-05-18 14:43, Ludovic Courtès wrote:

[...]

>> Giel, does the patch below work for you?
>
> No, just by itself it doesn't. It does add 'CPATH', but doesn't drop
> 'C_INCLUDE_PATH' and 'CPLUS_INCLUDE_PATH'.

That’s probably because your package still includes gcc <at> 5 as an implicit
input via ‘cmake-build-system’.

You could use a procedure like this to remove implicit inputs and add
your own GCC variant:

--8<---------------cut here---------------start------------->8---
(define (package-with-specific-compiler p compiler)
  "Return P modified to be built with COMPILER."
  (package
    (inherit p)
    (arguments
     `(#:implicit-inputs? #f ,@(package-arguments p)))
    (native-inputs `(("compiler" ,compiler)
                     ,@(package-native-inputs p)))
    (inputs (append (package-inputs p)
                    (alist-delete "gcc" (standard-packages))))))
--8<---------------cut here---------------end--------------->8---

… where ‘standard-packages’ comes from (guix build-system gnu).

> But I can no longer build with warnings treated as error at that point,
> because I'm getting a ton of warnings inside headers of dependencies
> now. With either of '-Wno-error' or '-w' I can build now.

Yeah, that’s a downside (that was the reason why we switched from CPATH
to C_INCLUDE_PATH a while back), but it could be a reasonable
workaround for now.

> Would it be possible to filter the list of directories added to these
> environment variables to exclude those already present in GCC's default
> search path?

I still don’t fully understand the issue actually.  What’s wrong with
having these directories appear several times in the search path?

The difficulty here will be that search path environment variables in
Guix are populated automatically based on their specifications, so it’s
not all that clear to me where that filtering would happen.

Thanks,
Ludo’.




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.