Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 708346 - sys-devel/gcc-9.2.0-r3[sanitize] fails to compile with sys-devel/glibc-2.31
Summary: sys-devel/gcc-9.2.0-r3[sanitize] fails to compile with sys-devel/glibc-2.31
Status: RESOLVED FIXED
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: PATCH
: 709634 (view as bug list)
Depends on:
Blocks: glibc-2.31
  Show dependency tree
 
Reported: 2020-02-05 13:47 UTC by Mike Lothian
Modified: 2020-06-10 07:58 UTC (History)
1 user (show)

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


Attachments
build.log (build.log.xz,152.06 KB, application/x-xz)
2020-02-05 13:48 UTC, Mike Lothian
Details
glibc 2.31 fix (glibc-2.31.patch,1.89 KB, patch)
2020-02-05 13:48 UTC, Mike Lothian
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2020-02-05 13:47:42 UTC
It looks like it will need:

https://github.com/gcc-mirror/gcc/commit/ce9568e9e9cf6094be30e748821421e703754ffc.patch
https://github.com/gcc-mirror/gcc/commit/75003cdd23c310ec385344e8040d490e8dd6d2be.patch

Which I've squashed down to the attached patch

Reproducible: Always
Comment 1 Mike Lothian 2020-02-05 13:48:09 UTC
Created attachment 611774 [details]
build.log
Comment 2 Mike Lothian 2020-02-05 13:48:58 UTC
Created attachment 611776 [details, diff]
glibc 2.31 fix
Comment 3 Mike Lothian 2020-02-05 13:52:24 UTC
/bin/bash ../libtool  --tag=CXX   --mode=compile /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/./gcc/xgcc -shared-libgcc -B/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/./gcc -nostdinc++ -L/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/build/x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include   -fchecking=1 -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS  -DHAVE_RPC_XDR_H=0 -DHAVE_TIRPC_RPC_XDR_H=0 -I. -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common -I..  -I /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/include -isystem /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/include/system  -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fno-rtti -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include     -I../../libstdc++-v3/include/x86_64-pc-linux-gnu     -I/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/../libstdc++-v3/libsupc++ -std=gnu++11  -DSANITIZER_LIBBACKTRACE -DSANITIZER_CP_DEMANGLE -I /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/../libbacktrace -I ../libbacktrace -I /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/../include -include /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/libbacktrace/backtrace-rename.h -g -march=native -pipe -O2 -D_GNU_SOURCE -MT sanitizer_procmaps_common.lo -MD -MP -MF .deps/sanitizer_procmaps_common.Tpo -c -o sanitizer_procmaps_common.lo /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_procmaps_common.cc
In file included from /var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:193:
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:72: error: narrowing conversion of ‘-1’ from ‘int’ to ‘long unsigned int’ [-Wnarrowing]
  339 |     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
      |                                                                        ^
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
  333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
      |                              ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1511:3: note: in expansion of macro ‘COMPILER_CHECK’
 1511 |   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
      |   ^~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1161:1: note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 1161 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
      | ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:70: warning: size of array ‘assertion_failed__1161’ is not an integral constant-expression [-Wpedantic]
  339 |     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
      |                                                         ~~~~~~~~~~~~~^~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
  333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
      |                              ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1511:3: note: in expansion of macro ‘COMPILER_CHECK’
 1511 |   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
      |   ^~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1161:1: note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 1161 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
      | ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:70: error: size ‘-1’ of array ‘assertion_failed__1161’ is negative
  339 |     typedef char IMPL_PASTE(assertion_failed_##_, line)[2*(int)(pred)-1]
      |                                                         ~~~~~~~~~~~~~^~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30: note: in expansion of macro ‘IMPL_COMPILER_ASSERT’
  333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
      |                              ^~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1511:3: note: in expansion of macro ‘COMPILER_CHECK’
 1511 |   COMPILER_CHECK(sizeof(((__sanitizer_##CLASS *) NULL)->MEMBER) == \
      |   ^~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1161:1: note: in expansion of macro ‘CHECK_SIZE_AND_OFFSET’
 1161 | CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
      | ^~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_posix.cc: In function ‘__sanitizer::fd_t __sanitizer::OpenFile(const char*, __sanitizer::FileAccessMode, __sanitizer::error_t*)’:
/var/tmp/portage/sys-devel/gcc-9.2.0-r3/work/gcc-9.2.0/libsanitizer/sanitizer_common/sanitizer_posix.cc:164:27: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  164 |   fd_t res = internal_open(filename, flags, 0660);
      |              ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Comment 4 Larry the Git Cow gentoo-dev 2020-02-06 22:20:17 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7d1022a04284035ab567d85e356e14e06aab121d

commit 7d1022a04284035ab567d85e356e14e06aab121d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-02-06 22:19:38 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-02-06 22:19:38 +0000

    9.2.0: backport libsanitizer tweaks for glibc-2.31
    
    Reported-by: Mike Lothian
    Bug: https://bugs.gentoo.org/708346
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../gentoo/35_all_glibc-2.31-libsanitizer-1.patch  | 40 ++++++++++++
 .../gentoo/36_all_glibc-2.31-libsanitizer-2.patch  | 76 ++++++++++++++++++++++
 9.2.0/gentoo/README.history                        |  2 +
 3 files changed, 118 insertions(+)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-02-06 22:22:13 UTC
Thank you for the links! I assume you have tested these patches against 9.2.0 and it was enough for your system.

gcc patchset will be cun in a few weeks.

Meanwhile for those who would like to run glibc-2.31 now you can drop the patches into /etc/portage/patches/sys-devel/gcc:9.2.0/.
Comment 6 Mike Lothian 2020-02-06 23:18:23 UTC
Yeah I'm running it here and it's working well
Comment 7 Arfrever Frehtes Taifersar Arahesis 2020-02-15 05:08:21 UTC
*** Bug 709634 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2020-02-15 20:13:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c059facbe9af77c4f8a8c783a826e4d47ea1b267

commit c059facbe9af77c4f8a8c783a826e4d47ea1b267
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-02-15 20:10:06 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-02-15 20:13:40 +0000

    sys-devel/gcc: 9.2.0: cut 5 patchset
    
    Three new patches:
    + 34_all_ia64-neg-insn-cost.patch: fix lz4 code generation on ia64
    + 35_all_glibc-2.31-libsanitizer-{1,2}.patch: fix build against glibc-2.31
    
    Closes: https://bugs.gentoo.org/707958
    Bug: https://gcc.gnu.org/PR88879
    Closes: https://bugs.gentoo.org/708346
    Package-Manager: Portage-2.3.88, Repoman-2.3.20
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest            |  1 +
 sys-devel/gcc/gcc-9.2.0-r4.ebuild | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)