public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 (
@ 2021-09-03 7:18 doko at debian dot org
2021-09-03 7:18 ` [Bug sim/28302] " doko at debian dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: doko at debian dot org @ 2021-09-03 7:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Bug ID: 28302
Summary: [11 Regression] gdb fails to build with glibc 2.34 (
Product: gdb
Version: 11.1
Status: NEW
Severity: normal
Priority: P2
Component: sim
Assignee: unassigned at sourceware dot org
Reporter: doko at debian dot org
CC: vapier at gentoo dot org
Target Milestone: ---
gdb fails to build on the gdb-11 branch with glibc-2.34, in the sim directory,
at least on arm-linux-gnueabihf and aarch64-linux-gnu:
In file included from /usr/include/signal.h:328,
from ../../gnulib/import/signal.h:52,
from targ-map.c:7:
targ-map.c:412:17: error: initializer element is not constant
412 | { "SIGSTKSZ", SIGSTKSZ, TARGET_SIGSTKSZ },
| ^~~~~~~~
targ-map.c:412:17: note: (near initialization for
‘cb_init_signal_map[18].host_val’)
make[5]: *** [Makefile:522: targ-map.o] Error 1
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim/aarch64'
make[4]: *** [Makefile:1271: all-recursive] Error 1
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
make[3]: *** [Makefile:898: all] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
make[2]: *** [Makefile:8030: all-sim] Error 2
configured with
--build=aarch64-linux-gnu --host=aarch64-linux-gnu --prefix=/usr
--libexecdir="\${prefix}/lib/gdb" --disable-werror --disable-maintainer-mode
--disable-dependency-tracking --disable-silent-rules --disable-gdbtk
--disable-shared --with-system-readline --with-expat --with-system-zlib
--without-guile --with-debuginfod --with-babeltrace --enable-tui --with-lzma
--with-python=python3 --with-xxhash --with-mpfr
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
@ 2021-09-03 7:18 ` doko at debian dot org
2021-09-03 13:05 ` luis.machado at linaro dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: doko at debian dot org @ 2021-09-03 7:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Matthias Klose <doko at debian dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |arm-linux-gnueabihf,
| |aarch64-linux-gnu
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
2021-09-03 7:18 ` [Bug sim/28302] " doko at debian dot org
@ 2021-09-03 13:05 ` luis.machado at linaro dot org
2021-09-03 13:06 ` luis.machado at linaro dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2021-09-03 13:05 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |luis.machado at linaro dot org
--- Comment #1 from Luis Machado <luis.machado at linaro dot org> ---
This might have something to do with glibc's commit
6c57d320484988e87e446e2e60ce42816bf51d53, or it may have to use a new reference
for the constant.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
2021-09-03 7:18 ` [Bug sim/28302] " doko at debian dot org
2021-09-03 13:05 ` luis.machado at linaro dot org
@ 2021-09-03 13:06 ` luis.machado at linaro dot org
2021-09-03 13:13 ` luis.machado at linaro dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2021-09-03 13:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Luis Machado <luis.machado at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (2 preceding siblings ...)
2021-09-03 13:06 ` luis.machado at linaro dot org
@ 2021-09-03 13:13 ` luis.machado at linaro dot org
2021-09-03 13:18 ` fweimer at redhat dot com
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: luis.machado at linaro dot org @ 2021-09-03 13:13 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
--- Comment #2 from Luis Machado <luis.machado at linaro dot org> ---
glibc bug reopened here:
https://sourceware.org/bugzilla/show_bug.cgi?id=20305
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (3 preceding siblings ...)
2021-09-03 13:13 ` luis.machado at linaro dot org
@ 2021-09-03 13:18 ` fweimer at redhat dot com
2021-09-09 21:59 ` [Bug sim/28302] New: " Stafford Horne
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: fweimer at redhat dot com @ 2021-09-03 13:18 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (4 preceding siblings ...)
2021-09-03 13:18 ` fweimer at redhat dot com
@ 2021-09-09 21:59 ` Stafford Horne
2021-09-09 22:00 ` [Bug sim/28302] " shorne at gmail dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: Stafford Horne @ 2021-09-09 21:59 UTC (permalink / raw)
To: doko at debian dot org; +Cc: gdb-prs
I ran into this failure today, there is a discussion about the reason
behind glibc making this change.
https://public-inbox.org/libc-alpha/87y2ew8i1w.fsf@igel.home/T/
It's kind of hacky but this patch worked as a fix for me.
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index 9f30e66e378..f690193f471 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -83,6 +83,14 @@ gen_targ_map_c (void)
printf ("#include \"targ-vals.h\"\n");
printf ("\n");
+ /* Make SIGSTKSZ a constant again. */
+ printf ("#ifdef __USE_SC_SIGSTKSZ\n");
+ printf ("# undef SIGSTKSZ\n");
+ printf ("# define SIGSTKSZ 8192\n");
+ printf ("#endif\n");
+
+ printf ("\n");
+
printf ("/* syscall mapping table */\n");
printf ("CB_TARGET_DEFS_MAP cb_init_syscall_map[] = {\n");
for (t = &sys_tdefs[0]; t->symbol; ++t)
On Fri, Sep 3, 2021 at 4:18 PM doko at debian dot org via Gdb-prs
<gdb-prs@sourceware.org> wrote:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28302
>
> Bug ID: 28302
> Summary: [11 Regression] gdb fails to build with glibc 2.34 (
> Product: gdb
> Version: 11.1
> Status: NEW
> Severity: normal
> Priority: P2
> Component: sim
> Assignee: unassigned at sourceware dot org
> Reporter: doko at debian dot org
> CC: vapier at gentoo dot org
> Target Milestone: ---
>
> gdb fails to build on the gdb-11 branch with glibc-2.34, in the sim directory,
> at least on arm-linux-gnueabihf and aarch64-linux-gnu:
>
> In file included from /usr/include/signal.h:328,
> from ../../gnulib/import/signal.h:52,
> from targ-map.c:7:
> targ-map.c:412:17: error: initializer element is not constant
> 412 | { "SIGSTKSZ", SIGSTKSZ, TARGET_SIGSTKSZ },
> | ^~~~~~~~
> targ-map.c:412:17: note: (near initialization for
> ‘cb_init_signal_map[18].host_val’)
> make[5]: *** [Makefile:522: targ-map.o] Error 1
> make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim/aarch64'
> make[4]: *** [Makefile:1271: all-recursive] Error 1
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
> make[3]: *** [Makefile:898: all] Error 2
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
> make[2]: *** [Makefile:8030: all-sim] Error 2
>
> configured with
>
> --build=aarch64-linux-gnu --host=aarch64-linux-gnu --prefix=/usr
> --libexecdir="\${prefix}/lib/gdb" --disable-werror --disable-maintainer-mode
> --disable-dependency-tracking --disable-silent-rules --disable-gdbtk
> --disable-shared --with-system-readline --with-expat --with-system-zlib
> --without-guile --with-debuginfod --with-babeltrace --enable-tui --with-lzma
> --with-python=python3 --with-xxhash --with-mpfr
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (5 preceding siblings ...)
2021-09-09 21:59 ` [Bug sim/28302] New: " Stafford Horne
@ 2021-09-09 22:00 ` shorne at gmail dot com
2021-09-14 15:15 ` ats-sourceware at offog dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: shorne at gmail dot com @ 2021-09-09 22:00 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
--- Comment #3 from Stafford Horne <shorne at gmail dot com> ---
I ran into this failure today, there is a discussion about the reason
behind glibc making this change.
https://public-inbox.org/libc-alpha/87y2ew8i1w.fsf@igel.home/T/
It's kind of hacky but this patch worked as a fix for me.
diff --git a/sim/common/gentmap.c b/sim/common/gentmap.c
index 9f30e66e378..f690193f471 100644
--- a/sim/common/gentmap.c
+++ b/sim/common/gentmap.c
@@ -83,6 +83,14 @@ gen_targ_map_c (void)
printf ("#include \"targ-vals.h\"\n");
printf ("\n");
+ /* Make SIGSTKSZ a constant again. */
+ printf ("#ifdef __USE_SC_SIGSTKSZ\n");
+ printf ("# undef SIGSTKSZ\n");
+ printf ("# define SIGSTKSZ 8192\n");
+ printf ("#endif\n");
+
+ printf ("\n");
+
printf ("/* syscall mapping table */\n");
printf ("CB_TARGET_DEFS_MAP cb_init_syscall_map[] = {\n");
for (t = &sys_tdefs[0]; t->symbol; ++t)
On Fri, Sep 3, 2021 at 4:18 PM doko at debian dot org via Gdb-prs
<gdb-prs@sourceware.org> wrote:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=28302
>
> Bug ID: 28302
> Summary: [11 Regression] gdb fails to build with glibc 2.34 (
> Product: gdb
> Version: 11.1
> Status: NEW
> Severity: normal
> Priority: P2
> Component: sim
> Assignee: unassigned at sourceware dot org
> Reporter: doko at debian dot org
> CC: vapier at gentoo dot org
> Target Milestone: ---
>
> gdb fails to build on the gdb-11 branch with glibc-2.34, in the sim directory,
> at least on arm-linux-gnueabihf and aarch64-linux-gnu:
>
> In file included from /usr/include/signal.h:328,
> from ../../gnulib/import/signal.h:52,
> from targ-map.c:7:
> targ-map.c:412:17: error: initializer element is not constant
> 412 | { "SIGSTKSZ", SIGSTKSZ, TARGET_SIGSTKSZ },
> | ^~~~~~~~
> targ-map.c:412:17: note: (near initialization for
> ‘cb_init_signal_map[18].host_val’)
> make[5]: *** [Makefile:522: targ-map.o] Error 1
> make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim/aarch64'
> make[4]: *** [Makefile:1271: all-recursive] Error 1
> make[4]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
> make[3]: *** [Makefile:898: all] Error 2
> make[3]: Leaving directory '/<<PKGBUILDDIR>>/build/default/sim'
> make[2]: *** [Makefile:8030: all-sim] Error 2
>
> configured with
>
> --build=aarch64-linux-gnu --host=aarch64-linux-gnu --prefix=/usr
> --libexecdir="\${prefix}/lib/gdb" --disable-werror --disable-maintainer-mode
> --disable-dependency-tracking --disable-silent-rules --disable-gdbtk
> --disable-shared --with-system-readline --with-expat --with-system-zlib
> --without-guile --with-debuginfod --with-babeltrace --enable-tui --with-lzma
> --with-python=python3 --with-xxhash --with-mpfr
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (6 preceding siblings ...)
2021-09-09 22:00 ` [Bug sim/28302] " shorne at gmail dot com
@ 2021-09-14 15:15 ` ats-sourceware at offog dot org
2021-10-03 16:09 ` vapier at gentoo dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ats-sourceware at offog dot org @ 2021-09-14 15:15 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Adam Sampson <ats-sourceware at offog dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ats-sourceware at offog dot org
--- Comment #4 from Adam Sampson <ats-sourceware at offog dot org> ---
While the glibc change caused the build failure here (I'm seeing it on rv64), I
think the underlying problem is simpler. gentmap is trying to build a list of
signal number definitions, so SIGSTKSZ shouldn't be in it in the first place -
it just happens to match the regexp that sim/common/gennltvals.py is using.
I've worked around it with this patch:
--- gdb-11.1/sim/common/gennltvals.py 2021-09-13 02:32:09.000000000 +0100
+++ gdb-11.1/sim/common/gennltvals.py 2021-09-14 16:05:03.771667809 +0100
@@ -99,7 +99,7 @@
data = fp.read()
for line in data.splitlines():
m = define_pattern.match(line)
- if m:
+ if m and m.group(1) != 'SIGSTKSZ':
syms.add(m.group(1))
for sym in sorted(syms):
srcfile += f'#ifdef {sym}\nDEFVAL {{ "{sym}", {sym} }},\n#endif\n'
--- gdb-11.1/sim/common/nltvals.def 2021-07-03 18:41:11.000000000 +0100
+++ gdb-11.1/sim/common/nltvals.def 2021-09-14 16:05:02.789672121 +0100
@@ -116,7 +116,6 @@
{ "SIGPROF", 27 },
{ "SIGQUIT", 3 },
{ "SIGSEGV", 11 },
- { "SIGSTKSZ", 8192 },
{ "SIGSTOP", 17 },
{ "SIGSYS", 12 },
{ "SIGTERM", 15 },
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (7 preceding siblings ...)
2021-09-14 15:15 ` ats-sourceware at offog dot org
@ 2021-10-03 16:09 ` vapier at gentoo dot org
2022-01-12 5:04 ` brobecker at gnat dot com
2022-01-16 10:08 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: vapier at gentoo dot org @ 2021-10-03 16:09 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Mike Frysinger <vapier at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |vapier at gentoo dot org
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Mike Frysinger <vapier at gentoo dot org> ---
(In reply to Adam Sampson from comment #4)
> While the glibc change caused the build failure here (I'm seeing it on
> rv64), I think the underlying problem is simpler. gentmap is trying to build
> a list of signal number definitions, so SIGSTKSZ shouldn't be in it in the
> first place - it just happens to match the regexp that
> sim/common/gennltvals.py is using.
this is a great idea, thanks. i've implemented that now.
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=39d53d04357606a15efd400147fa7369d71baf2c
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (8 preceding siblings ...)
2021-10-03 16:09 ` vapier at gentoo dot org
@ 2022-01-12 5:04 ` brobecker at gnat dot com
2022-01-16 10:08 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: brobecker at gnat dot com @ 2022-01-12 5:04 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Target Milestone|--- |11.2
CC| |brobecker at gnat dot com
Status|RESOLVED |REOPENED
--- Comment #6 from Joel Brobecker <brobecker at gnat dot com> ---
re-opened to backport the fix in 11.2 as requested by user. Can be closed as
soon as the fix is backported.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug sim/28302] [11 Regression] gdb fails to build with glibc 2.34 (
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
` (9 preceding siblings ...)
2022-01-12 5:04 ` brobecker at gnat dot com
@ 2022-01-16 10:08 ` brobecker at gnat dot com
10 siblings, 0 replies; 12+ messages in thread
From: brobecker at gnat dot com @ 2022-01-16 10:08 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28302
Joel Brobecker <brobecker at gnat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Joel Brobecker <brobecker at gnat dot com> ---
backported on Jan 12 by Mike, as:
commit 17d6f2152b583cdc7defafa7813b727a304bac5b
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sun Oct 3 12:02:53 2021 -0400
Subject: sim: filter out SIGSTKSZ [PR sim/28302]
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-01-16 10:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-03 7:18 [Bug sim/28302] New: [11 Regression] gdb fails to build with glibc 2.34 ( doko at debian dot org
2021-09-03 7:18 ` [Bug sim/28302] " doko at debian dot org
2021-09-03 13:05 ` luis.machado at linaro dot org
2021-09-03 13:06 ` luis.machado at linaro dot org
2021-09-03 13:13 ` luis.machado at linaro dot org
2021-09-03 13:18 ` fweimer at redhat dot com
2021-09-09 21:59 ` [Bug sim/28302] New: " Stafford Horne
2021-09-09 22:00 ` [Bug sim/28302] " shorne at gmail dot com
2021-09-14 15:15 ` ats-sourceware at offog dot org
2021-10-03 16:09 ` vapier at gentoo dot org
2022-01-12 5:04 ` brobecker at gnat dot com
2022-01-16 10:08 ` brobecker at gnat dot com
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).