Bug 223577 - [GTK] X11 build fixes
Summary: [GTK] X11 build fixes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-22 08:35 PDT by Philippe Normand
Modified: 2021-03-24 04:01 PDT (History)
10 users (show)

See Also:


Attachments
Patch (7.40 KB, patch)
2021-03-22 08:40 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff
Patch (8.49 KB, patch)
2021-03-23 06:51 PDT, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2021-03-22 08:35:09 PDT
It is this time of the year when X11 macros leak everywhere again.
Comment 1 Philippe Normand 2021-03-22 08:40:31 PDT
Created attachment 423888 [details]
Patch
Comment 2 Philippe Normand 2021-03-22 11:39:54 PDT
EWS fails:

ThreadedCompositor.cpp:89:51: error: invalid ‘static_cast’ from type ‘uint64_t’ {aka ‘long unsigned int’} to type ‘GLNativeWindowType’ {aka ‘void*’}
Comment 3 Philippe Normand 2021-03-23 06:51:50 PDT
Created attachment 424013 [details]
Patch
Comment 4 EWS 2021-03-23 08:17:13 PDT
Committed r274869: <https://commits.webkit.org/r274869>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424013 [details].
Comment 5 Pablo Saavedra 2021-03-24 02:48:17 PDT
(In reply to Philippe Normand from comment #2)
> EWS fails:
> 
> ThreadedCompositor.cpp:89:51: error: invalid ‘static_cast’ from type
> ‘uint64_t’ {aka ‘long unsigned int’} to type ‘GLNativeWindowType’ {aka
> ‘void*’}

I'm getting a similar issue building wpewebkit (main) for ARMv7 (raspberry-pi using mesa driver). Based on https://bug-178090-attachments.webkit.org/attachment.cgi?id=323356 I have created a patch for this in https://bugs.webkit.org/show_bug.cgi?id=223684.
Comment 6 Philippe Normand 2021-03-24 03:00:10 PDT
Comment on attachment 424013 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424013&action=review

> Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:94
> +#if CPU(ADDRESS64)
> +    auto windowType = reinterpret_cast<GLNativeWindowType>(m_nativeSurfaceHandle);
> +#else
> +    // On 32-bit platforms GLNativeWindowType is an integer type, which cannot be casted with reinterpret_cast.
> +    auto windowType = static_cast<GLNativeWindowType>(m_nativeSurfaceHandle);
> +#endif

So this doesn't work for you?
Comment 7 Pablo Saavedra 2021-03-24 04:01:46 PDT
(In reply to Philippe Normand from comment #6)
> Comment on attachment 424013 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424013&action=review
> 
> > Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:94
> > +#if CPU(ADDRESS64)
> > +    auto windowType = reinterpret_cast<GLNativeWindowType>(m_nativeSurfaceHandle);
> > +#else
> > +    // On 32-bit platforms GLNativeWindowType is an integer type, which cannot be casted with reinterpret_cast.
> > +    auto windowType = static_cast<GLNativeWindowType>(m_nativeSurfaceHandle);
> > +#endif
> 
> So this doesn't work for you?

No. it doesn't works. you can see my proposal based on a previous solution did by Adrián in a previous patch.