* C++ error
@ 2024-11-12 7:41 Laurent Gatto
2024-11-12 17:54 ` Fredrik Salomonsson
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-12 7:41 UTC (permalink / raw)
To: help-guix
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-12 7:41 C++ error Laurent Gatto
@ 2024-11-12 17:54 ` Fredrik Salomonsson
2024-11-12 20:26 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Fredrik Salomonsson @ 2024-11-12 17:54 UTC (permalink / raw)
To: Laurent Gatto, help-guix
Hi,
Laurent Gatto <laurent.gatto@gmail.com> writes:
> 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?
What version is gcc on your main system? Could be that you somehow are
running an older gcc than what's in that .guix-profile.
I could compile that example just fine on mine.
Here is how g++ looks like on my machine, maybe that will help. Note
that I'm using guix home to install gcc-toolchain.
The version I'm using:
```
$ g++ --version
g++ (GCC) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
From where I'm picking up g++ from:
```
$ which g++
/home/plattfot/.guix-home/profile/bin/g++
```
Checking the stdc++ lib:
```
$ sed -n '3154p' ~/.guix-home/profile/include/c++/type_traits
_GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead")
```
Which matches what you have.
Here is the search paths gcc uses on my machine:
```
$ echo | g++ -E -Wp,-v -
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory "/gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../../../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/plattfot/.guix-home/profile/include
/gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/include
/gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/include-fixed
/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/home/plattfot/.guix-home/profile/include/stdc-predef.h" 1 3
# 0 "<command-line>" 2
# 1 "<stdin>"
```
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-12 17:54 ` Fredrik Salomonsson
@ 2024-11-12 20:26 ` Laurent Gatto
2024-11-13 0:50 ` Fredrik Salomonsson
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-12 20:26 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
Hi Fredrik,
Thank you for taking the time looking into this.
My issue doesn't seem to be related to an old gcc version.
```
$ g++ --version
g++ (GCC) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
My location is different though
```
$ which g++
/home/lgatto/.guix-profile/bin/g++
```
Checking the stdc++ lib:
```
$ sed -n '3154p' ~/.guix-profile/include/c++/type_traits
_GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead")
```
And the gcc search paths on my machine:
```
$ echo | g++ -E -Wp,-v -
ignoring nonexistent directory "/no-gcc-local-prefix/include"
ignoring nonexistent directory
"/gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory "/home/lgatto/.guix-profile/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/home/lgatto/.guix-profile/include
/gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include
/gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include-fixed
/gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/include
End of search list.
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/home/lgatto/.guix-profile/include/stdc-predef.h" 1 3
# 0 "<command-line>" 2
# 1 "<stdin>"
````
Except for the version and location, all this looks very similar to
what you have, which leaves me quite puzzled.
Laurent
On Tue, 12 Nov 2024 at 18:54, Fredrik Salomonsson <plattfot@posteo.net> wrote:
>
> Hi,
>
> Laurent Gatto <laurent.gatto@gmail.com> writes:
>
> > 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?
>
> What version is gcc on your main system? Could be that you somehow are
> running an older gcc than what's in that .guix-profile.
>
> I could compile that example just fine on mine.
>
> Here is how g++ looks like on my machine, maybe that will help. Note
> that I'm using guix home to install gcc-toolchain.
>
> The version I'm using:
> ```
> $ g++ --version
> g++ (GCC) 11.4.0
> Copyright (C) 2021 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ```
>
> From where I'm picking up g++ from:
> ```
> $ which g++
> /home/plattfot/.guix-home/profile/bin/g++
> ```
>
> Checking the stdc++ lib:
> ```
> $ sed -n '3154p' ~/.guix-home/profile/include/c++/type_traits
> _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead")
> ```
> Which matches what you have.
>
> Here is the search paths gcc uses on my machine:
>
> ```
> $ echo | g++ -E -Wp,-v -
> ignoring nonexistent directory "/no-gcc-local-prefix/include"
> ignoring nonexistent directory "/gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/../../../../../../../x86_64-unknown-linux-gnu/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /home/plattfot/.guix-home/profile/include
> /gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/include
> /gnu/store/w0i4fd8ivrpwz91a0wjwz5l0b2ralj16-gcc-11.4.0-lib/lib/gcc/x86_64-unknown-linux-gnu/11.4.0/include-fixed
> /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/include
> End of search list.
> # 0 "<stdin>"
> # 0 "<built-in>"
> # 0 "<command-line>"
> # 1 "/home/plattfot/.guix-home/profile/include/stdc-predef.h" 1 3
> # 0 "<command-line>" 2
> # 1 "<stdin>"
> ```
> --
> s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-12 20:26 ` Laurent Gatto
@ 2024-11-13 0:50 ` Fredrik Salomonsson
2024-11-13 6:49 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Fredrik Salomonsson @ 2024-11-13 0:50 UTC (permalink / raw)
To: Laurent Gatto; +Cc: help-guix
Hi,
Laurent Gatto <laurent.gatto@gmail.com> writes:
> Hi Fredrik,
>
> Thank you for taking the time looking into this.
No worries.
>
> My issue doesn't seem to be related to an old gcc version.
>
> ```
> $ g++ --version
> g++ (GCC) 14.2.0
> Copyright (C) 2024 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ```
>
> My location is different though
>
> ```
> $ which g++
> /home/lgatto/.guix-profile/bin/g++
> ```
> Checking the stdc++ lib:
>
> ```
> $ sed -n '3154p' ~/.guix-profile/include/c++/type_traits
> _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead")
> ```
>
> And the gcc search paths on my machine:
>
> ```
> $ echo | g++ -E -Wp,-v -
> ignoring nonexistent directory "/no-gcc-local-prefix/include"
> ignoring nonexistent directory
> "/gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../../../../x86_64-unknown-linux-gnu/include"
> ignoring duplicate directory "/home/lgatto/.guix-profile/include"
> as it is a non-system directory that duplicates a system directory
> #include "..." search starts here:
> #include <...> search starts here:
> /home/lgatto/.guix-profile/include
> /gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include
> /gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include-fixed
> /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/include
> End of search list.
> # 0 "<stdin>"
> # 0 "<built-in>"
> # 0 "<command-line>"
> # 1 "/home/lgatto/.guix-profile/include/stdc-predef.h" 1 3
> # 0 "<command-line>" 2
> # 1 "<stdin>"
> ````
>
> Except for the version and location, all this looks very similar to
> what you have, which leaves me quite puzzled.
Indeed, this is strange.
What does `guix package -I gcc` and `guix package -I stdc\+\+` give you?
Maybe it'll show you some discrepancies.
And if this is any help this is the commit I'm using for guix:
```
$ guix describe
Generation 142 nov 09 2024 12:47:04 (current)
…
guix 14abf6e
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 14abf6e19e5c24fa690a443f5467e7f0b6eafcc5
```
Note: I removed the other channels I'm using and replaced them with `…`.
None of them defines any gcc related packages so they should not affect
this.
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-13 0:50 ` Fredrik Salomonsson
@ 2024-11-13 6:49 ` Laurent Gatto
2024-11-13 19:12 ` Fredrik Salomonsson
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-13 6:49 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
Hi,
```
$ guix package -I gcc
gcc-toolchain 14.2.0 out
/gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0
```
but nothing matches stdc++
```
$ guix package -I stdc\+\+
```
If I `guix search for stdc\+\+`, I get, libstdc++-doc 9.5.0 and 5.5.0,
texlive-stdclsdv, ocaml-stdcompat and rust-link-cplusplus. Is this
normal?
```
$ guix describe
Generation 63 Nov 13 2024 00:02:27 (current)
guix-science 7304e37
repository URL: https://codeberg.org/guix-science/guix-science.git
branch: master
commit: 7304e37d4d664f27a18577e388c91413878d62fc
nonguix 99574ff
repository URL: https://gitlab.com/nonguix/nonguix
branch: master
commit: 99574ff94b6fb97794ba720b6fdadf470963dbdc
lguix-channel 4aa4417
repository URL: https://codeberg.org/lgatto/lguix-channel.git
branch: main
commit: 4aa4417eec58db3d5a9f1c90250ef57641489717
guix 4e028ec
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 4e028ecc823bcdbb69c391ad7079085cd7749b15
```
The only non-standard channel is my own, that only provides a couple
of packages. I doubt this is the culprit, as there is no gcc related
package and I was already experiencing issues before setting it up.
Laurent
On Wed, 13 Nov 2024 at 01:50, Fredrik Salomonsson <plattfot@posteo.net> wrote:
>
> Hi,
>
> Laurent Gatto <laurent.gatto@gmail.com> writes:
>
> > Hi Fredrik,
> >
> > Thank you for taking the time looking into this.
>
> No worries.
>
> >
> > My issue doesn't seem to be related to an old gcc version.
> >
> > ```
> > $ g++ --version
> > g++ (GCC) 14.2.0
> > Copyright (C) 2024 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions. There is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> > ```
> >
> > My location is different though
> >
> > ```
> > $ which g++
> > /home/lgatto/.guix-profile/bin/g++
> > ```
> > Checking the stdc++ lib:
> >
> > ```
> > $ sed -n '3154p' ~/.guix-profile/include/c++/type_traits
> > _GLIBCXX20_DEPRECATED("use is_standard_layout_v && is_trivial_v instead")
> > ```
> >
> > And the gcc search paths on my machine:
> >
> > ```
> > $ echo | g++ -E -Wp,-v -
> > ignoring nonexistent directory "/no-gcc-local-prefix/include"
> > ignoring nonexistent directory
> > "/gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/../../../../../../../x86_64-unknown-linux-gnu/include"
> > ignoring duplicate directory "/home/lgatto/.guix-profile/include"
> > as it is a non-system directory that duplicates a system directory
> > #include "..." search starts here:
> > #include <...> search starts here:
> > /home/lgatto/.guix-profile/include
> > /gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include
> > /gnu/store/ikn0imxfc6n0ba12mrf0c4hc1jm7ylc7-gcc-14.2.0-lib/lib/gcc/x86_64-unknown-linux-gnu/14.2.0/include-fixed
> > /gnu/store/zvlp3n8iwa1svxmwv4q22pv1pb1c9pjq-glibc-2.39/include
> > End of search list.
> > # 0 "<stdin>"
> > # 0 "<built-in>"
> > # 0 "<command-line>"
> > # 1 "/home/lgatto/.guix-profile/include/stdc-predef.h" 1 3
> > # 0 "<command-line>" 2
> > # 1 "<stdin>"
> > ````
> >
> > Except for the version and location, all this looks very similar to
> > what you have, which leaves me quite puzzled.
>
> Indeed, this is strange.
>
> What does `guix package -I gcc` and `guix package -I stdc\+\+` give you?
> Maybe it'll show you some discrepancies.
>
> And if this is any help this is the commit I'm using for guix:
>
> ```
> $ guix describe
> Generation 142 nov 09 2024 12:47:04 (current)
> …
> guix 14abf6e
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 14abf6e19e5c24fa690a443f5467e7f0b6eafcc5
> ```
>
> Note: I removed the other channels I'm using and replaced them with `…`.
> None of them defines any gcc related packages so they should not affect
> this.
>
> --
> s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-13 6:49 ` Laurent Gatto
@ 2024-11-13 19:12 ` Fredrik Salomonsson
2024-11-13 21:33 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Fredrik Salomonsson @ 2024-11-13 19:12 UTC (permalink / raw)
To: Laurent Gatto; +Cc: help-guix
Hello,
Laurent Gatto <laurent.gatto@gmail.com> writes:
> Hi,
>
> ```
> $ guix package -I gcc
> gcc-toolchain 14.2.0 out
> /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0
> ```
>
> but nothing matches stdc++
>
> ```
> $ guix package -I stdc\+\+
> ```
>
> If I `guix search for stdc\+\+`, I get, libstdc++-doc 9.5.0 and 5.5.0,
> texlive-stdclsdv, ocaml-stdcompat and rust-link-cplusplus. Is this
> normal?
Yeah, all that looks normal. I was thinking that maybe you had an old
package of gcc or libstdc++ lying around. As things where split up
awhile back before they added gcc-toolchain — I don't remember if
libstdc++ was ever a separate package though.
>
> ```
> $ guix describe
> Generation 63 Nov 13 2024 00:02:27 (current)
> guix-science 7304e37
> repository URL: https://codeberg.org/guix-science/guix-science.git
> branch: master
> commit: 7304e37d4d664f27a18577e388c91413878d62fc
> nonguix 99574ff
> repository URL: https://gitlab.com/nonguix/nonguix
> branch: master
> commit: 99574ff94b6fb97794ba720b6fdadf470963dbdc
> lguix-channel 4aa4417
> repository URL: https://codeberg.org/lgatto/lguix-channel.git
> branch: main
> commit: 4aa4417eec58db3d5a9f1c90250ef57641489717
> guix 4e028ec
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: 4e028ecc823bcdbb69c391ad7079085cd7749b15
> ```
>
> The only non-standard channel is my own, that only provides a couple
> of packages. I doubt this is the culprit, as there is no gcc related
> package and I was already experiencing issues before setting it up.
>
I don't think there's any issue with gcc. I installed it to the normal
profile and it worked fine for me:
```
$ guix package -i gcc-toolchain
The following package will be installed:
gcc-toolchain 14.2.0
The following derivation will be built:
/gnu/store/msdr271hjls9icnhj20p4za06hpsbrqr-profile.drv
building CA certificate bundle...
listing Emacs sub-directories...
building fonts directory...
building directory of Info manuals...
building profile with 3 packages...
hint: Consider setting the necessary environment variables by running:
GUIX_PROFILE="/home/plattfot/.guix-profile"
. "$GUIX_PROFILE/etc/profile"
Alternately, see `guix package --search-paths -p
"/home/plattfot/.guix-profile"'.
$ GUIX_PROFILE="/home/plattfot/.guix-profile"
$ . "$GUIX_PROFILE/etc/profile"
$ which g++
/home/plattfot/.guix-profile/bin/g++
```
Checking the hash for the one it installed:
```
$ guix package -I gcc
gcc-toolchain 14.2.0 out /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0
```
And it is an exact match with yours:
> ```
> $ guix package -I gcc
> gcc-toolchain 14.2.0 out
> /gnu/store/x2kv3zw2k7ql211m5kvb6yw401gab0x9-gcc-toolchain-14.2.0
> ```
So we should be using the exact same compiler and with mine, your tiny
test works:
```
$ g++ /tmp/main.cpp -o /tmp/a.out && /tmp/a.out
201703
```
So something else must be affecting yours. No idea about what that is
though. Did you install guix as a package manager on top of an foreign
distro or is this a Guix System machine?
Also has this ever worked for you? If so you might trying doing a kind
of git bisect on your packages using `guix package --switch-generation`.
First find a working generation with `guix package --list-generations`,
pick the generation that is in the middle of the latest broken
generation and the older working one. Switch to that, do the test. If
it works then the problem is most likely between that generation and the
latest broken generation. If not, then the issue is between the current
generation and the older working one. Pick the middle generation
between the working and broken generation and repeat.
Just keep iterating until you find the generation that introduced the
issue. Then you can compare with the previous working generation to see
if there are any differences in packages.
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-13 19:12 ` Fredrik Salomonsson
@ 2024-11-13 21:33 ` Laurent Gatto
2024-11-14 18:51 ` Fredrik Salomonsson
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-13 21:33 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
Hi Fredrik,
> So something else must be affecting yours. No idea about what that is
> though. Did you install guix as a package manager on top of an foreign
> distro or is this a Guix System machine?
I should have specified that this is a Guix system machine.
> Also has this ever worked for you?
I am not sure, to be honest. Here, I tried to report a minimally
reproducible example of wider issues, such as documented here [1]. I
don't know if they are directly related though.
[1] https://lists.gnu.org/archive/html/help-guix/2024-08/msg00040.html
> If so you might trying doing a kind
> of git bisect on your packages using `guix package --switch-generation`.
>
> First find a working generation with `guix package --list-generations`,
> pick the generation that is in the middle of the latest broken
> generation and the older working one. Switch to that, do the test. If
> it works then the problem is most likely between that generation and the
> latest broken generation. If not, then the issue is between the current
> generation and the older working one. Pick the middle generation
> between the working and broken generation and repeat.
>
> Just keep iterating until you find the generation that introduced the
> issue. Then you can compare with the previous working generation to see
> if there are any differences in packages.
I will try this. If push comes to shove, I could re-install a new Guix
system, reinstall my packages from my manifest and re-configure my
system and home config. This is among the reasons that brought me to
Guix in the first place, so why not make use of it.
Thanks again for taking the time to help.
Laurent
> --
> s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-13 21:33 ` Laurent Gatto
@ 2024-11-14 18:51 ` Fredrik Salomonsson
2024-11-16 10:56 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Fredrik Salomonsson @ 2024-11-14 18:51 UTC (permalink / raw)
To: Laurent Gatto; +Cc: help-guix
Hi,
Laurent Gatto <laurent.gatto@gmail.com> writes:
> Hi Fredrik,
>
>> So something else must be affecting yours. No idea about what that is
>> though. Did you install guix as a package manager on top of an foreign
>> distro or is this a Guix System machine?
>
> I should have specified that this is a Guix system machine.
>
>> Also has this ever worked for you?
>
> I am not sure, to be honest. Here, I tried to report a minimally
> reproducible example of wider issues, such as documented here [1]. I
> don't know if they are directly related though.
>
> [1] https://lists.gnu.org/archive/html/help-guix/2024-08/msg00040.html
>
I don't think these two are directly related. That one should work if
you are using glibc-2.35. As the GLIBC_2.34 is just a symbol version
for things introduced in glibc-2.34 and should be in glibc-2.35. I
haven't fully understand how glibc is setup in guix, i.e. if it is easy
to run multiple glibc versions at the same time. So the issue might be
that your system is setup for glibc-2.33 but the packages have just
transitioned to 2.35. I had some similar issues with glibc and pam
which resolved itself after I did a reconfigure.
>> If so you might trying doing a kind
>> of git bisect on your packages using `guix package --switch-generation`.
>>
>> First find a working generation with `guix package --list-generations`,
>> pick the generation that is in the middle of the latest broken
>> generation and the older working one. Switch to that, do the test. If
>> it works then the problem is most likely between that generation and the
>> latest broken generation. If not, then the issue is between the current
>> generation and the older working one. Pick the middle generation
>> between the working and broken generation and repeat.
>>
>> Just keep iterating until you find the generation that introduced the
>> issue. Then you can compare with the previous working generation to see
>> if there are any differences in packages.
>
> I will try this. If push comes to shove, I could re-install a new Guix
> system, reinstall my packages from my manifest and re-configure my
> system and home config. This is among the reasons that brought me to
> Guix in the first place, so why not make use of it.
One great thing with guix is that you technically do not need to
re-install a new guix system from scratch. You could create an absolute
bare minimum system and reconfigure to that. Same with you packages.
That should give you close to what is possible to a clean re-install
without the hassel of do a clean re-install. And with that you can
easily switch back to your normal config with switch-generations when
you are done. Which is a similar technique to the generation bisect I
suggested earlier.
Which now that I think of it might be a better way to go for you as you
are not sure if you had a working generation. Same principle as with
the generations, but this time you apply it to all of your packages
installed. Easiest if you have a manifest/home config etc. Just
comment out all packages so you only have gcc-toolchain installed. See
if that works, which it most likely will given that it works in the guix
shell container. Then enable half of your packages, reconfigure and see
if things still work. If it does, the issue is not in the packages you
enable but in the other half. Enable that and repeat. If things are
now broken then you know the issue is in some of the packages you
enabled. So comment out a half of that and repeat.
> Thanks again for taking the time to help.
No worries, I hope you can figure out what the issue is.
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-14 18:51 ` Fredrik Salomonsson
@ 2024-11-16 10:56 ` Laurent Gatto
2024-11-16 13:19 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-16 10:56 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
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")
|
~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| )
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-16 10:56 ` Laurent Gatto
@ 2024-11-16 13:19 ` Laurent Gatto
2024-11-18 18:49 ` Fredrik Salomonsson
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Gatto @ 2024-11-16 13:19 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
On Sat, 16 Nov 2024 at 11:56, Laurent Gatto <laurent.gatto@gmail.com> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-16 13:19 ` Laurent Gatto
@ 2024-11-18 18:49 ` Fredrik Salomonsson
2024-11-21 8:50 ` Laurent Gatto
0 siblings, 1 reply; 12+ messages in thread
From: Fredrik Salomonsson @ 2024-11-18 18:49 UTC (permalink / raw)
To: Laurent Gatto; +Cc: help-guix
Hi,
Laurent Gatto <laurent.gatto@gmail.com> writes:
> On Sat, 16 Nov 2024 at 11:56, Laurent Gatto <laurent.gatto@gmail.com> wrote:
>>
>> Hi Fredrik,
>>
>> Excellent advice, and I was able to identify the culprit.
Awesome!
>> 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?
This sounds like a bug. Especially if it is order dependent if it works
or not. And I can confirm that I can reproduce it on my end as well.
>> 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?
It should work to have both in the same context. Probably some issue
with how they are package up — I haven't checked the packaging for them.
But I have built gcc from source with both g++ and gfortran without any
issues. That was gcc-9 and gcc-11 so maybe something broke in upstream
with gcc-14? Although I find that unlikely.
Anyway, best is to send in a bug report to guix now that you have a
small reproducible test that show case the issue.
--
s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: C++ error
2024-11-18 18:49 ` Fredrik Salomonsson
@ 2024-11-21 8:50 ` Laurent Gatto
0 siblings, 0 replies; 12+ messages in thread
From: Laurent Gatto @ 2024-11-21 8:50 UTC (permalink / raw)
To: Fredrik Salomonsson; +Cc: help-guix
Thank you for your help, Fredrik.
Bug filed here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74455
Laurent
On Mon, 18 Nov 2024 at 19:49, Fredrik Salomonsson <plattfot@posteo.net> wrote:
>
> Hi,
>
> Laurent Gatto <laurent.gatto@gmail.com> writes:
>
> > On Sat, 16 Nov 2024 at 11:56, Laurent Gatto <laurent.gatto@gmail.com> wrote:
> >>
> >> Hi Fredrik,
> >>
> >> Excellent advice, and I was able to identify the culprit.
>
> Awesome!
>
> >> 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?
>
> This sounds like a bug. Especially if it is order dependent if it works
> or not. And I can confirm that I can reproduce it on my end as well.
>
> >> 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?
>
> It should work to have both in the same context. Probably some issue
> with how they are package up — I haven't checked the packaging for them.
> But I have built gcc from source with both g++ and gfortran without any
> issues. That was gcc-9 and gcc-11 so maybe something broke in upstream
> with gcc-14? Although I find that unlikely.
>
> Anyway, best is to send in a bug report to guix now that you have a
> small reproducible test that show case the issue.
>
> --
> s/Fred[re]+i[ck]+/Fredrik/g
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-11-21 8:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 7:41 C++ error Laurent Gatto
2024-11-12 17:54 ` 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
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).