From: Laurent Gatto <laurent.gatto@gmail.com>
To: help-guix@gnu.org
Subject: C++ error
Date: Tue, 12 Nov 2024 08:41:00 +0100 [thread overview]
Message-ID: <CA+uNOzhydFVFCb1k3=Tay4oE3YRh6J1AEc-7rA5d9hA0=LUE=w@mail.gmail.com> (raw)
Dear all,
I have this very simple code chunk
$ cat main.cpp
#include <iostream>
int main(void) {
std::cout << __cplusplus;
return 0;
}
That I can compile in a minimal shell
$ guix shell --container gcc-toolchain
[env]$ g++ main.cpp && ./a.out
201703
However, on my main system, I get
$ g++ main.cpp
In file included from /home/lgatto/.guix-profile/include/c++/bits/move.h:57,
from
/home/lgatto/.guix-profile/include/c++/bits/exception_ptr.h:43,
from /home/lgatto/.guix-profile/include/c++/exception:153,
from /home/lgatto/.guix-profile/include/c++/ios:39,
from /home/lgatto/.guix-profile/include/c++/ostream:38,
from /home/lgatto/.guix-profile/include/c++/iostream:39,
from main.cpp:1:
/home/lgatto/.guix-profile/include/c++/type_traits:732:26: error:
expected identifier before ‘(’ token
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ^
/home/lgatto/.guix-profile/include/c++/type_traits:732:27: error:
expected unqualified-id before string constant
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lgatto/.guix-profile/include/c++/type_traits:732:27: error:
expected ‘)’ before string constant
732 | _GLIBCXX20_DEPRECATED("use is_standard_layout &&
is_trivial instead")
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| )
/home/lgatto/.guix-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")
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lgatto/.guix-profile/include/c++/type_traits:3154:25: error:
expected ‘)’ before string constant
3154 | _GLIBCXX20_DEPRECATED("use is_standard_layout_v &&
is_trivial_v instead")
|
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| )
Other issues lead me to suspect that I lost support for C++17 and beyond.
Any idea what/how I messed up and how to fix this?
Thanks in advance.
Laurent
next reply other threads:[~2024-11-12 7:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-12 7:41 Laurent Gatto [this message]
2024-11-12 17:54 ` C++ error Fredrik Salomonsson
2024-11-12 20:26 ` Laurent Gatto
2024-11-13 0:50 ` Fredrik Salomonsson
2024-11-13 6:49 ` Laurent Gatto
2024-11-13 19:12 ` Fredrik Salomonsson
2024-11-13 21:33 ` Laurent Gatto
2024-11-14 18:51 ` Fredrik Salomonsson
2024-11-16 10:56 ` Laurent Gatto
2024-11-16 13:19 ` Laurent Gatto
2024-11-18 18:49 ` Fredrik Salomonsson
2024-11-21 8:50 ` Laurent Gatto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+uNOzhydFVFCb1k3=Tay4oE3YRh6J1AEc-7rA5d9hA0=LUE=w@mail.gmail.com' \
--to=laurent.gatto@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).