From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Gesthuizen Subject: bug#32773: clang: missing default include paths for C++ Date: Wed, 19 Sep 2018 20:47:45 +0200 Message-ID: <85ba1fc6-e4cc-2989-14d6-bb152aa2dde4@yahoo.de> References: <19ece273-ea75-fc9d-4e4b-aa3a68deab6d@yahoo.de> <20180919183357.7xvaed2dwoxmecp7@thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2hWA-00065W-7I for bug-guix@gnu.org; Wed, 19 Sep 2018 14:48:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2hW6-00005Y-Ms for bug-guix@gnu.org; Wed, 19 Sep 2018 14:48:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2hW6-0008VB-FD for bug-guix@gnu.org; Wed, 19 Sep 2018 14:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2hW6-0004A1-Ap for bug-guix@gnu.org; Wed, 19 Sep 2018 14:48:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20180919183357.7xvaed2dwoxmecp7@thebird.nl> Content-Language: en-US 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: Pjotr Prins Cc: 32773@debbugs.gnu.org On 19.09.2018 20:33, Pjotr Prins wrote: > Hi Tim, > > I am not sure this helps but in a project I have I use > > CPPFLAGS= -std=c++11 > > and > > CPPFLAGS += -I$(GUIX)/include/c++ -I$(GUIX)/include/c++/x86_64-unknown-linux-gnu > > to find include files in Guix context with clang. Where $(GUIX) is the > profile. > > Similar to yours. Glad to hear of a better way. Yes, that seems to be quite the same to my workaround. Its just that this is a workaround that is difficult to get working in some contexts: I want to use emacs-irony-mode through guix which is not really useable because it won't autocomplete any std::* stuff. If you take all packages that might want to use libclang and other features of clang it might be a better solution to find a proper fix for this problem. Also both workarounds need a user profile that is cluttered with all include files. I had a quick look into clangs source code how C_INCLUDE_DIRS is implemented. It should be more or less easy to add the same option for C++ (even C_INCLUDE_DIRS seems to be tinkered in to me). I just wanted to file a bug about this because fixing this is not trivial and I am not sure whether I will find the time right away to fix it. Fixing it would also have the benefit that I could send the patch to the LLVM mailing list and we might see the change upstream in the next LLVM version. Tim.