Bug 30658 - valarray declaration error after gcc 10.4.0 update
Summary: valarray declaration error after gcc 10.4.0 update
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: High major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA8-64-OK, MGA8-32-OK
Keywords: advisory, validated_update
Depends on:
Blocks: 30655
  Show dependency treegraph
 
Reported: 2022-07-20 17:41 CEST by christian barranco
Modified: 2022-07-25 11:51 CEST (History)
3 users (show)

See Also:
Source RPM: gcc-10.4.0-2.mga8.src.rpm
CVE:
Status comment:


Attachments

Description christian barranco 2022-07-20 17:41:24 CEST
Hi
Trying to build the new Chromium version 103.0.5060.134 for MGA8, I got an error I suspected to be related to libstdc++-devel
So, I tried to rebuild the current version 103.0.5060.53 which has been successful when using the previous gcc-10.3.0-2; the build failed in the same way when using the current gcc-10.4.0-2

The error I get is:

In file included from ../../third_party/vulkan-deps/vulkan-validation-layers/src/layers/core_validation.cpp:59:
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/valarray:1214:5: error: exception specification in declaration does not match previous declaration
    begin(valarray<_Tp>& __va) noexcept
    ^
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:107:31: note: previous declaration is here
  template<typename _Tp> _Tp* begin(valarray<_Tp>&);
                              ^
In file included from ../../third_party/vulkan-deps/vulkan-validation-layers/src/layers/core_validation.cpp:59:
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/valarray:1224:5: error: exception specification in declaration does not match previous declaration
    begin(const valarray<_Tp>& __va) noexcept
    ^
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:108:37: note: previous declaration is here
  template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
                                    ^
In file included from ../../third_party/vulkan-deps/vulkan-validation-layers/src/layers/core_validation.cpp:59:
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/valarray:1234:5: error: exception specification in declaration does not match previous declaration
    end(valarray<_Tp>& __va) noexcept
    ^
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:109:31: note: previous declaration is here
  template<typename _Tp> _Tp* end(valarray<_Tp>&);
                              ^
In file included from ../../third_party/vulkan-deps/vulkan-validation-layers/src/layers/core_validation.cpp:59:
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/valarray:1249:5: error: exception specification in declaration does not match previous declaration
    end(const valarray<_Tp>& __va) noexcept
    ^
/usr/lib/gcc/x86_64-mageia-linux-gnu/10/../../../../include/c++/10/bits/range_access.h:110:37: note: previous declaration is here
  template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
                                    ^
4 errors generated.


It looks like there is something inconsistent between /usr/include/c++/10/bits/range_access.h and /usr/include/c++/10/valarray


How to replicate?
Rebuild chromium-browser-stable-103.0.5060.53.mga8 with gcc-10.4.0
christian barranco 2022-07-20 17:41:34 CEST

Priority: Normal => High

christian barranco 2022-07-20 17:43:31 CEST

CC: (none) => tmb

Comment 1 Lewis Smith 2022-07-20 21:18:46 CEST
> I tried to rebuild the current version 103.0.5060.53
> [of chromium-browser-stable] which has been successful when using the
> previous gcc-10.3.0-2; the build failed in the same way when using
> the current gcc-10.4.0-2
I think it worth getting the view of cjw also, since he must have, or will be, treading the same path as maintainer of chromium-browser.
Not that the problem should relate just to that particular application.

CC: (none) => cjw, lewyssmith

David Walser 2022-07-20 23:14:07 CEST

Assignee: bugsquad => tmb

Comment 2 Christiaan Welvaart 2022-07-21 00:02:06 CEST
We can compare with cauldron:

/usr/include/c++/12/valarray:1215
/usr/include/c++/12/bits/range_access.h:113
Both are declared noexcept.

In mga8, the 4 declarations in bits/range_access.h do not have the noexcept specifier, so the question is: were these forgotten or was noexcept mistakenly added in <valarray> while it is apparently not required in C++11 and C++14?
Comment 3 Christiaan Welvaart 2022-07-21 00:54:46 CEST
caused by fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103022
Morgan Leijström 2022-07-21 05:58:14 CEST

Blocks: (none) => 30655

Comment 4 christian barranco 2022-07-21 08:05:55 CEST
(In reply to Christiaan Welvaart from comment #3)
> caused by fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103022

Thanks for your analysis. Should I report a bug to gcc ?
Comment 5 Thomas Backlund 2022-07-21 09:19:06 CEST
No need, I've added the upstream fix and can ping Jonathan when confirmed it works  

a new gcc will be submitted soon-ish
Comment 6 christian barranco 2022-07-21 09:57:39 CEST
(In reply to Thomas Backlund from comment #5)
> No need, I've added the upstream fix and can ping Jonathan when confirmed it
> works  
> 
> a new gcc will be submitted soon-ish

You rock! Thanks!
Comment 7 Thomas Backlund 2022-07-21 12:40:25 CEST
packages for test:


SRPM:
gcc-10.4.0-3.mga8.src.rpm


i586:
gcc-10.4.0-3.mga8.i586.rpm
gcc-c++-10.4.0-3.mga8.i586.rpm
gcc-cpp-10.4.0-3.mga8.i586.rpm
gcc-doc-10.4.0-3.mga8.noarch.rpm
gcc-gdc-10.4.0-3.mga8.i586.rpm
gcc-gfortran-10.4.0-3.mga8.i586.rpm
gcc-gnat-10.4.0-3.mga8.i586.rpm
gcc-objc++-10.4.0-3.mga8.i586.rpm
gcc-objc-10.4.0-3.mga8.i586.rpm
gcc-plugins-10.4.0-3.mga8.i586.rpm
libasan6-10.4.0-3.mga8.i586.rpm
libasan-devel-10.4.0-3.mga8.i586.rpm
libatomic1-10.4.0-3.mga8.i586.rpm
libatomic-devel-10.4.0-3.mga8.i586.rpm
libgcc1-10.4.0-3.mga8.i586.rpm
libgfortran5-10.4.0-3.mga8.i586.rpm
libgnat10-10.4.0-3.mga8.i586.rpm
libgomp1-10.4.0-3.mga8.i586.rpm
libgomp-devel-10.4.0-3.mga8.i586.rpm
libgphobos1-10.4.0-3.mga8.i586.rpm
libitm1-10.4.0-3.mga8.i586.rpm
libitm-devel-10.4.0-3.mga8.i586.rpm
libobjc4-10.4.0-3.mga8.i586.rpm
libquadmath0-10.4.0-3.mga8.i586.rpm
libquadmath-devel-10.4.0-3.mga8.i586.rpm
libstdc++6-10.4.0-3.mga8.i586.rpm
libstdc++-devel-10.4.0-3.mga8.i586.rpm
libstdc++-docs-10.4.0-3.mga8.noarch.rpm
libstdc++-python-devel-10.4.0-3.mga8.i586.rpm
libstdc++-static-devel-10.4.0-3.mga8.i586.rpm
libubsan1-10.4.0-3.mga8.i586.rpm
libubsan-devel-10.4.0-3.mga8.i586.rpm


x86_64:
gcc-10.4.0-3.mga8.x86_64.rpm
gcc-c++-10.4.0-3.mga8.x86_64.rpm
gcc-cpp-10.4.0-3.mga8.x86_64.rpm
gcc-doc-10.4.0-3.mga8.noarch.rpm
gcc-gdc-10.4.0-3.mga8.x86_64.rpm
gcc-gfortran-10.4.0-3.mga8.x86_64.rpm
gcc-gnat-10.4.0-3.mga8.x86_64.rpm
gcc-objc++-10.4.0-3.mga8.x86_64.rpm
gcc-objc-10.4.0-3.mga8.x86_64.rpm
gcc-plugins-10.4.0-3.mga8.x86_64.rpm
libasan6-10.4.0-3.mga8.x86_64.rpm
libasan-devel-10.4.0-3.mga8.x86_64.rpm
libatomic1-10.4.0-3.mga8.x86_64.rpm
libatomic-devel-10.4.0-3.mga8.x86_64.rpm
libgcc1-10.4.0-3.mga8.x86_64.rpm
libgfortran5-10.4.0-3.mga8.x86_64.rpm
libgnat10-10.4.0-3.mga8.x86_64.rpm
libgomp1-10.4.0-3.mga8.x86_64.rpm
libgomp-devel-10.4.0-3.mga8.x86_64.rpm
libgphobos1-10.4.0-3.mga8.x86_64.rpm
libitm1-10.4.0-3.mga8.x86_64.rpm
libitm-devel-10.4.0-3.mga8.x86_64.rpm
liblsan0-10.4.0-3.mga8.x86_64.rpm
liblsan-devel-10.4.0-3.mga8.x86_64.rpm
libobjc4-10.4.0-3.mga8.x86_64.rpm
libquadmath0-10.4.0-3.mga8.x86_64.rpm
libquadmath-devel-10.4.0-3.mga8.x86_64.rpm
libstdc++6-10.4.0-3.mga8.x86_64.rpm
libstdc++-devel-10.4.0-3.mga8.x86_64.rpm
libstdc++-docs-10.4.0-3.mga8.noarch.rpm
libstdc++-python-devel-10.4.0-3.mga8.x86_64.rpm
libstdc++-static-devel-10.4.0-3.mga8.x86_64.rpm
libtsan0-10.4.0-3.mga8.x86_64.rpm
libtsan-devel-10.4.0-3.mga8.x86_64.rpm
libubsan1-10.4.0-3.mga8.x86_64.rpm
libubsan-devel-10.4.0-3.mga8.x86_64.rpm
Comment 8 christian barranco 2022-07-21 16:08:40 CEST
Hi
Should rpm-build be updated as well?
I use mock for packaging, and it looks like rpm-build installation happens first;  installing gcc-10.4.0-2 from core/updates and preventing to update from core/updates_testing afterwards.
The core/updates_testing repo is considered by Mock later on, as some buildrequires come from there after chroot env is set up.
Comment 9 Thomas Backlund 2022-07-21 17:00:26 CEST
(In reply to christian barranco from comment #8)
> Hi
> Should rpm-build be updated as well?

Nope.

> I use mock for packaging, and it looks like rpm-build installation happens
> first;  installing gcc-10.4.0-2 from core/updates and preventing to update
> from core/updates_testing afterwards.
> The core/updates_testing repo is considered by Mock later on, as some
> buildrequires come from there after chroot env is set up.

I guess you need to add "Core Updates Testing" as a medium for mock to use
Comment 10 christian barranco 2022-07-21 17:19:17 CEST
(In reply to Thomas Backlund from comment #9)
> (In reply to christian barranco from comment #8)
> > Hi
> > Should rpm-build be updated as well?
> 
> Nope.
> 
> > I use mock for packaging, and it looks like rpm-build installation happens
> > first;  installing gcc-10.4.0-2 from core/updates and preventing to update
> > from core/updates_testing afterwards.
> > The core/updates_testing repo is considered by Mock later on, as some
> > buildrequires come from there after chroot env is set up.
> 
> I guess you need to add "Core Updates Testing" as a medium for mock to use

I have already added the Testing repo. It works for other libs, but not for gcc. 
gcc is installed during the chroot setup by rpm-build, and it is not updated after wards.
Comment 11 Thomas Backlund 2022-07-21 17:31:25 CEST
(In reply to christian barranco from comment #10)

> 
> I have already added the Testing repo. It works for other libs, but not for
> gcc. 
> gcc is installed during the chroot setup by rpm-build, and it is not updated
> after wards.

So force it with:

BuildRequires: gcc >= 10.4.0-3
Comment 12 Lewis Smith 2022-07-21 21:04:41 CEST
Thanks to Christiaan & Thomas for rapid reactions.

CC: lewyssmith => (none)

Comment 13 christian barranco 2022-07-22 09:15:10 CEST
Hi. Thanks to this 10.4.0-3 I was able to package Chromium locally last night.

Bug fixed!

Thanks
Comment 14 christian barranco 2022-07-22 12:49:22 CEST
Hi. Should I move it as Ready for QA?
Comment 15 Thomas Backlund 2022-07-22 22:45:14 CEST
rpms list in comment 7, confirmed fix for the regression in comment 13...

other than that a few fortran fixes and a d one...


Advisory, added to svn:

type: bugfix
subject: Updated gcc packages fixes a few bugs and a regression
src:
  8:
   core:
     - gcc-10.4.0-3.mga8
description: |
  The update to gcc 10.4 in MGAA-2022-0094 caused a regression in valarray
  definition causing atleast chromiom builds to fail. 

  This update fixes that regression, and also adds the following fixes:
  - d: Fix error: aggregate value used where floating point was expected
  - Fortran: improve error recovery for EXTENDS_TYPE_OF() [PR106121]
  - Fortran: error recovery on invalid CLASS(), PARAMETER declarations [PR105243]
  - Fortran: do not generate conflicting results under -ff2c [PR104313]
  - tree-sra: Fix union handling in build_reconstructed_reference
references:
 - https://bugs.mageia.org/show_bug.cgi?id=30658

Assignee: tmb => qa-bugs
Keywords: (none) => advisory

Comment 16 christian barranco 2022-07-24 10:01:40 CEST
Hi. What does remain to be done to move it to Updates ?
I need it to update Chromium for Mageia 8.
Comment 17 Thomas Backlund 2022-07-24 10:30:13 CEST
(In reply to christian barranco from comment #16)
> Hi. What does remain to be done to move it to Updates ?
> I need it to update Chromium for Mageia 8.

Just submit Chromium to updates_testing with the same:

BuildRequires: gcc >= 10.4.0-3

and it will ensure it will be used during the build
Thomas Backlund 2022-07-25 10:57:21 CEST

Whiteboard: (none) => MGA8-64-OK, MGA8-32-OK
Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 18 Mageia Robot 2022-07-25 11:51:53 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2022-0103.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


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