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: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-01 03:08 UTC by Vadim A. Misbakh-Soloviov (mva)
Modified: 2021-09-02 03:54 UTC (History)
1 user (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-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-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.