Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 671568 - sys-devel/gcc-4.8.5: compilation failure with recent glibc (USE=sanitize?)
Summary: sys-devel/gcc-4.8.5: compilation failure with recent glibc (USE=sanitize?)
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:
Depends on:
Blocks:
 
Reported: 2018-11-20 13:45 UTC by Guilherme Amadio
Modified: 2019-06-01 10:10 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guilherme Amadio gentoo-dev 2018-11-20 13:45:48 UTC
GCC 4.8 needs the same backports that were applied to GCC 4.9 to compile with more recent glibc. One thing is a missing #include <signal.h>, as shown below, but other fixes are needed as well, I think. Older compilers might need to be fixed as well if they are supposed to compile with latest glibc.


libtool: compile:  /srv/portage/sys-devel/gcc-4.8.5-r2/work/build/./gcc/xgcc -shared-libgcc -B/srv/portage/sys-devel/gcc-4.8.5-r2/work/build/./gcc -nostdinc++ -L/srv/portage/sys-devel/gcc-4.8.5-r2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src -L/srv/portage/sys-devel/gcc-4.8.5-r2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/src/.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 -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DASAN_HAS_EXCEPTIONS=1 -DASAN_FLEXIBLE_MAPPING_AND_OFFSET=0 -DASAN_NEEDS_SEGV=1 -I. -I/srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/asan -I /srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/include -I /srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fvisibility=hidden -Wno-variadic-macros -I../../libstdc++-v3/include -I../../libstdc++-v3/include/x86_64-pc-linux-gnu -I/srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/../libstdc++-v3/libsupc++ -march=native -O2 -pipe -D_GNU_SOURCE -MT asan_interceptors.lo -MD -MP -MF .deps/asan_interceptors.Tpo -c /srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/asan/asan_interceptors.cc -o asan_interceptors.o >/dev/null 2>&1
/srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/asan/asan_linux.cc: In function ‘bool __asan::AsanInterceptsSignal(int)’:
/srv/portage/sys-devel/gcc-4.8.5-r2/work/gcc-4.8.5/libsanitizer/asan/asan_linux.cc:95:20: error: ‘SIGSEGV’ was not declared in this scope
   return signum == SIGSEGV && flags()->handle_segv;
                    ^
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2018-11-21 00:40:19 UTC
Please attach build.log and emerge --info.

We might need to remove USE=sanitize support unconditionally if libsanitizer proves hard to have backports.
Comment 2 Hans F. Nordhaug 2019-05-21 21:11:58 UTC
Related bug report for GCC 4.9.4: https://bugs.gentoo.org/685358
Comment 3 Larry the Git Cow gentoo-dev 2019-05-31 21:55:21 UTC
The bug has been referenced in the following commit(s):

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

commit 8b3934067086c1c581d2a27f8f0a5cc75dff1066
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-05-31 21:54:18 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-05-31 21:54:18 +0000

    4.8.5: backport 98_all_asan-signal_h.patch
    
    It's not enough yet to build libsanitizer against
    glibc-2.28/.29 but it's a start.
    
    Reported-by: Guilherme Amadio
    Bug: https://bugs.gentoo.org/671568
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 4.8.5/gentoo/98_all_asan-signal_h.patch | 15 +++++++++++++++
 4.8.5/gentoo/README.history             |  2 ++
 2 files changed, 17 insertions(+)
Comment 4 Larry the Git Cow gentoo-dev 2019-05-31 23:08:13 UTC
The bug has been referenced in the following commit(s):

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

commit c8c94f09b88542c7293b251c8e5bacb51b057a64
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-05-31 23:07:28 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-05-31 23:07:28 +0000

    4.8.5: tweak libsanitizer for modern glibc
    
    Reported-by: Guilherme Amadio
    Bug: https://bugs.gentoo.org/671568
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 4.8.5/gentoo/99_all_libsanitizer-res_state-glibc-2.28.patch | 8 ++++++++
 4.8.5/gentoo/README.history                                 | 1 +
 2 files changed, 9 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2019-06-01 08:36:00 UTC
The bug has been referenced in the following commit(s):

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

commit 28d89990740832d87ef34520fec5c20eb7a2ac41
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 08:27:56 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 08:27:56 +0000

    4.8.5: cut 1.5 patchset
    
    Four new patches:
    96_all_stage1-ldflags.patch: fix LDFLAGS passing to STAGE1
    97_all_libjava-ucontext.patch: fix ucontext definition for glibc-2.28
    98_all_asan-signal_h.patch: fix signal declarations for glibc-2.28
    99_all_libsanitizer-res_state-glibc-2.28.patch: fix libsanitizer for glibc-2.28
    
    Bug: https://bugs.gentoo.org/629502
    Bug: https://bugs.gentoo.org/671568
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 4.8.5/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 6 Larry the Git Cow gentoo-dev 2019-06-01 10:10:40 UTC
The bug has been closed via the following commit(s):

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

commit 5251f3d97f0ec56ffd340e3977a4a7af7c82c80d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-06-01 08:33:35 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2019-06-01 10:10:30 +0000

    sys-devel/gcc: 4.8.5: cut 1.5 patchset
    
    Four new patches:
    96_all_stage1-ldflags.patch: fix LDFLAGS passing to STAGE1
    97_all_libjava-ucontext.patch: fix ucontext definition for glibc-2.28
    98_all_asan-signal_h.patch: fix signal declarations for glibc-2.28
    99_all_libsanitizer-res_state-glibc-2.28.patch: fix libsanitizer for glibc-2.28
    
    Closes: https://bugs.gentoo.org/629502
    Closes: https://bugs.gentoo.org/671568
    Package-Manager: Portage-2.3.67, Repoman-2.3.13
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest            |  1 +
 sys-devel/gcc/gcc-4.8.5-r3.ebuild | 47 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)