From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: bug#30756: gcc7 doesn't find stdlib.h Date: Fri, 04 May 2018 13:14:15 -0400 Message-ID: <87vac3ibrs.fsf@netris.org> References: <87fu59zagv.fsf@gnu.org> <5212cd7e-5f52-2826-2f65-9b66af4e73ad@mortis.eu> <87d0ybvbep.fsf@gnu.org> <36478fc2-98e7-0ebd-9048-7193fd240f5c@mortis.eu> <87k1sjsan9.fsf@gnu.org> <58dc244a-8ff5-fb1f-8c7b-d6745c1f2558@mortis.eu> <87zi1fid9r.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fEeJS-0005wH-1V for bug-guix@gnu.org; Fri, 04 May 2018 13:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fEeJO-0000tN-On for bug-guix@gnu.org; Fri, 04 May 2018 13:16:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42035) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fEeJO-0000sz-KU for bug-guix@gnu.org; Fri, 04 May 2018 13:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fEeJO-0000Z9-94 for bug-guix@gnu.org; Fri, 04 May 2018 13:16:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87zi1fid9r.fsf@netris.org> (Mark H. Weaver's message of "Fri, 04 May 2018 12:41:52 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Giel van Schijndel Cc: 30756@debbugs.gnu.org Mark H Weaver writes: > Giel van Schijndel writes: > >> The problem seems to be triggered by glibc appearing on the search path. >> >> I'm not sure about GCC's internals exactly so I'm making one assumption >> that causes all of this to make sense to me: if a directory appears >> multiples times in the search path it will be searched only the first >> time that it's encountered. >> >> So in short: contains an "#include_next " >> preprocessor directive. That's a GCC extension that tells the >> preprocessor it should only search directories appearing in the search >> path _after_ the directory containing the file currently being processed. > > I ran into the same problem with our 'gjs' package in the 'core-updates' > branch. First I added 'gcc-7' to the inputs to work around a different > issue (an internal compiler error in gcc-5), and then I encountered the > exact problem you described above. > > On my own private branch, I worked around this problem by adding > "-idirafter /include" to CXXFLAGS, but of course it's not a proper > fix. My workaround happens to be in Savannah on the > 'reproduce-bug-29774' branch: > > https://git.savannah.gnu.org/cgit/guix.git/commit/?h=reproduce-bug-29774&id=87022e2666c5e68e865eb160a4bd8e9cdcc1a955 I forgot to mention that in addition to adding -idirafter, I also had to remove /include from CPLUS_INCLUDE_PATH. Without the latter, the -idirafter directive was ignored as a duplicate. Mark