From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EAdQOcgN5GBq4gAAgWs5BA (envelope-from ) for ; Tue, 06 Jul 2021 10:01:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cAL+NMgN5GCaMQAAB5/wlQ (envelope-from ) for ; Tue, 06 Jul 2021 08:01:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 58D9025B6D for ; Tue, 6 Jul 2021 10:01:12 +0200 (CEST) Received: from localhost ([::1]:43746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0g11-0004FD-6X for larch@yhetil.org; Tue, 06 Jul 2021 04:01:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0g0s-0004F3-MG for bug-guix@gnu.org; Tue, 06 Jul 2021 04:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35648) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0g0s-0007tc-DQ for bug-guix@gnu.org; Tue, 06 Jul 2021 04:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0g0s-0006J5-6w for bug-guix@gnu.org; Tue, 06 Jul 2021 04:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49350: gcc-toolchain compilation error with -nostdinc++ Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 06 Jul 2021 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49350 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ontje =?UTF-8?Q?L=C3=BCnsdorf?= Cc: 49350@debbugs.gnu.org Received: via spool by 49350-submit@debbugs.gnu.org id=B49350.162555844424208 (code B ref 49350); Tue, 06 Jul 2021 08:01:02 +0000 Received: (at 49350) by debbugs.gnu.org; 6 Jul 2021 08:00:44 +0000 Received: from localhost ([127.0.0.1]:47194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0g0a-0006IN-EB for submit@debbugs.gnu.org; Tue, 06 Jul 2021 04:00:44 -0400 Received: from out0.migadu.com ([94.23.1.103]:12373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0g0W-0006ID-TH for 49350@debbugs.gnu.org; Tue, 06 Jul 2021 04:00:43 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1625558439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Oage8twOQ5tgnxOBAl0F4GW6veJGr3TC3bspVfsPvgw=; b=PGRsGkz7m4Nbyzop3ou9QjJH5a6gknZ8+j0WlsKNN3go+z5/8VX5+NiFGzNZ7fUItiiekw Wz9X/WBMf7iWWMO2+r9Yh4YPxe/TaYNRqUsoYuHsQu6Wccf3DllBX3LI2R6n6KO1/Ze8jM 7NfLUM83vobPR+H9/xHRtdygh+wAmNI= References: <87k0m73cjc.fsf@mailbox.org> Date: Tue, 06 Jul 2021 01:00:37 -0700 In-Reply-To: <87k0m73cjc.fsf@mailbox.org> ("Ontje =?UTF-8?Q?L=C3=BCnsdorf?="'s message of "Sat, 03 Jul 2021 12:41:11 +0200") Message-ID: <86pmvvkh22.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Sarah Morgensen From: Sarah Morgensen via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625558472; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Oage8twOQ5tgnxOBAl0F4GW6veJGr3TC3bspVfsPvgw=; b=q/dmx8afH5AIO2EOcSYdf146kzlR0yYw+dP06uYf3LC5AZCxCnZDm76a2DmE762iyOwmr3 Jdl+wKuI3wk4NB/L517o+6hakVqVAHb6BkaZcdyCC9Y6I6BpgbzQfxn2mez9t1bgcEHVhb xgAPOpCKCRT7qBrw8R1qeLBLghkVItxJfwcFnCvDQOzD2Z1svuJ7PO2p9pxI0SD9bT4Osm ayNSEDKTkjee37ecoz/lVO5bu4ICyFiumQd1wRjl1mNhuNe5iRQTzG/Ui8mwjihO2teAIh dMGWs04ejOysHze/xsOtrFIUGQTkOE6VkGkNjOvLQLE4/gmYK8zz5uiCSiUJDg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625558472; a=rsa-sha256; cv=none; b=lG/D4SM0/qTWcJLELp2+XamOw+5J8eS3ar1N+BqQnapsDsAK+44saqsV8EgKFvEwoM8YK9 6+8L/F0p1IRHHt3wNa+t7tKFID8fQh2yuJczOtXbLUzOAgL3YP3rtVwVuMpCUdSu1RK+md HAtTGIPCosJ2rmJS+OE3HXq+BMU4qAQ6jaG6iXiy4oSlHFyakmNOGxXvoivisxh/Fi7dep DdHAiI39IokQKnunmj3MRUUIlkiDSFzb470Zphi8VlABCAnmcoutFIam13vxyVaFc7qYjV EPKUEoWRsnbnrlemmdcR4NGjxwdJO3xHn/Qc4sIBolEEdehBAdhpOgObfH1KSQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=PGRsGkz7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=PGRsGkz7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 58D9025B6D X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: IVyfaHPJQZei Hello, Thanks for the report. Ontje L=C3=BCnsdorf writes: > Hi all, > > > I've problems compiling LLVM manually with the gcc-toolchain. > sanitizer_posix_libcdep.cpp is build with -nostdinc++ and fails to find > bits/c++config.h. > > I think the issue can be reproduced with this example test.cpp: > > #include > int main() { return 0; } I am able to repro with this test case on Guix System, both in and outside of a guix environment --pure. > > c++ from archlinux compiles that file, while c++ from gcc-toolchain doesn= 't: > > $ c++ -nostdinc++ test.cpp > $ guix environment --ad-hoc gcc-toolchain -- c++ -nostdinc++ test.cpp > In file included from /gnu/store/nh9r04xhzmbk3hjsj92yhlhmjsp521g4-profile= /include/c++/stdlib.h:36, > from test.cpp:1: > /gnu/store/nh9r04xhzmbk3hjsj92yhlhmjsp521g4-profile/include/c++/cstdlib:4= 1:10: fatal error: bits/c++config.h: No such file or directory > 41 | #include > | ^~~~~~~~~~~~~~~~~~ > compilation terminated. > > Is this expected and I'm doing something wrong? The issue seems to be with the (automatically set by Guix) CPLUS_INCLUDE_PATH environment variable. The following works as expected: guix environment --pure --ad-hoc gcc-toolchain -- CPLUS_INCLUDE_PATH=3D c= ++ -nostdinc++ test.cpp It seems that -nostdinc++ controls whether GCC decides to add the C++ std include paths internally, but it still looks in the paths indicated by CPLUS_INCLUDE_PATH. Guix sets CPLUS_INCLUDE_PATH and friends because there is no system-wide /include. I'm not sure how expected this specific behavior is, though... > > Thanks & best regards, > Ontje Hope that helps, Sarah