From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uCglOw6cOGfuKgAAqHPOHw:P1 (envelope-from ) for ; Sat, 16 Nov 2024 13:20:15 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uCglOw6cOGfuKgAAqHPOHw (envelope-from ) for ; Sat, 16 Nov 2024 14:20:15 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ABJXgUuN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731763214; a=rsa-sha256; cv=none; b=oTwYdF0gA9g9X+jZkfd4qICvli+DV4AxDcxJ95zI4SmMpGefqC+vZVeQLnHoucGa29aaVe yFooF2/Nzw2hJK2MaBSqMbpI2wiUEXu8kSFTiG9IIdYX5yD0MEbL/6bHH5hgtWWvy9Ts/5 xk2XnHNtvqWDYFBX0tdxHHOlJCOt3ZB9mMJaAb25Ix8aEo/+00Rw6QeOJdU+/i2PDp8kYs q0KuuegzEg30qJ95EA6zDyXROnBNMYPbkAkivpIN8HoexgFq4v9l1i0yaapmoSHZUfSFtk w1n4KpxfIY1kIgm4L+8rjM5tETvE8E68b+VQumfX4cxITRSkz6STinAOKnJn1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=ABJXgUuN; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731763214; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=O1/Scucoa9p9E3y8YfuIIztFdzy8o5+nAjqxTjFlZik=; b=VbDIe2Y7bQGZRvSyLmxqVi1LSEuO4E75Wzrxgzfq56zMU/Iu4AFNpmRuQqM3DP4AzOCKVp CXgHdYJRvNm6ZEjObyVFqLJ1gtBqDieEda+YJgcKc2hxwYtz7P13XYwUqhUcNkkRVJcuf+ 7jxWKXTY/WxzUez5QO2mfosp4Ho9Z3XwPNkHfsXlAzeXE3Q5w3KgmpTvJDvvLNEA3/7bvX KPrxVmXmbTee0ORkrHoj7Z6lQqIPxYmTD47jMetWmitKDukkM9nIX6JmDGogJYRafI2VVT 3LNV7SQBhV/I88Y6EnN5rcNiGVUIVa67UzvDBiB/dxiMSwOGBY/ldofnyqkPww== 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 926AE823D3 for ; Sat, 16 Nov 2024 14:20:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tCIi6-0001fp-NK; Sat, 16 Nov 2024 08:19:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCIi5-0001fQ-JK for help-guix@gnu.org; Sat, 16 Nov 2024 08:19:33 -0500 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tCIi4-00054B-43 for help-guix@gnu.org; Sat, 16 Nov 2024 08:19:33 -0500 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-20ce65c8e13so17125135ad.1 for ; Sat, 16 Nov 2024 05:19:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731763171; x=1732367971; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O1/Scucoa9p9E3y8YfuIIztFdzy8o5+nAjqxTjFlZik=; b=ABJXgUuNQ4hj9SPiASOww4wr35ocKS+Zsg0uWkpTOf3DBNXLRjZAOhz5gClQqf7TIr oXE+sdwvjXpl9KDtaTnOpRrc0WDL0Ln1V+47iex5rudo9paxidWPLE/GePybE6KV7UGU AztQ+lyabJMuomMX2bpMdkyn3uB09DGQ9iEh5+v/hC5WrmgoG4XXuX9ZtMxbPenyEMOa 4i+Vl0eP/7VNauwzPRo4CxezUO8NKVpZOdJ6ahZwbK0soTGY7YMR4x/e4et2q83/3sPY ZC+WFSY2qhY07WZgYTlP8J1a8yhS81PfipiKKKsMpFEotm1jQWmYlGMhv7Ke4O4DRLmZ LfAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731763171; x=1732367971; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O1/Scucoa9p9E3y8YfuIIztFdzy8o5+nAjqxTjFlZik=; b=NFWkt/McG3DtH93OB0b2rt6fWzLocjloFT5Hci9ZsfnyLEDBoNiukCxqeaPmxD5vRf 4j7Vx95VxjxhvIMyoWuajLMboZTkUfiXHuQYyZKIOT2ga1OQW4PP/l4pCFGp8sgsiSv8 a6xffVnvAp/zv+nce9bVYQTnwPBv06AMnwZ1GKNnvCjAubTCoDIw/YHc3d/6aI5IV33q Le2uXFKZYMOwmPcNncTEVIJMM1ODrHkq0R6h5CGMCFEbWYiWPyGW7P2cTVoBUJO/BINg 3A5ZbLzl5imj71jZVnvp1uEu98N0A5a4FbjhuLwd9u/Yvrn4aSbIRGthJQBJrprOscym f/7A== X-Gm-Message-State: AOJu0Yx9EYLlTikO8Vtvv0sQPNIfSXYDImLCKqbyUFZTPxmQQb/Egxgo umcwFvLAlSJMItPXGwoFQb+1Q2kfBYLoTjmNs5Q8N5l9gl1J2LT8bPFJhcQNuAYzsh1Eowd5cYo MCjZOocQ0IRTVaF6zDfr6kir4jbw= X-Google-Smtp-Source: AGHT+IFYyYCy3d5D+49jgoACGKAYYmCr+Hchnp8/ZH/IOIGUjgp4nhmf2wIUUKd2ICFCo4E1gKtATuNGRa8a1KqP1Lw= X-Received: by 2002:a17:902:d48e:b0:20c:e5b5:608a with SMTP id d9443c01a7336-211d0d5ea23mr88070075ad.5.1731763170543; Sat, 16 Nov 2024 05:19:30 -0800 (PST) MIME-Version: 1.0 References: <87a5e42v95.fsf@posteo.net> <877c982bz9.fsf@posteo.net> <87msi3ne27.fsf@posteo.net> <87r07d8x9n.fsf@posteo.net> In-Reply-To: From: Laurent Gatto Date: Sat, 16 Nov 2024 14:19:04 +0100 Message-ID: Subject: Re: C++ error To: Fredrik Salomonsson Cc: help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=laurent.gatto@gmail.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.25 X-Spam-Score: -6.25 X-Migadu-Queue-Id: 926AE823D3 X-Migadu-Scanner: mx10.migadu.com X-TUID: PGIOtS8hFduu On Sat, 16 Nov 2024 at 11:56, Laurent Gatto wrote: > > Hi Fredrik, > > Excellent advice, and I was able to identify the culprit. > > Here's a simple reproducible example > > $ guix shell --container gcc-toolchain > [env]$ g++ main.cpp > [env]$ exit > > $ guix shell --container gcc-toolchain gfortran-toolchain > [env]$ g++ main.cpp > In file included from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/bits/move.h:57, > from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/bits/exception_ptr.h:43, > from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/exception:153, > from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/ios:39, > from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/ostream:38, > from > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/iostream:39, > from main.cpp:1: > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/type_traits:732:26: > error: expected identifier before '(' token > 732 | _GLIBCXX20_DEPRECATED("use is_standard_layout && > is_trivial instead") > | ^ > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/type_traits:732:27: > error: expected unqualified-id before string constant > 732 | _GLIBCXX20_DEPRECATED("use is_standard_layout && > is_trivial instead") > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/type_traits:732:27: > error: expected ')' before string constant > 732 | _GLIBCXX20_DEPRECATED("use is_standard_layout && > is_trivial instead") > | ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | ) > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/type_traits:3154:25: > error: expected unqualified-id before string constant > 3154 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v && > is_trivial_v instead") > | > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /gnu/store/68l504nyvms77jzfg9yf4njiyfbi8gm2-profile/include/c++/type_traits:3154:25: > error: expected ')' before string constant > 3154 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v && > is_trivial_v instead") > | > ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | ) The order of the packages does matter. The above fails, but if I pass gfortran-toolchain before gcc-toolchain, it works: $ guix shell --container gfortran-toolchain gcc-toolchain [env]$ g++ main.cpp [env]$ ./a.out 201703 Is this really expected? > I also confirmed that I was able to compile that source code by simply > commenting gfortran-toolchain in my system manifest. > > Isn't this weird though? What if I need both? > > > Laurent