Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 633452 - www-client/chromium-63.0.3230.0 build fails with gcc
Summary: www-client/chromium-63.0.3230.0 build fails with gcc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 12:43 UTC by Paweł Hajdan, Jr. (RETIRED)
Modified: 2017-11-04 14:52 UTC (History)
4 users (show)

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


Attachments
0001-Fix-the-build-of-base-numerics-with-GCC.patch (0001-Fix-the-build-of-base-numerics-with-GCC.patch,3.78 KB, patch)
2017-10-23 13:16 UTC, iGentoo
Details | Diff
Updated patch (0001-Fix-the-build-of-base-numerics-with-GCC.patch,2.97 KB, patch)
2017-10-28 10:13 UTC, Mike Lothian
Details | Diff
chromium ebuild (chromium-63.0.3230.0.ebuild.txt,19.09 KB, text/plain)
2017-11-02 15:48 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2017-10-04 12:43:05 UTC
This is with both gcc-6.4.0 and gcc-7.2.0:

In file included from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math.h:13:0,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/safe_math.h:8,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/time/time.h:63,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/threading/platform_thread.h:16,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/synchronization/lock.h:12,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/sequence_checker_impl.h:13,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/sequence_checker.h:10,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/memory/ref_counted.h:19,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/pickle.h:17,
                 from /var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/pickle.cc:5:
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math_impl.h: In instantiation of ‘static constexpr bool base::internal::CheckedMulOp<T, U, typename std::enable_if<(std::is_integral<_Tp>::value && std::is_integral<_Tp2>::value)>::type>::Do(T, U, V*) [with V = long unsigned int; T = int; U = long unsigned int]’:
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math.h:235:17:   required from ‘static constexpr base::internal::CheckedNumeric<T> base::internal::CheckedNumeric<T>::MathOp(L, R) [with M = base::internal::CheckedMulOp; L = int; R = long unsigned int; T = long unsigned int]’
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math.h:325:72:   required from ‘constexpr base::internal::CheckedNumeric<typename base::internal::MathWrapper<M, L, R>::type> base::internal::CheckMathOp(L, R) [with M = base::internal::CheckedMulOp; L = int; R = long unsigned int; typename base::internal::MathWrapper<M, L, R>::type = long unsigned int]’
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math.h:341:1:   required from ‘constexpr base::internal::CheckedNumeric<typename base::internal::ResultType<base::internal::CheckedMulOp, L, R, Args ...>::type> base::internal::CheckMul(L, R, const Args ...) [with L = int; R = long unsigned int; Args = {}; typename base::internal::ResultType<base::internal::CheckedMulOp, L, R, Args ...>::type = long unsigned int]’
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/pickle.cc:79:43:   required from here
/var/tmp/portage/www-client/chromium-63.0.3230.0/work/chromium-63.0.3230.0/base/numerics/checked_math_impl.h:186:15: error: uninitialized variable ‘presult’ in ‘constexpr’ function
     Promotion presult;
               ^~~~~~~

I believe this started with upstream https://chromium-review.googlesource.com/c/chromium/src/+/603127 .
Comment 1 Yuriy Taraday 2017-10-20 23:22:08 UTC
Fix is on the way to upstream: https://chromium-review.googlesource.com/c/chromium/src/+/730709
Comment 2 iGentoo 2017-10-23 13:16:07 UTC
Created attachment 499762 [details, diff]
0001-Fix-the-build-of-base-numerics-with-GCC.patch
Comment 3 Mike Lothian 2017-10-28 10:13:24 UTC
Created attachment 500526 [details, diff]
Updated patch

This gets the build working with Chromium 63.0.3230.0
Comment 4 klaus818 2017-11-02 15:41:38 UTC
For which compiler? Chromium 63.0.3230.0 told me, that I can't build it with the gcc, I had to use clang.
Comment 5 Mike Lothian 2017-11-02 15:47:26 UTC
You need to remove the following 3 lines from the ebuild:

               if tc-is-gcc; then
                       die "Known build break with gcc, see https://bugs.gentoo.org/633452 . Use clang as workaround."
               fi

And add in        

"${FILESDIR}/0001-Fix-the-build-of-base-numerics-with-GCC.patch"

I've got an ebuild in the FireBurn overlay, I'll attach the ebuild here
Comment 6 Mike Lothian 2017-11-02 15:48:50 UTC
Created attachment 501704 [details]
chromium ebuild

Just for the lazy ;)

Adds in the extra epatch and removes the ekill for gcc
Comment 7 Larry the Git Cow gentoo-dev 2017-11-04 14:52:57 UTC
The bug has been closed via the following commit(s):

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

commit b3838ab55a3424aa163316503389b36d7e7a8c37
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2017-11-04 14:51:38 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2017-11-04 14:52:49 +0000

    www-client/chromium: beta channel bump (63.0.3239.30)
    
    Closes: https://bugs.gentoo.org/633452
    Closes: https://bugs.gentoo.org/633858
    Package-Manager: Portage-2.3.13_p1, Repoman-2.3.3_p81

 www-client/chromium/Manifest                       |  2 +-
 ....3223.8.ebuild => chromium-63.0.3239.30.ebuild} | 27 +++++++++--------
 www-client/chromium/files/chromium-webrtc-r0.patch | 34 ++++++++++++++++++++++
 3 files changed, 50 insertions(+), 13 deletions(-)