Summary: | www-client/chromium-96.0.4664.45: fails to build with glibc-2.34 using Clang (sandbox/linux/services/credentials.cc:103:16: error: variable-sized object may not be initialized) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Patrick McLean <chutzpah> |
Component: | Current packages | Assignee: | Chromium Project <chromium> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | emilien.mottet, PF4Public, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963, 803482 | ||
Attachments: |
build.log
emerge --info www-client/chromium sandbox patch |
Description
Patrick McLean
2021-11-15 19:06:42 UTC
Created attachment 751335 [details]
build.log
The build.log file (zstd compressed)
Created attachment 751338 [details]
emerge --info www-client/chromium
Emerge --info output
There was some discussion at https://forums.gentoo.org/viewtopic-p-8644495.html?sid=fe1f3342f2f1163902b0f11cd3f3f1b5 (In reply to Marcin Deranek from comment #3) > There was some discussion at > https://forums.gentoo.org/viewtopic-p-8644495. > html?sid=fe1f3342f2f1163902b0f11cd3f3f1b5 THat's not the same error, AFAICT. That is bug 816699. I would say 4th comment shows exactly the same error message (except line number which): ../../sandbox/linux/services/credentials.cc:101:16: error: variable-sized object may not be initialized char tls_buf[PTHREAD_STACK_MIN] = {0}; ^~~~~~~~~~~~~~~~~ /usr/include/bits/pthread_stack_min-dynamic.h:26:30: note: expanded from macro 'PTHREAD_STACK_MIN' # define PTHREAD_STACK_MIN __sysconf (__SC_THREAD_STACK_MIN_VALUE) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Created attachment 751350 [details, diff]
sandbox patch
Can someone test attached patch (including runtime)?
(In reply to Stephan Hartmann from comment #6) > Created attachment 751350 [details, diff] [details, diff] > sandbox patch > > Can someone test attached patch (including runtime)? I can confirm that it does build and seems to be working fine with the patch. Thanks for feedback. However, the patch is more or less a hack, because variable-length-array is a C99 feature and not allowed in C++. clang and GCC have an extension to support it. Still no idea why/how I didn't hit this (with GCC). Also note that Fedora is patching a different file but not this one? https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch I (In reply to Sam James from comment #9) > Still no idea why/how I didn't hit this (with GCC). Also note that Fedora is > patching a different file but not this one? > https://src.fedoraproject.org/rpms/chromium/blob/rawhide/f/chromium-88.0. > 4324.182-rawhide-gcc-std-max-fix.patch Maybe a GCC extension. Another option would be to use something like Firefox. On x86_64 PTHREAD_STACK_MIN is 16384. Firefox added a constant which is either PTHREAD_STACK_MIN or at least 32KiB. But I don't know if this is sufficient and the later used clone() has no way to tell the kernel the allocated stack size. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2415a3c94f322bf84d310cf985b6e6081683ff92 commit 2415a3c94f322bf84d310cf985b6e6081683ff92 Author: Stephan Hartmann <sultan@gentoo.org> AuthorDate: 2021-11-20 10:08:00 +0000 Commit: Stephan Hartmann <sultan@gentoo.org> CommitDate: 2021-11-20 10:08:00 +0000 www-client/chromium: add workaround for sandbox with glibc-2.34 Bug: https://bugs.gentoo.org/823857 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Stephan Hartmann <sultan@gentoo.org> .../chromium/files/chromium-glibc-2.34.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) FWIW, I'm hitting the same issue with dev-qt/qtwebengine-5.15.2_p20211019... (In reply to Manuel Nickschas from comment #12) > FWIW, I'm hitting the same issue with dev-qt/qtwebengine-5.15.2_p20211019... Please do file a new bug for things like this and reference this one. Patch was merged upstream: https://crrev.com/c/3436947 |