Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 733246 - sys-devel/gcc-10.1.0-r2: internal compiler error building media-libs/mesa-9999 [PATCH AVAILABLE]
Summary: sys-devel/gcc-10.1.0-r2: internal compiler error building media-libs/mesa-999...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR96130
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-19 20:09 UTC by Rafael Kitover
Modified: 2020-07-23 08:50 UTC (History)
0 users

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


Attachments
build log (build.log.xz,16.58 KB, application/x-xz)
2020-07-19 20:11 UTC, Rafael Kitover
Details
emerge --info (emerge-info.txt.xz,7.78 KB, application/x-xz)
2020-07-19 20:12 UTC, Rafael Kitover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Kitover 2020-07-19 20:09:48 UTC
Described in the arch bts here:

https://bugs.archlinux.org/task/67229

Can be fixed by adding this to the gcc-patches:

https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=776e48e0931db69f158f40e5cb8e15463d879a42

From my build:

FAILED: src/gallium/drivers/softpipe/48c2f4b@@softpipe@sta/sp_tex_sample.c.o 
x86_64-pc-linux-gnu-gcc -m32 -Isrc/gallium/drivers/softpipe/48c2f4b@@softpipe@sta -Isrc/gallium/drivers/softpipe -I../mesa-9999/src/gallium/drivers/softpipe -Isrc/gallium/auxiliary -I../mesa-9999/src/gallium/auxil
iary -I../mesa-9999/src/gallium/include -Iinclude -I../mesa-9999/include -Isrc -I../mesa-9999/src -fvisibility=hidden -fdiagnostics-color=always -DNDEBUG -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -Wl,--gc-sections -ff
unction-sections -fdata-sections -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="20.2.0-devel"' '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"' -
DUSE_ELF_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE -DHAVE_
__BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BU
ILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WA
RN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -DHAVE_FUNC_AT
TRIBUTE_VISIBILITY -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DMAJOR_IN_SYSMACROS -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXEC
INFO_H -DHAVE_SYS_SHM_H -DHAVE_CET_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_TIMESPEC_GET -DHAVE_MEMFD_CREATE -DHAVE_RANDOM_R -DHAVE_FLOCK -DHAVE_STRTOK_R -DHAVE_GETRANDOM -DHAVE_PROGRAM_INVOCATION_NAME -DHAVE_POSIX_
MEMALIGN -DHAVE_DIRENT_D_TYPE -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_ZSTD -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DLLVM_AVAILABLE '-DMESA_LLVM_VERSION_STRING="10.0
.0"' -DUSE_LIBGLVND=1 -DHAVE_LIBUNWIND -DHAVE_WAYLAND_PLATFORM -DWL_HIDE_DEPRECATED -DHAVE_DRI3 -DHAVE_DRI3_MODIFIERS -DHAVE_LIBSENSORS=1 -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=re
turn-type -Werror=empty-body -Werror=incompatible-pointer-types -Werror=int-conversion -Wimplicit-fallthrough -Wno-missing-field-initializers -Wno-format-truncation -fno-math-errno -fno-trapping-math -fno-common -
Werror=format -Wformat-security -march=native -O3 -fPIC -Werror=pointer-arith -Werror=vla -MD -MQ 'src/gallium/drivers/softpipe/48c2f4b@@softpipe@sta/sp_tex_sample.c.o' -MF 'src/gallium/drivers/softpipe/48c2f4b@@s
oftpipe@sta/sp_tex_sample.c.o.d' -o 'src/gallium/drivers/softpipe/48c2f4b@@softpipe@sta/sp_tex_sample.c.o' -c ../mesa-9999/src/gallium/drivers/softpipe/sp_tex_sample.c
during IPA pass: fnsummary                                                                                
../mesa-9999/src/gallium/drivers/softpipe/sp_tex_sample.c: In function ‘sample_compare’:
../mesa-9999/src/gallium/drivers/softpipe/sp_tex_sample.c:3862:1: internal compiler error: Segmentation fault
 3862 | }
      | ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugs.gentoo.org/> for instructions.

Reproducible: Always
Comment 1 Rafael Kitover 2020-07-19 20:11:23 UTC
Created attachment 649894 [details]
build log
Comment 2 Rafael Kitover 2020-07-19 20:12:53 UTC
Created attachment 649896 [details]
emerge --info
Comment 3 Rafael Kitover 2020-07-19 20:13:53 UTC
=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-10.1.0-r2::gentoo was built with the following:
USE="(-ada) (cxx) -d -debug -doc (-fixed-point) fortran -go -graphite (-hardened) (-jit) (-libssp) -lto (multilib) nls nptl -objc -objc++ -objc-gc openmp pch -pgo (pie) sanitize ssp -systemtap -test -vanilla vtv -zstd" ABI_X86="(64)"
CFLAGS="-march=native -pipe -O2"
CXXFLAGS="-march=native -pipe -O2"
FEATURES="ebuild-locks config-protect-if-modified preserve-libs sfperms fixlafiles xattr buildpkg pid-sandbox protect-owned unmerge-logs merge-sync userfetch split-elog usersync binpkg-docompress unmerge-orphans news strict parallel-fetch ipc-sandbox binpkg-logs split-log unknown-features-warn multilib-strict distlocks qa-unresolved-soname-deps ccache assume-digests binpkg-dostrip sandbox"
Comment 4 Larry the Git Cow gentoo-dev 2020-07-19 21:35:57 UTC
The bug has been referenced in the following commit(s):

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

commit 05ffb73edcf527b86b2c651fea4f570524c6e819
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-19 21:34:30 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-19 21:34:30 +0000

    10.1.0: backport ipa-fnsummary PR96130 bug
    
    Fixes build failure of mesa-9999
    
    Reported-by: Rafael Kitover
    Bug: https://bugs.gentoo.org/733246
    Bug: https://gcc.gnu.org/PR96130
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../gentoo/38_all_ICE-ipa-fnsummary-PR96130.patch  | 104 +++++++++++++++++++++
 10.1.0/gentoo/README.history                       |   1 +
 2 files changed, 105 insertions(+)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-19 21:38:16 UTC
Queued the patch for gcc-10.1.0 as https://gitweb.gentoo.org/proj/gcc-patches.git/plain/10.1.0/gentoo/38_all_ICE-ipa-fnsummary-PR96130.patch.

Until next patchset is cut you can drop /etc/portage/patches/sys-devel/gcc:10 and test if it fixes the failure for you.
Comment 6 Rafael Kitover 2020-07-19 22:57:58 UTC
Thank you, I rebuilt gcc with this patch per your instructions and mesa-9999 built fine.
Comment 7 Larry the Git Cow gentoo-dev 2020-07-23 08:42:07 UTC
The bug has been referenced in the following commit(s):

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

commit 064908a8c0b537e980721c7996d276e1901924db
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-23 08:15:06 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-23 08:15:06 +0000

    10.2.0: cut 1 patchset
    
    Based on gcc-10.1.0 patchset. The only change is upstreamed backportes:
    - 29_all_fix-float-hang-PR95118.patch
    - 31_all_ctor-range-PR95241.patch
    - 33_all_avx512-scalar-PR95528.patch
    - 34_all_cet-cross-x86.patch
    - 35_all_ICE-array-subscript-PR95508.patch
    - 38_all_ICE-ipa-fnsummary-PR96130.patch
    
    Bug: https://gcc.gnu.org/PR96190
    Bug: https://bugs.gentoo.org/619706
    Bug: https://gcc.gnu.org/PR96130
    Bug: https://bugs.gentoo.org/733246
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 10.2.0/gentoo/01_all_default-fortify-source.patch  |  22 ++++
 .../02_all_default-warn-format-security.patch      |  22 ++++
 .../gentoo/03_all_default-warn-trampolines.patch   |  13 ++
 10.2.0/gentoo/04_all_nossp-on-nostdlib.patch       |  27 ++++
 10.2.0/gentoo/05_all_alpha-mieee-default.patch     |  39 ++++++
 10.2.0/gentoo/06_all_ia64_note.GNU-stack.patch     |  92 +++++++++++++
 .../gentoo/07_all_i386_libgcc_note.GNU-stack.patch |  54 ++++++++
 10.2.0/gentoo/08_all_libiberty-asprintf.patch      |  18 +++
 10.2.0/gentoo/09_all_libiberty-pic.patch           |  10 ++
 10.2.0/gentoo/10_all_nopie-all-flags.patch         |  18 +++
 10.2.0/gentoo/11_all_sh-drop-sysroot-suffix.patch  |  32 +++++
 10.2.0/gentoo/12_all_ia64-TEXTREL.patch            |  22 ++++
 .../gentoo/13_all_disable-systemtap-switch.patch   | 122 ++++++++++++++++++
 10.2.0/gentoo/14_all_m68k-textrel-on-libgcc.patch  |  93 ++++++++++++++
 10.2.0/gentoo/15_all_respect-build-cxxflags.patch  |  39 ++++++
 10.2.0/gentoo/16_all_libgfortran-Werror.patch      |  20 +++
 10.2.0/gentoo/17_all_libgomp-Werror.patch          |  20 +++
 10.2.0/gentoo/18_all_libitm-Werror.patch           |  19 +++
 10.2.0/gentoo/19_all_libatomic-Werror.patch        |  19 +++
 10.2.0/gentoo/20_all_libbacktrace-Werror.patch     |  17 +++
 10.2.0/gentoo/21_all_libsanitizer-Werror.patch     |  17 +++
 10.2.0/gentoo/22_all_libstdcxx-no-vtv.patch        |  61 +++++++++
 10.2.0/gentoo/23_all_disable-riscv32-ABIs.patch    |  53 ++++++++
 10.2.0/gentoo/24_all_default_ssp-buffer-size.patch |  14 ++
 10.2.0/gentoo/25_all_hppa-faster-synth_mult.patch  |  44 +++++++
 10.2.0/gentoo/26_all_libcpp-ar.patch               | 143 +++++++++++++++++++++
 10.2.0/gentoo/27_all_EXTRA_OPTIONS-z-now.patch     |  26 ++++
 ...all_EXTRA_OPTIONS-fstack-clash-protection.patch |  65 ++++++++++
 .../29_all_lto-intl-workaround-PR95194.patch       |  20 +++
 10.2.0/gentoo/30_all_plugin-objdump.patch          |  34 +++++
 10.2.0/gentoo/31_all_fno-delayed-branch.patch      |  40 ++++++
 10.2.0/gentoo/32_all_sparc_pie_TEXTREL.patch       |  49 +++++++
 10.2.0/gentoo/README.history                       |  33 +++++
 33 files changed, 1317 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2020-07-23 08:49:23 UTC
The bug has been referenced in the following commit(s):

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

commit 00fa65c3015f007af0d9b39c2987edd7011da470
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-23 08:44:27 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-23 08:49:15 +0000

    sys-devel/gcc: 10.2.0: cut 1 patchset
    
    Based on gcc-10.1.0 patchset. The only change is upstreamed backports:
    - 29_all_fix-float-hang-PR95118.patch
    - 31_all_ctor-range-PR95241.patch
    - 33_all_avx512-scalar-PR95528.patch
    - 34_all_cet-cross-x86.patch
    - 35_all_ICE-array-subscript-PR95508.patch
    - 38_all_ICE-ipa-fnsummary-PR96130.patch
    
    Bug: https://gcc.gnu.org/PR96190
    Bug: https://bugs.gentoo.org/619706
    Bug: https://gcc.gnu.org/PR96130
    Bug: https://bugs.gentoo.org/733246
    Package-Manager: Portage-3.0.0, Repoman-2.3.23
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest          |  2 ++
 sys-devel/gcc/gcc-10.2.0.ebuild | 13 +++++++++++++
 2 files changed, 15 insertions(+)
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-23 08:50:52 UTC
Should be fixed in gcc-10.2.0.