Opened 4 years ago

Closed 4 years ago

#61650 closed defect (fixed)

webkit2-gtk @2.28.2_1+minibrowser+quartz fails to build on 10.15.7

Reported by: p-bro Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken)
Port: webkit2-gtk

Description

When migrating from High Sierra to Catalina (10.15.7), webkit2-gtk @2.28.2_1+minibrowser+quartz fails in the build stage with the error

In file included from DerivedSources/WebCore/JSMessageChannel.cpp:41:
DerivedSources/ForwardingHeaders/wtf/PointerPreparations.h:37:53: error: cannot initialize return object of type 'void *' with an rvalue of type 'const void *'
ALWAYS_INLINE void* getVTablePointer(T* o) { return __builtin_get_vtable_pointer(o); }
                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DerivedSources/WebCore/JSMessageEvent.cpp:460:33: note: in instantiation of function template specialization 'WTF::getVTablePointer<WebCore::MessageEvent>' requested here
    void* actualVTablePointer = getVTablePointer(impl.ptr());
                                ^
1 error generated.

Full build log from sudo port -d install webkit2-gtk +minibrowser+quartz is attached.

Attachments (1)

webkit2-gtk_build.log (4.5 MB) - added by p-bro 4 years ago.
Log from sudo port -d install webkit2-gtk +minibrowser+quartz

Change History (7)

Changed 4 years ago by p-bro

Attachment: webkit2-gtk_build.log added

Log from sudo port -d install webkit2-gtk +minibrowser+quartz

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: dbevans removed
Owner: set to dbevans
Status: newassigned

comment:2 Changed 4 years ago by p-bro

Downgrading Xcode to 11.7 and Command Line Tools to 11.5 (and selecting them with sudo xcode-select -s /Library/Developer/CommandLineTools/ ) allowed this package to compile. Thanks to Ryan Schmidt (@ryandesign) for his description of a solution in #61653. Leaving the bug open as this is not sustainable in the long run.

comment:3 Changed 4 years ago by kencu (Ken)

Most likely this has been fixed upstream already to compile with the newer compilers. It's been a while since I went at this port... it's a big job.

FYI -- you can often find a simpler way to build things with older or other versions of compilers by using the MacPorts-supplied line of llvm/clang compilers.

For this port, either clang-9.0 or clang-10 probably would have worked. Many people already have llvm-9.0 installed for one reason or another anyway, so you can do this if you like, instead of changing your Xcode around:

sudo port install clang-9.0
sudo port -v install webkit2-gtk configure.compiler=macports-clang-9.0

Now perhaps you don't mind moving your Xcode's around -- I find it very hard to keep track of what I left where, and mismatched Xcodes and CLTs can be a terrible mess. So this is a (probably easier) alternative.

For really old and unmaintained ports, sometimes going back to clang-5.0 is effective; I forget just now how far back clangs can go on Catalina.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 4 years ago by p-bro

Thanks Ken. I don't need XCode for anything but macports, so I don't mind keeping 11.7 around until all/most ports compile with 12. IMHO better than manually remembering to change the compiler whenever one of the packages needs recompiling.

comment:5 Changed 4 years ago by michaellass (Michael Lass)

The problem was fixed upstream quite a while ago and the fix should be included in version 2.3.0: https://bugs.webkit.org/show_bug.cgi?id=207871

For now, it can also be solved with a simple patch: https://github.com/macports/macports-ports/pull/9517

comment:6 Changed 4 years ago by Michael Lass <michael.lass@…>

Resolution: fixed
Status: assignedclosed

In 1c1282262ee807a0819c679c58dae0f98241fb75/macports-ports (master):

webkit2-gtk: fix build with XCode 12

Compilation fails with the following error:

DerivedSources/ForwardingHeaders/wtf/PointerPreparations.h:37:53: error: cannot initialize return object of type 'void *' with an rvalue of type 'const void *'
ALWAYS_INLINE void* getVTablePointer(T* o) { return builtin_get_vtable_pointer(o); }


This issue has been fixed in version 2.30.0. Until the package is
updated, it can be fixed with a simple patch obtained from
https://bugs.webkit.org/show_bug.cgi?id=207871

Fixes #61650

Note: See TracTickets for help on using tickets.