Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 811300 - sys-devel/gcc-10.3.0-r2[d] fails to build with sys-libs/glibc-2.33-r7 complaining on multiple function declarations
Summary: sys-devel/gcc-10.3.0-r2[d] fails to build with sys-libs/glibc-2.33-r7 complai...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-2.33
  Show dependency tree
 
Reported: 2021-09-01 03:08 UTC by Vadim A. Misbakh-Soloviov (mva)
Modified: 2022-08-22 19:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emere --info sys-devel/gcc:10 (file_811300.txt,28.56 KB, text/plain)
2021-09-01 03:10 UTC, Vadim A. Misbakh-Soloviov (mva)
Details
sys-devel:gcc-10.3.0-r2:20210831-071448.log.bz2 (log.bz2,45.34 KB, application/x-bzip)
2021-09-01 03:13 UTC, Vadim A. Misbakh-Soloviov (mva)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-09-01 03:08:53 UTC
I'm trying to rebuild gcc-10 (after huge world upgrade after half-a-year pause, and after migrating to 17.1 profile), and it fails to build, complaining on:


```config.status: executing default commands
In file included from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/d-system.h:23,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/root/dsystem.h:24,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/idgen.c:17:
/var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/system.h:544:20: error: conflicting declaration of C function ‘const char* strsignal(int)’
  544 | extern const char *strsignal (int);
      |                    ^~~~~~~~~
In file included from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/libstdc++-v3/include/c_global/cstring:42,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/system.h:235,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/d-system.h:23,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/root/dsystem.h:24,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/idgen.c:17:
/usr/include/string.h:462:14: note: previous declaration ‘char* strsignal(int)’
  462 | extern char *strsignal (int __sig) __THROW;
      |              ^~~~~~~~~
In file included from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/system.h:695,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/d-system.h:23,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/root/dsystem.h:24,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/idgen.c:17:
/var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/../include/libiberty.h:112:14: error: ambiguating new declaration of ‘char* basename(const char*)’
  112 | extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
      |              ^~~~~~~~
In file included from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/libstdc++-v3/include/c_global/cstring:42,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/system.h:235,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/d-system.h:23,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/root/dsystem.h:24,
                 from /var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/dmd/idgen.c:17:
/usr/include/string.h:508:26: note: old declaration ‘const char* basename(const char*)’
  508 | extern "C++" const char *basename (const char *__filename)
      |                          ^~~~~~~~
make[3]: *** [/var/tmp/portage/sys-devel/gcc-10.3.0-r2/work/gcc-10.3.0/gcc/d/Make-lang.in:338: d/idgen.dmdgen.o] Error 1
make[2]: *** [Makefile:4785: all-stage2-gcc] Error 2
make[1]: *** [Makefile:24739: stage2-bubble] Error 2
make: *** [Makefile:24954: bootstrap-lean] Error 2
```


Since /usr/include/string.h belongs to glibc, I bet it is incompatibility with new (already stabilized, btw) glibc-2.33 (I doubt that it can be related to revbumps)
Comment 1 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-09-01 03:10:36 UTC
Created attachment 736993 [details]
emere --info sys-devel/gcc:10
Comment 2 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-09-01 03:13:51 UTC
Created attachment 736996 [details]
sys-devel:gcc-10.3.0-r2:20210831-071448.log.bz2
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-01 03:34:04 UTC
(In reply to Vadim A. Misbakh-Soloviov (mva) from comment #0)
> [snip]
> Since /usr/include/string.h belongs to glibc, I bet it is incompatibility
> with new (already stabilized, btw) glibc-2.33 (I doubt that it can be
> related to revbumps)

As discussed on IRC, I don't think this is likely to be the case (or at least not for everybody), given it's been tested quite a bit.

Interestingly some of the folks who have hit this before have contaminated environments, so I've suggested trying a build with env -i and going from there (https://stackoverflow.com/questions/12255058/g-4-7-1-compilation-error-conflicting-types-for-strsignal).
Comment 4 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-09-01 06:48:13 UTC
UPD:
@sam told me on IRC to try with `env -i`. It didn't help and build also failed.
I'm not sure if I should post `emerge --info` with `env -i`.
Comment 5 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2021-09-01 06:52:05 UTC
Well, I just looked carefully, and noticed that it most probably related to USE="d" on GCC.
So, that may be the reason of "not for everyone".

And also side note: gcc:11 not hitting that problem, so, it still looks for me like "already fixed (in 11), but not backported (to 10) glibc compatibility issue"
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-02 03:54:41 UTC
I doubt it's https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d3ae0f515d0c675d42f4f18fc267e8e75f6b6f26 but it could be.
Comment 7 Andreas K. Hüttel archtester gentoo-dev 2021-10-30 16:29:05 UTC
(In reply to Vadim A. Misbakh-Soloviov (mva) from comment #5)
> 
> And also side note: gcc:11 not hitting that problem, so, it still looks for
> me like "already fixed (in 11), but not backported (to 10) glibc
> compatibility issue"

^ that's good news, given that gcc-11 is now already stable
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2021-10-30 21:40:16 UTC
I can't reproduce this with any glibc-2.33.
Comment 9 Alexander 2021-11-11 14:30:39 UTC
sys-libs/glibc-2.33-r7 not have `crypt` USE-flag, that needed to sys-devel/gcc:10
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-11 17:55:07 UTC
(In reply to Alexander from comment #9)
> sys-libs/glibc-2.33-r7 not have `crypt` USE-flag, that needed to
> sys-devel/gcc:10

That doesn’t seem to be relevant to this bug but I don’t understand your point. Please file a new bug with more output to explain what you mean, but that is intentional for the libxcrypt migration (see news item).
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-22 19:10:26 UTC
Not seen any reports of this since, assuming fixed in snapshot since or 10.4.0.