Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939871 - dev-qt/qtwebengine:5.15 several errors compiling with clang
Summary: dev-qt/qtwebengine:5.15 several errors compiling with clang
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
: 947219 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-19 19:07 UTC by David Carlos Manuelda
Modified: 2025-01-14 02:13 UTC (History)
6 users (show)

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


Attachments
Fix noexcept and throw missing specifications (0001-third_party-crashpad-Fix-noexcept-and-throw-missing-.patch,1.93 KB, patch)
2024-09-19 19:08 UTC, David Carlos Manuelda
Details | Diff
Patchset to make it compile (qtwebengine-5.15.14-patchset.tgz,2.74 KB, application/x-compressed-tar)
2024-09-19 19:10 UTC, David Carlos Manuelda
Details
build.log (build.log,667.37 KB, text/plain)
2024-12-17 00:33 UTC, gentoo.unbraided554
Details
after-patch (build.log.gz,52.95 KB, text/plain)
2024-12-17 02:17 UTC, gentoo.unbraided554
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2024-09-19 19:07:55 UTC
When trying to compile (with clang-18 on a LLVM profile) I found that this package does not compile due to trivial things that are easily corrected.

I am providing patches for this version to be compiled/used in Gentoo (not sure if upstream fixed them or how to provide them the patches), in any case this is a quickfix to have it compiled for now.

Btw: The Gentoo's ebuild is also missing `eapply_user` at the end of `src_prepare` function
Comment 1 David Carlos Manuelda 2024-09-19 19:08:28 UTC
Created attachment 903388 [details, diff]
Fix noexcept and throw missing specifications
Comment 2 David Carlos Manuelda 2024-09-19 19:10:04 UTC
Created attachment 903389 [details]
Patchset to make it compile
Comment 3 Ionen Wolkens gentoo-dev 2024-09-19 19:16:55 UTC
(In reply to David Carlos Manuelda from comment #0)
> Btw: The Gentoo's ebuild is also missing `eapply_user` at the end of
> `src_prepare` function
It is not, qt5-build_src_prepare at the end of it runs "default" which in turn does eapply_user. When using portage it's actually impossible for it to be missing in current EAPIs given a QA check will abort the build if it wasn't ran.
Comment 4 David Carlos Manuelda 2024-09-19 19:18:46 UTC
(In reply to Ionen Wolkens from comment #3)
> (In reply to David Carlos Manuelda from comment #0)
> > Btw: The Gentoo's ebuild is also missing `eapply_user` at the end of
> > `src_prepare` function
> It is not, qt5-build_src_prepare at the end of it runs "default" which in
> turn does eapply_user. When using portage it's actually impossible for it to
> be missing in current EAPIs given a QA check will abort the build if it
> wasn't ran.

Ah, sorry, I was too busy to notice that (and the mistake was mine on a bad folder for my custom patches that was not being applied)
Comment 5 gentoo.unbraided554 2024-12-17 00:33:58 UTC
Created attachment 914192 [details]
build.log

I'm having a similar issue.
I will try the patch files shortly.
Comment 6 gentoo.unbraided554 2024-12-17 02:17:40 UTC
Created attachment 914193 [details]
after-patch

(In reply to gentoo.unbraided554 from comment #5)
> Created attachment 914192 [details]
> build.log
> 
> I'm having a similar issue.
> I will try the patch files shortly.

Patch did not work.
Comment 7 David Carlos Manuelda 2024-12-17 15:55:52 UTC
I've reviewed the patches and compilation and sadly it will not compile with LLVM19 as of the char_traits missing template and other errors that are not covered by these patches.

I could remove the Base::template references (that seems they don't work with clang) but the issue about char_traits persists
Comment 8 David Carlos Manuelda 2024-12-17 15:56:33 UTC
Note that when I tested it compiled fine with clang18 and these patches but now clang19 is another issue
Comment 9 Paul Gover 2024-12-19 23:21:45 UTC
FWIW I can confirm (a) it doesn't compile without the patches, and
(b) it compiles with the patches and LLVM/clang 18.  I didn't try with 19.

I can also confirm it runs OK!

It's useful qtwebengine:15 still exists for now, as app-office/kmymoney absolutely requires it at the moment.
Comment 10 Mike Gilbert gentoo-dev 2024-12-30 15:59:52 UTC
*** Bug 947219 has been marked as a duplicate of this bug. ***
Comment 11 Techwolf 2025-01-14 02:13:21 UTC
Some info for those searching and come across this bug looking for a workaround/solution.

I got it working using clang-18 and the patches from this bug report. GCC will ICE on me due to the zenv1 hardware bug, so I had to figure out how to build with clang.

Make a directory at "/etc/portage/patches/dev-qt/qtwebengine:5" and put the patches from this bug report there. Note that "/etc/portage/patches/dev-qt/qtwebengine-5.15.14" and "/etc/portage/patches/dev-qt/qtwebengine-5" will not work. Portage bug??

Create a file, /etc/portage/env/compiler-clang-18.conf with the following:

# clang 18, use when clang 19 is failing.
CC="clang-18"
CPP="clang-cpp-18" # necessary for xorg-server and possibly other packages
CXX="clang++-18"
AR="/usr/lib/llvm/18/bin/llvm-ar"
NM="/usr/lib/llvm/18/bin/llvm-nm"
RANLIB="/usr/lib/llvm/18/bin/llvm-ranlib"

Then create /etc/portage/env/clang-webengine.conf with:

# needed for qtwebengine
LDFLAGS="${LDFLAGS} -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--as-needed"
EXTRA_GN="use_lld=true is_clang=true clang_use_chrome_plugins=false"

Then add to /etc/portage/package.env the following:

dev-qt/qtwebengine:5 compiler-clang-18.conf clang-webengine.conf


There will be a ton of warnings like:

warning: unknown warning option '-Wshift-overflow=2'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option]
warning: unknown warning option '-Wduplicated-cond' [-Wunknown-warning-option]
warning: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Wunknown-warning-option]


but the build will finished and can be safely ignore for now until more patches are needed.