From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
To: <gdb@sourceware.org>
Cc: Tom Tromey <tom@tromey.com>
Subject: GDB13 fails to build on MacOS using supplied GNU Bison 2.3
Date: Sat, 19 Aug 2023 20:11:00 +0200 [thread overview]
Message-ID: <0badf084-d0b7-54bb-aec6-b79f29ad191d@foss.st.com> (raw)
Hello,
I'm trying to build GDB13 for arm-none-eabi on MacOS and have some mixed
results.
It looks like after b2bc564fe817f857b4915903f16026472acfbdcc got merged,
the Bison version included in least Mojave, Catalina and Ventura is
having trouble to generate code that can be compiled.
Snippet of the build error:
YACC m2-exp.c
CXX m2-exp.o
In file included from .../gdb/m2-exp.y:42:
In file included from .../gdb/language.h:26:
In file included from .../gdb/symtab.h:39:
.../gdb/split-name.h:34:3: error: expected identifier
DOT,
^
m2-exp.c:163:13: note: expanded from macro 'DOT'
#define DOT 302
^
In file included from .../gdb/m2-exp.y:42:
In file included from .../gdb/language.h:26:
.../gdb/symtab.h:307:23: error: expected unqualified-id
style = split_style::DOT;
^
m2-exp.c:163:13: note: expanded from macro 'DOT'
#define DOT 302
^
2 errors generated.
All three versions of MacOS includes GNU Bison 2.3 and it appears that
this issue was fixed in GNU Bison 2.4.
The change between GNU Bison 2.3 and 2.4 for the m2-exp.c file is that
the include statements are placed before the list of token kinds (define
statements, including the define for DOT that is used in an enum
definition in symtab.h).
Looking at the binutils tree, I see that sub-directory gprofng contains
bison.m4 and a check to confirm that at least version 3.0.4 is available.
I think the bison.m4 file should be moved up one level and used in both
gprofng and gdb, but I'm unable to re-generate the configure scripts.
Can someone with knowledge of how automake works fix this?
(CC'ing you Tom as you were the one introducing the split-name.h file
that highlights this flaw.)
Kind regards,
Torbjörn
next reply other threads:[~2023-08-19 18:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 18:11 Torbjorn SVENSSON [this message]
2023-08-28 5:12 ` Tom de Vries
2023-08-31 13:31 ` Tom Tromey
2023-08-31 14:01 ` Torbjorn SVENSSON
2023-08-31 18:44 ` Tom Tromey
2023-09-01 10:51 ` Martin Simmons
2023-09-01 13:02 ` Tom Tromey
2023-09-14 20:26 ` Torbjorn SVENSSON
2023-09-14 21:32 ` Tom Tromey
2023-09-15 12:04 ` Torbjorn SVENSSON
2023-09-17 1:21 ` Tom Tromey
2023-09-17 15:26 ` Torbjorn SVENSSON
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0badf084-d0b7-54bb-aec6-b79f29ad191d@foss.st.com \
--to=torbjorn.svensson@foss.st.com \
--cc=gdb@sourceware.org \
--cc=tom@tromey.com \
/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).