From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 22 04:10:14 2020 Received: (at 43023) by debbugs.gnu.org; 22 Oct 2020 08:10:14 +0000 Received: from localhost ([127.0.0.1]:51368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVVfq-0005pR-I4 for submit@debbugs.gnu.org; Thu, 22 Oct 2020 04:10:14 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:40194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kVVfo-0005pB-TJ for 43023@debbugs.gnu.org; Thu, 22 Oct 2020 04:10:13 -0400 X-IronPort-AV: E=Sophos;i="5.77,404,1596492000"; d="scan'208";a="362464327" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2020 10:10:05 +0200 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Emmanuel Agullo Subject: Re: bug#43023: clang++ in a {clang-toolchain + gcc-toolchain} environment References: <109069324.10892414.1598276637610.JavaMail.zimbra@inria.fr> Date: Thu, 22 Oct 2020 10:10:05 +0200 In-Reply-To: <109069324.10892414.1598276637610.JavaMail.zimbra@inria.fr> (Emmanuel Agullo's message of "Mon, 24 Aug 2020 15:43:57 +0200 (CEST)") Message-ID: <87v9f2u1eq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 43023 Cc: 43023@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Emmanuel, Emmanuel Agullo skribis: > A typical "hello world" C++ fails in an environment with both > `gcc-toolchain' and `clang-toolchain', apperently due to the setup of > the `CPLUS_INCLUDE_PATH' environment variable (used because of the > `#include ' instruction), when compiling with `clang++'. Did you want to have both toolchains in the environment, or was the goal to use Clang, but GCC just happened to be already there (being the default toolchain)? In the latter case, the new =E2=80=98--with-c-toolchain=E2=80=99 option may= help: it allows you to select =E2=80=98clang-toolchain=E2=80=99 instead of the defau= lt GCC tool chain. Note =E2=80=9Cinstead of=E2=80=9D rather than =E2=80=9Cin addition = to=E2=80=9D, which means that there=E2=80=99s only one tool chain in the environment, so no risk of interference. https://guix.gnu.org/manual/devel/en/html_node/Package-Transformation-Opt= ions.html Now, if you really want the two toolchains in the same environment, we=E2=80=99ll have to investigate, though I=E2=80=99m not sure it=E2=80=99s= even fixable as it breaks assumptions behind uses of #include_next in libstdc++ and elsewhere. Thanks, Ludo=E2=80=99.