Bug 280642
| Summary: | Build broken with LLVM 19: Ref.h:62:16: error: member access into incomplete type 'WebCore::HTMLImageElement' | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | WebKitGTK | Assignee: | Michael Catanzaro <mcatanzaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | ap, bugs-noreply, emw, mcatanzaro, webkit-bug-importer |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | PC | ||
| OS: | Linux | ||
Michael Catanzaro
LLVM 19 does not like the forward declarations in WebCodecsVideoFrame.h:
/builddir/build/BUILD/webkitgtk-2.46.1-build/webkitgtk-2.46.1/redhat-linux-build/webkitgtk-6.0/WTF/Headers/wtf/Ref.h:62:16: error: member access into incomplete type 'WebCore::HTMLImageElement'
62 | ptr->deref();
| ^
/builddir/build/BUILD/webkitgtk-2.46.1-build/webkitgtk-2.46.1/redhat-linux-build/webkitgtk-6.0/WTF/Headers/wtf/RefPtr.h:60:47: note: in instantiation of member function 'WTF::DefaultRefDerefTraits<WebCore::HTMLImageElement>::derefIfNotNull' requested here
60 | ALWAYS_INLINE ~RefPtr() { RefDerefTraits::derefIfNotNull(PtrTraits::exchange(m_ptr, nullptr)); }
| ^
/usr/bin/../lib/gcc/x86_64-redhat-linux/14/../../../../include/c++/14/variant:787:33: note: in instantiation of member function 'WTF::RefPtr<WebCore::HTMLImageElement>::~RefPtr' requested here
787 | template<typename _Ti> struct _Arr { _Ti _M_x[1]; };
| ^
/builddir/build/BUILD/webkitgtk-2.46.1-build/webkitgtk-2.46.1/Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.h:44:7: note: forward declaration of 'WebCore::HTMLImageElement'
44 | class HTMLImageElement;
| ^
This is messy to clean up because we need to include a lot of headers that are currently missing from forwarding headers for unknown reasons, so need to add a bunch of files to Headers.cmake. It seems there are a *lot* of headers missing from Headers.cmake. I will only add those required to make the build succeed for me.
I'm not finished yet.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
Pull request: https://github.com/WebKit/WebKit/pull/34508
Michael Catanzaro
Unfortunately all the headers need to be added to XCode as well.
Michael Catanzaro
Somebody who uses XCode will need to fix this. My pull request should be a good start, though.
Michael Catanzaro
Pull request: https://github.com/WebKit/WebKit/pull/35168
EWS
Committed 285146@main (bc1be22110c3): <https://commits.webkit.org/285146@main>
Reviewed commits have been landed. Closing PR #35168 and removing active labels.