Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 788607

Summary: media-sound/clementine-1.4.0_rc1 fails to compile with gcc-11 (error: static assertion failed: invalid specialization)
Product: Gentoo Linux Reporter: Jiří Moravec <qjim>
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED FIXED    
Severity: normal CC: bjh-gentoobt, brett, che, creideiki+gentoo-bugzilla, dschridde+gentoobugs, gem, ionen, jasmin+gentoo, leonchik1976, Letto2, orodruinlair, sound, zeekec
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 732706    
Attachments: patch for compatibility with gcc-11
build.log + emerge --info.txt.xz

Description Jiří Moravec 2021-05-06 16:01:45 UTC
Because bug in upstream, media-sound/clementine-1.4.0_rc1 failed to compile with gcc-11.

...
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/ext/numeric_traits.h: In instantiation of ‘struct __gnu_cxx::__numeric_traits_integer<__int128 unsigned>’:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/uniform_int_dist.h:251:31:   required from ‘static _Up std::uniform_int_distribution<_IntType>::_S_nd(_Urbg&, _Up) [with _Wp = _
_int128 unsigned; _Urbg = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _Up = long unsigned i
nt; _IntType = int]’
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/uniform_int_dist.h:307:35:   required from ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_
IntType>::operator()(_UniformRandomBitGenerator&, const std::uniform_int_distribution<_IntType>::param_type&) [with _UniformRandomBitGenerator = std::mersenne_twister_engine<long unsigned i
nt, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/bits/uniform_int_dist.h:193:34:   required from ‘std::uniform_int_distribution<_IntType>::result_type std::uniform_int_distribution<_
IntType>::operator()(_UniformRandomBitGenerator&) [with _UniformRandomBitGenerator = std::mersenne_twister_engine<long unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928
640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]’
/var/tmp/portage/media-sound/clementine-1.4.0_rc1/work/clementine-1.4.0rc1/src/globalsearch/spotifysearchprovider.cpp:276:29:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/ext/numeric_traits.h:64:53: error: static assertion failed: invalid specialization
64 |       static_assert(__is_integer_nonstrict<_Value>::__value,
|                                                     ^~~~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/ext/numeric_traits.h:64:53: note: ‘std::__is_integer<__int128 unsigned>::__value’ evaluates to false
...



Reproducible: Always

Steps to Reproduce:
1. compile media-sound/clementine-1.4.0_rc1 with gcc-11

Actual Results:  
compilation failure

Expected Results:  
compilation success

Upstream bug: https://github.com/clementine-player/Clementine/issues/6865

Suggested solution is fully functional.
Comment 1 Jiří Moravec 2021-05-06 16:02:50 UTC
Created attachment 706368 [details, diff]
patch for compatibility with gcc-11
Comment 2 Ionen Wolkens gentoo-dev 2021-05-06 16:14:02 UTC
Created attachment 706371 [details]
build.log + emerge --info.txt.xz

(attaching full log/info for completeness)
Comment 3 Brianna Royles 2021-05-13 12:35:37 UTC
Using the patch in comment #2 allowed clementine 1.4.0_rc1 to compile for me
Comment 4 jms 2021-05-24 20:33:18 UTC
(In reply to Jiří Moravec from comment #1)
> Created attachment 706368 [details, diff] [details, diff]
> patch for compatibility with gcc-11

works for me with gcc-11  media-sound/clementine-1.4.0_rc1 

thanks
Comment 5 Karl-Johan Karlsson 2021-05-28 06:30:24 UTC
The patch in comment #2 works for me as well, with Clementine 1.4.0_rc1 and GCC 11.1.0.
Comment 6 Gary E. Miller 2021-06-26 20:46:09 UTC
(In reply to Karl-Johan Karlsson from comment #5)
> The patch in comment #2 works for me as well, with Clementine 1.4.0_rc1 and
> GCC 11.1.0.

#MeToo
Comment 7 Larry the Git Cow gentoo-dev 2021-07-02 10:42:26 UTC
The bug has been closed via the following commit(s):

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

commit 108a30eff5e383a41da0285e07d44ed74eb40c88
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2021-07-02 10:39:53 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2021-07-02 10:42:18 +0000

    media-sound/clementine: Fixed build with gcc11
    
    Thanks-to: Jiří Moravec <qjim@volny.cz>
    Closes: https://bugs.gentoo.org/788607
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 media-sound/clementine/clementine-1.4.0_rc1.ebuild |  1 +
 ....0_rc1-gcc11-fix-static-assertion-failure.patch | 70 ++++++++++++++++++++++
 2 files changed, 71 insertions(+)