[Bug demangler/101779] Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Andrew Pinski --- Dup of bug 99935. *** This bug has been marked as a duplicate of bug 99935 ***
[Bug demangler/101779] Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 Nick Clifton changed: What|Removed |Added CC||nickc at gcc dot gnu.org --- Comment #4 from Nick Clifton --- Note - this bug has been reported and fixed in the binutils copy of the libiberty sources: https://sourceware.org/bugzilla/show_bug.cgi?id=28207
[Bug demangler/101779] Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 --- Comment #3 from Eli Zaretskii --- (In reply to Jonathan Wakely from comment #2) > Binutils 2.37 has the fix for GCC PR 99935 included, so I suggest adding a > comment to that bug instead. I see that you already reported the issue there (thanks!), so I guess I don't need to do anything else?
[Bug demangler/101779] Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 --- Comment #2 from Jonathan Wakely --- Binutils 2.37 has the fix for GCC PR 99935 included, so I suggest adding a comment to that bug instead.
[Bug demangler/101779] Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 Richard Biener changed: What|Removed |Added Target||mingw32 Status|UNCONFIRMED |WAITING Last reconfirmed||2021-08-05 Ever confirmed|0 |1 Keywords||build --- Comment #1 from Richard Biener --- It looks like rust-demanlge.c is newer in the binutils repository than in the GCC repository. I cannot find the referenced code in the GCC one. Can you report the issue to the bugzilla at sourceware.org please?
Re: Compilation of rust-demangle.c fails on MinGW
> From: Andrew Pinski > Date: Wed, 4 Aug 2021 11:57:47 -0700 > Cc: Jonathan Wakely , GCC Bugs , > Andreas Schwab > > > > https://gcc.gnu.org/bugs/ instead. > > > > Which points to GCC Bugzilla, which doesn't have a "libiberty" > > component. So I suggest to add such a component on the Bugzilla. > > It has a demangler component though. Thanks, submitted the bug report for the demangler component.
[Bug demangler/101779] New: Compilation of rust-demangle.c fails on MinGW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101779 Bug ID: 101779 Summary: Compilation of rust-demangle.c fails on MinGW Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: demangler Assignee: unassigned at gcc dot gnu.org Reporter: eliz at gnu dot org Target Milestone: --- The version of rust-demangle.c included with Binutils 2.37 doesn't compile with MinGW: mingw32-gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -I. -I../../binutils-2.37/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../binutils-2.37/libiberty/rust-demangle.c -o rust-demangle.o ../../binutils-2.37/libiberty/rust-demangle.c:84:3: error: unknown type name 'uint' 84 | uint recursion; | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'demangle_path': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~ ../../binutils-2.37/libiberty/rust-demangle.c:87:37: note: each undeclared identifier is reported only once for each function it appears in 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'rust_demangle_callback': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:1347:55: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 1347 | rdm.recursion = (options & DMGL_NO_RECURSE_LIMIT) ? RUST_NO_RECURSION_LIMIT : 0; | ^~~ This is because the data type 'uint' is not defined in the MinGW headers. I used uint32_t instead, and it compiled OK.
Re: Compilation of rust-demangle.c fails on MinGW
On Wed, Aug 4, 2021 at 8:46 AM Eli Zaretskii via Gcc-bugs wrote: > > > Date: Wed, 4 Aug 2021 15:41:30 +0100 > > From: Jonathan Wakely > > Cc: gcc-bugs@gcc.gnu.org, e...@gnu.org > > > > > The libiberty README says to report bugs to gcc-bugs@gcc.gnu.org. > > > > Well that needs to be fixed. It should point to > > https://gcc.gnu.org/bugs/ instead. > > Which points to GCC Bugzilla, which doesn't have a "libiberty" > component. So I suggest to add such a component on the Bugzilla. It has a demangler component though. Thanks, Andrew Pinski
Re: Compilation of rust-demangle.c fails on MinGW
> Date: Wed, 4 Aug 2021 15:41:30 +0100 > From: Jonathan Wakely > Cc: gcc-bugs@gcc.gnu.org, e...@gnu.org > > > The libiberty README says to report bugs to gcc-bugs@gcc.gnu.org. > > Well that needs to be fixed. It should point to > https://gcc.gnu.org/bugs/ instead. Which points to GCC Bugzilla, which doesn't have a "libiberty" component. So I suggest to add such a component on the Bugzilla.
Re: Compilation of rust-demangle.c fails on MinGW
> The libiberty README says to report bugs to gcc-bugs@gcc.gnu.org. Well that needs to be fixed. It should point to https://gcc.gnu.org/bugs/ instead.
Re: Compilation of rust-demangle.c fails on MinGW
> From: Andreas Schwab > Cc: Richard Sandiford , Eli Zaretskii > > Date: Wed, 04 Aug 2021 15:35:04 +0200 > > On Aug 04 2021, Eli Zaretskii via Gcc-bugs wrote: > > > I'd love to, but please tell me where. I couldn't find any > > information about reporting libiberty bugs, sorry if I missed > > something obvious. > > The libiberty README says to report bugs to gcc-bugs@gcc.gnu.org. Yes, and that's what I did eventually. But I was then told by Richard Sandiford that that address is "mostly a bugzilla feed and so isn't widely read".
Re: Compilation of rust-demangle.c fails on MinGW
> Date: Wed, 4 Aug 2021 14:03:21 +0100 > From: Jonathan Wakely > Cc: gcc-bugs@gcc.gnu.org > > In GCC's bugzilla. That's what I tried originally, but there's no libiberty there among the various "components". So I decided the GCC Bugzilla was not the right place. If it is the right place, please tell which component to select. Maybe "other"? (But it's confusing that libiberty is not in the list.) Thanks.
Re: Compilation of rust-demangle.c fails on MinGW
On Aug 04 2021, Eli Zaretskii via Gcc-bugs wrote: > I'd love to, but please tell me where. I couldn't find any > information about reporting libiberty bugs, sorry if I missed > something obvious. The libiberty README says to report bugs to gcc-bugs@gcc.gnu.org. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Re: Compilation of rust-demangle.c fails on MinGW
In GCC's bugzilla. You could also report it to the sourceware.org bugzilla for binutils, but I think GCC is the upstream for libiberty.
Re: Compilation of rust-demangle.c fails on MinGW
> From: Richard Sandiford > Cc: Eli Zaretskii > Date: Wed, 04 Aug 2021 13:04:24 +0100 > > Eli Zaretskii via Gcc-bugs writes: > > The version of rust-demangle.c included with Binutils 2.37 doesn't > > compile with MinGW: > > > > mingw32-gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -I. > > -I../../binutils-2.37/libiberty/../include -W -Wall -Wwrite-strings > > -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE > > ../../binutils-2.37/libiberty/rust-demangle.c -o rust-demangle.o > > ../../binutils-2.37/libiberty/rust-demangle.c:84:3: error: unknown > > type name 'uint' > > 84 | uint recursion; > >| ^~~~ > > ../../binutils-2.37/libiberty/rust-demangle.c: In function > > 'demangle_path': > > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' > > undeclared (first use in this function); did you mean 'int'? > > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > >| ^~~~ > > ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in > > expansion of macro 'RUST_NO_RECURSION_LIMIT' > >686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) > >| ^~~ > > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: note: each > > undeclared identifier is reported only once for each function it appears in > > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > >| ^~~~ > > ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in > > expansion of macro 'RUST_NO_RECURSION_LIMIT' > >686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) > >| ^~~ > > ../../binutils-2.37/libiberty/rust-demangle.c: In function > > 'rust_demangle_callback': > > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' > > undeclared (first use in this function); did you mean 'int'? > > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > >| ^~~~ > > ../../binutils-2.37/libiberty/rust-demangle.c:1347:55: note: in > > expansion of macro 'RUST_NO_RECURSION_LIMIT' > > 1347 | rdm.recursion = (options & DMGL_NO_RECURSE_LIMIT) ? > > RUST_NO_RECURSION_LIMIT : 0; > >| > > ^~~ > > > > This is because the data type 'uint' is not defined in the MinGW > > headers. I used uint32_t instead, and it compiled OK. > > This list is mostly just a bugzilla feed and so isn't widely read. > Could you file a PR? I'd love to, but please tell me where. I couldn't find any information about reporting libiberty bugs, sorry if I missed something obvious.
Re: Compilation of rust-demangle.c fails on MinGW
Hi, Eli Zaretskii via Gcc-bugs writes: > The version of rust-demangle.c included with Binutils 2.37 doesn't > compile with MinGW: > > mingw32-gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -I. > -I../../binutils-2.37/libiberty/../include -W -Wall -Wwrite-strings > -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE > ../../binutils-2.37/libiberty/rust-demangle.c -o rust-demangle.o > ../../binutils-2.37/libiberty/rust-demangle.c:84:3: error: unknown type > name 'uint' > 84 | uint recursion; > | ^~~~ > ../../binutils-2.37/libiberty/rust-demangle.c: In function > 'demangle_path': > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' > undeclared (first use in this function); did you mean 'int'? > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > | ^~~~ > ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion > of macro 'RUST_NO_RECURSION_LIMIT' >686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) > | ^~~ > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: note: each > undeclared identifier is reported only once for each function it appears in > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > | ^~~~ > ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion > of macro 'RUST_NO_RECURSION_LIMIT' >686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) > | ^~~ > ../../binutils-2.37/libiberty/rust-demangle.c: In function > 'rust_demangle_callback': > ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' > undeclared (first use in this function); did you mean 'int'? > 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) > | ^~~~ > ../../binutils-2.37/libiberty/rust-demangle.c:1347:55: note: in > expansion of macro 'RUST_NO_RECURSION_LIMIT' > 1347 | rdm.recursion = (options & DMGL_NO_RECURSE_LIMIT) ? > RUST_NO_RECURSION_LIMIT : 0; > | > ^~~ > > This is because the data type 'uint' is not defined in the MinGW > headers. I used uint32_t instead, and it compiled OK. This list is mostly just a bugzilla feed and so isn't widely read. Could you file a PR? Thanks, Richard
Compilation of rust-demangle.c fails on MinGW
The version of rust-demangle.c included with Binutils 2.37 doesn't compile with MinGW: mingw32-gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -I. -I../../binutils-2.37/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../binutils-2.37/libiberty/rust-demangle.c -o rust-demangle.o ../../binutils-2.37/libiberty/rust-demangle.c:84:3: error: unknown type name 'uint' 84 | uint recursion; | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'demangle_path': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~ ../../binutils-2.37/libiberty/rust-demangle.c:87:37: note: each undeclared identifier is reported only once for each function it appears in 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:686:25: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 686 | if (rdm->recursion != RUST_NO_RECURSION_LIMIT) | ^~~ ../../binutils-2.37/libiberty/rust-demangle.c: In function 'rust_demangle_callback': ../../binutils-2.37/libiberty/rust-demangle.c:87:37: error: 'uint' undeclared (first use in this function); did you mean 'int'? 87 | #define RUST_NO_RECURSION_LIMIT ((uint) -1) | ^~~~ ../../binutils-2.37/libiberty/rust-demangle.c:1347:55: note: in expansion of macro 'RUST_NO_RECURSION_LIMIT' 1347 | rdm.recursion = (options & DMGL_NO_RECURSE_LIMIT) ? RUST_NO_RECURSION_LIMIT : 0; | ^~~ This is because the data type 'uint' is not defined in the MinGW headers. I used uint32_t instead, and it compiled OK.