public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12
@ 2022-05-22 22:12 sam at gentoo dot org
2022-05-22 22:23 ` [Bug libcc1/105695] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sam at gentoo dot org @ 2022-05-22 22:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
Bug ID: 105695
Summary: GCC 10.3.1 (20220519) build failure with GCC 12
Product: gcc
Version: 10.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libcc1
Assignee: unassigned at gcc dot gnu.org
Reporter: sam at gentoo dot org
Target Milestone: ---
Created attachment 53016
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53016&action=edit
build.log.xz
```
/bin/bash ./libtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++
-std=gnu++98 -DHAVE_CONFIG_H -I.
-I/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../include
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../libgcc
-I ../gcc
-I/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/c-family
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../libcpp/include
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/c
-W -Wall -fvisibility=hidden -pipe -march=native -fdiagnostics-color=always
-D_GLIBCXX_ASSERTIONS -ggdb3 -O2 -MT libcc1plugin.lo -MD -MP -MF
.deps/libcc1plugin.Tpo -c -o libcc1plugin.lo
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/libcc1plugin.cc
libtool: compile: x86_64-pc-linux-gnu-g++ -std=gnu++98 -DHAVE_CONFIG_H -I.
-I/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../include
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../libgcc
-I ../gcc
-I/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/c-family
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../libcpp/include
-I
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/c
-W -Wall -fvisibility=hidden -pipe -march=native -fdiagnostics-color=always
-D_GLIBCXX_ASSERTIONS -ggdb3 -O2 -MT libcc1plugin.lo -MD -MP -MF
.deps/libcc1plugin.Tpo -c
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/libcc1plugin.cc
-fPIC -DPIC -o .libs/libcc1plugin.o
In file included from
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/hash-table.h:248,
from
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/coretypes.h:461,
from
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/gcc-plugin.h:29,
from
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/libcc1plugin.cc:34:
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/vec.h:
In member function ‘void vec<T>::reverse()’:
/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/gcc-10-20220519/libcc1/../gcc/vec.h:2086:10:
error: ‘swap’ is not a member of ‘std’
2086 | std::swap (ptr[i], ptr[l - i - 1]);
| ^~~~
make[2]: *** [Makefile:600: libcc1plugin.lo] Error 1
make[2]: Leaving directory
'/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/build/libcc1'
make[1]: *** [Makefile:14552: install-libcc1] Error 2
make[1]: Leaving directory
'/var/tmp/portage.notmp/portage/sys-devel/gcc-10.3.1_p20220519/work/build'
make: *** [Makefile:2438: install] Error 2
* ERROR: sys-devel/gcc-10.3.1_p20220519::gentoo failed (install phase):
```
I've attached the full log (xz compressed b/c of size).
```
$ gcc --version
gcc (Gentoo Hardened 12.1.1_p20220521 p5) 12.1.1 20220521
Copyright (C) 2022 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.
```
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libcc1/105695] GCC 10.3.1 (20220519) build failure with GCC 12
2022-05-22 22:12 [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12 sam at gentoo dot org
@ 2022-05-22 22:23 ` pinskia at gcc dot gnu.org
2022-05-23 8:01 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-22 22:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The problem is -std=gnu++98 I think.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libcc1/105695] GCC 10.3.1 (20220519) build failure with GCC 12
2022-05-22 22:12 [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12 sam at gentoo dot org
2022-05-22 22:23 ` [Bug libcc1/105695] " pinskia at gcc dot gnu.org
@ 2022-05-23 8:01 ` rguenth at gcc dot gnu.org
2022-05-23 8:34 ` redi at gcc dot gnu.org
2024-06-15 6:09 ` sjames at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-23 8:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-05-23
Keywords| |build
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Indeed.
#include <utility>
void foo (void *a, void *b)
{
std::swap (a, b);
}
> ~/install/gcc-12/usr/local/bin/g++ t.C -S -std=gnu++03
t.C: In function 'void foo(void*, void*)':
t.C:5:8: error: 'swap' is not a member of 'std'
5 | std::swap (a, b);
| ^~~~
works with GCC 11. <algorithm> is required pre C++11 for std::swap. We
have
#ifdef __cplusplus
#if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
# include <algorithm>
#endif
but config.h was likely generated with the default C++ standard and not with
explicit -std=gnu++98.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libcc1/105695] GCC 10.3.1 (20220519) build failure with GCC 12
2022-05-22 22:12 [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12 sam at gentoo dot org
2022-05-22 22:23 ` [Bug libcc1/105695] " pinskia at gcc dot gnu.org
2022-05-23 8:01 ` rguenth at gcc dot gnu.org
@ 2022-05-23 8:34 ` redi at gcc dot gnu.org
2024-06-15 6:09 ` sjames at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2022-05-23 8:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> <algorithm> is required pre C++11 for std::swap.
Right, it got moved to <utility> for C++11. GCC 10 uses C++98 so needs
<algorithm> for std::swap.
As noted at https://gcc.gnu.org/gcc-12/porting_to.html both <utility> and
<algorithm> are less widely used inside libstdc++, so you are less likely to
get those headers transitively by including other library headers.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libcc1/105695] GCC 10.3.1 (20220519) build failure with GCC 12
2022-05-22 22:12 [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12 sam at gentoo dot org
` (2 preceding siblings ...)
2022-05-23 8:34 ` redi at gcc dot gnu.org
@ 2024-06-15 6:09 ` sjames at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-15 6:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105695
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
GCC 10 is EOL.
Downstream, we did:
```
if ! tc_version_is_at_least 11 && [[ $(gcc-major-version) -ge 12 ]] ;
then
# https://gcc.gnu.org/PR105695
# bug #849359
export ac_cv_std_swap_in_utility=no
fi
```
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-15 6:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-22 22:12 [Bug libcc1/105695] New: GCC 10.3.1 (20220519) build failure with GCC 12 sam at gentoo dot org
2022-05-22 22:23 ` [Bug libcc1/105695] " pinskia at gcc dot gnu.org
2022-05-23 8:01 ` rguenth at gcc dot gnu.org
2022-05-23 8:34 ` redi at gcc dot gnu.org
2024-06-15 6:09 ` sjames at gcc dot gnu.org
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).