Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 872170 - net-libs/webkit-gtk-2.36.8: Fails to build against libcxx-15.0.1
Summary: net-libs/webkit-gtk-2.36.8: Fails to build against libcxx-15.0.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2022-09-21 08:02 UTC by Manuel Nickschas
Modified: 2022-12-19 21:28 UTC (History)
1 user (show)

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


Attachments
build.log (build.log.xz,49.55 KB, application/x-xz)
2022-09-21 08:02 UTC, Manuel Nickschas
Details
emerge --info (emerge.info.xz,6.83 KB, application/x-xz)
2022-09-21 08:03 UTC, Manuel Nickschas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Nickschas 2022-09-21 08:02:21 UTC
Using systemwide clang and libcxx, I can no longer build webkit-gtk:

/usr/include/c++/v1/__algorithm/iterator_operations.h:100:5: error: static assertion failed due to requirement 'is_same<JSC::UnlinkedCallLinkInfo &, const JSC::UnlinkedCallLinkInfo &>::value': It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of dereferencing the iterator, i.e., calling `*it`. This is undefined behavior according to [input.iterators] and can lead to dangling reference issues at runtime, so we are flagging this.
    static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__algorithm/iterator_operations.h:115:5: note: in instantiation of function template specialization 'std::_IterOps<std::_ClassicAlgPolicy>::__validate_iter_reference<WTF::SegmentedVectorIterator<JSC::UnlinkedCallLinkInfo, 8> &>' requested here
    __validate_iter_reference<_Iter>();
    ^

Switching the standard library to GNU libstdc++ fixes the problem (even if the compiler remains clang).

Reproducible: Always

Steps to Reproduce:
1. Set up your toolchain to use libcxx-15 instead of libstdc++
2. Try to build webkit-gtk
3. Profit
Actual Results:  
Fails to compile.

Expected Results:  
Should compile.
Comment 1 Manuel Nickschas 2022-09-21 08:02:47 UTC
Created attachment 813238 [details]
build.log
Comment 2 Manuel Nickschas 2022-09-21 08:03:05 UTC
Created attachment 813241 [details]
emerge --info
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-22 04:20:38 UTC
Could you report this upstream?

I had a quick skim on https://bugs.webkit.org but couldn't see this bug there yet. I don't see a patch in FreeBSD either (great place to check for libc++ issues, if you haven't already been checking there btw!)
Comment 4 Manuel Nickschas 2022-09-23 13:17:26 UTC
https://bugs.webkit.org/show_bug.cgi?id=245574
Comment 5 Manuel Nickschas 2022-10-07 11:45:19 UTC
Apprently fixed upstream:

https://bugs.webkit.org/show_bug.cgi?id=245183
https://github.com/WebKit/WebKit/pull/4339

(not confirmed from my end yet)
Comment 6 Matt Turner gentoo-dev 2022-12-19 21:28:47 UTC
Looks like the commit is in tag webkitgtk-2.39.1. It was cherry-picked to the webkitglib/2.38 branch as commit 762ab19c8d323fcb47bb34df7c85a0a4d016b9ed and was included in webkitgtk-2.38.1.