Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1908185 - Possible GCC 11 regression when building Clementine: error: static assertion failed: invalid specialization
Summary: Possible GCC 11 regression when building Clementine: error: static assertion ...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: clementine
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F34FTBFS
TreeView+ depends on / blocked
 
Reported: 2020-12-16 03:27 UTC by Robert-André Mauchin 🐧
Modified: 2020-12-17 06:00 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-17 06:00:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert-André Mauchin 🐧 2020-12-16 03:27:10 UTC
Works in F33, fails in Rawhide:


/usr/include/c++/11/ext/numeric_traits.h: In instantiation of 'struct __gnu_cxx::__numeric_traits_integer<__int128 unsigned>':
/usr/include/c++/11/bits/uniform_int_dist.h:250: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 int; _IntType = int]'
/usr/include/c++/11/bits/uniform_int_dist.h:306: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 int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]'
/usr/include/c++/11/bits/uniform_int_dist.h:192: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, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]'
/builddir/build/BUILD/Clementine-ccba649f622497b8463930b9ad5b7a1cafe6c976/src/globalsearch/spotifysearchprovider.cpp:276:33:   required from here
/usr/include/c++/11/ext/numeric_traits.h:64:53: error: static assertion failed: invalid specialization
   64 |       static_assert(__is_integer_nonstrict<_Value>::__value,
      |                                                     ^~~~~~~
/usr/include/c++/11/ext/numeric_traits.h:64:53: note: 'std::__is_integer<__int128 unsigned>::__value' evaluates to false
In file included from /usr/include/c++/11/bits/stl_algo.h:66,
                 from /usr/include/c++/11/algorithm:62,
                 from /usr/include/qt5/QtCore/qglobal.h:142,
                 from /usr/include/qt5/QtCore/qiodevice.h:43,
                 from /usr/include/qt5/QtCore/qprocess.h:43,
                 from /usr/include/qt5/QtCore/QProcess:1,
                 from /builddir/build/BUILD/Clementine-ccba649f622497b8463930b9ad5b7a1cafe6c976/src/internet/spotify/spotifyservice.h:25,
                 from /builddir/build/BUILD/Clementine-ccba649f622497b8463930b9ad5b7a1cafe6c976/src/globalsearch/spotifysearchprovider.h:21,
                 from /builddir/build/BUILD/Clementine-ccba649f622497b8463930b9ad5b7a1cafe6c976/src/globalsearch/spotifysearchprovider.cpp:18:
/usr/include/c++/11/bits/uniform_int_dist.h: In instantiation of '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 int; _IntType = int]':
/usr/include/c++/11/bits/uniform_int_dist.h:306: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 int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]'
/usr/include/c++/11/bits/uniform_int_dist.h:192: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, 2636928640, 15, 4022730752, 18, 1812433253>; _IntType = int; std::uniform_int_distribution<_IntType>::result_type = int]'
/builddir/build/BUILD/Clementine-ccba649f622497b8463930b9ad5b7a1cafe6c976/src/globalsearch/spotifysearchprovider.cpp:276:33:   required from here
/usr/include/c++/11/bits/uniform_int_dist.h:251:46: error: static assertion failed: W must be twice as wide as U
  251 |           static_assert(_Wp_traits::__digits == (2 * _Up_traits::__digits),
      |                                     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/uniform_int_dist.h:251:46: note: '(((int)__gnu_cxx::__numeric_traits_integer<__int128 unsigned>::__digits) == (2 * ((int)__gnu_cxx::__numeric_traits_integer<long unsigned int>::__digits)))' evaluates to false
[ 75%] Building CXX object src/CMakeFiles/clementine_lib.dir/internet/googledrive/googledriveurlhandler.cpp.o


https://koji.fedoraproject.org/koji/taskinfo?taskID=57541136

Comment 1 Jeff Law 2020-12-16 03:30:50 UTC
FWIW, my tester trips this as well, but clementine was failing with gcc-10 in rawhide before the introduction of gcc-11, so it never got high enough on my todo list to chase down.

Comment 2 Jonathan Wakely 2020-12-16 13:19:00 UTC
This is a package bug, not a GCC bug.

The build.log shows that these build flags are used:

--std=c++0x -U__STRICT_ANSI__ 

This is stupid. It asks for strict C++0x conformance, then asks for non-strict conformance.

Just use -std=gnu++0x which means non-strict mode.

Better yet, remove that flag and let GCC use its default (which is now -std=gnu++17). It's 2020, you don't need to add options to get "C++0x" features now.

Comment 3 Jonathan Wakely 2020-12-16 14:59:06 UTC
(In reply to Jonathan Wakely from comment #2)
> This is stupid. It asks for strict C++0x conformance, then asks for
> non-strict conformance.

Or more accurately, it asks the compiler for a strict conformance mode, then lies to the standard library about what mode the compiler is using.

Comment 4 Robert-André Mauchin 🐧 2020-12-16 19:19:36 UTC
(In reply to Jonathan Wakely from comment #2)
> This is a package bug, not a GCC bug.
> 
> The build.log shows that these build flags are used:
> 
> --std=c++0x -U__STRICT_ANSI__ 
> 
> This is stupid. It asks for strict C++0x conformance, then asks for
> non-strict conformance.
> 
> Just use -std=gnu++0x which means non-strict mode.
> 
> Better yet, remove that flag and let GCC use its default (which is now
> -std=gnu++17). It's 2020, you don't need to add options to get "C++0x"
> features now.

(In reply to Jonathan Wakely from comment #3)
> (In reply to Jonathan Wakely from comment #2)
> > This is stupid. It asks for strict C++0x conformance, then asks for
> > non-strict conformance.
> 
> Or more accurately, it asks the compiler for a strict conformance mode, then
> lies to the standard library about what mode the compiler is using.


Thanks for your help,


Note You need to log in before you can comment on or make changes to this bug.