Opened 7 months ago

Closed 6 hours ago

Last modified 6 hours ago

#73070 closed defect (fixed)

webkit2-gtk @2.28.2+minibrowser+x11: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]

Reported by: dmerget Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.11.5
Keywords: Cc: mascguy (Christopher Nielsen), SpikeLightfoot, djfitzgerald (Dan FitzGerald), kwolcott, drkp (Dan Ports)
Port: webkit2-gtk

Description

Building webkit2-gtk (a dependency of "meld") on Tahoe 26.0, Xcode 26.0.1, x86-64

Got multiple errors involving template keyword, such as:

:info:build /opt/local/var/macports/build/webkit2-gtk-613a20d1/work/webkitgtk-2.28.2/Source/JavaScriptCore/runtime/JSCast.h:150:33: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
:info:build   150 |     return Dispatcher::template inherits(vm, from);
:info:build       |                                 ^

Attachments (3)

main.log (1.9 MB) - added by dmerget 7 months ago.
main.2.log (1.9 MB) - added by maxrudolph (Max Rudolph) 5 months ago.
Build log on my system M2 macbook air running 26.0.1 with XCode 26.0.1
port_webkit2-gtk_build_from_source_failed.log.bz2 (59.4 KB) - added by kwolcott 4 months ago.
Mac mini, M5, Tahoe 26.2

Change History (14)

Changed 7 months ago by dmerget

Attachment: main.log added

comment:1 Changed 7 months ago by jmroot (Joshua Root)

Cc: mascguy added
Owner: set to dbevans
Status: newassigned

comment:2 Changed 7 months ago by SpikeLightfoot

Cc: SpikeLightfoot added

Changed 5 months ago by maxrudolph (Max Rudolph)

Attachment: main.2.log added

Build log on my system M2 macbook air running 26.0.1 with XCode 26.0.1

comment:3 Changed 5 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: djfitzgerald added
Summary: webkit2-gtk @2.28.2+minibrowser+x11: template argument list is expected [-Wmissing-template-arg-list-after-template-kw]webkit2-gtk @2.28.2+minibrowser+x11: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]

Has duplicate #73233.

comment:4 Changed 4 months ago by daviddrysdale (David Drysdale)

Potential workaround/fix is to edit the port file (sudo port edit webkit2-gtk) to disable the warning:

--- Portfile.orig	2025-12-15 18:20:50
+++ Portfile	2025-12-15 18:24:34
@@ -127,6 +127,7 @@
 
 # Reduce compilation warnings
 configure.cppflags-append \
+    -Wno-missing-template-arg-list-after-template-kw \
     -Wno-deprecated-declarations
 
 # it is preferred to use the WebKit built in bmalloc if it builds on a given os.

comment:5 Changed 4 months ago by kwolcott

Cc: kwolcott added

Changed 4 months ago by kwolcott

Mac mini, M5, Tahoe 26.2

comment:6 in reply to:  4 Changed 4 months ago by dmerget

Replying to daviddrysdale:

Potential workaround/fix is to edit the port file (sudo port edit webkit2-gtk) to disable the warning:

 configure.cppflags-append \
+    -Wno-missing-template-arg-list-after-template-kw \

I submitted this bug, and daviddrysdale's procedure works on my system. I was able to successfully compile webkit2-gtk (and meld) after applying this workaround. Thanks!

Do y'all think we should update the official portfile with this workaround, or would it be better for the owners of webkit2-gtk to change their code so that it no longer generates the warning? (Or both: daviddrysdale's WAR for the short term, and webkit2-gtk for the long term?)

comment:7 in reply to:  4 Changed 4 months ago by luigli

Replying to daviddrysdale:

Potential workaround/fix is to edit the port file (sudo port edit webkit2-gtk) to disable the warning:

--- Portfile.orig	2025-12-15 18:20:50
+++ Portfile	2025-12-15 18:24:34
@@ -127,6 +127,7 @@
 
 # Reduce compilation warnings
 configure.cppflags-append \
+    -Wno-missing-template-arg-list-after-template-kw \
     -Wno-deprecated-declarations
 
 # it is preferred to use the WebKit built in bmalloc if it builds on a given os.

It works on Mac Mini M4, Tahoe 26.2

Nice tip. Thanks!

Last edited 4 months ago by luigli (previous) (diff)

comment:8 Changed 3 weeks ago by ryandesign (Ryan Carsten Schmidt)

Usually, bugs should be reported to developers so they can be fixed. We can apply workarounds in our port but we don't want to be the sole keepers of fixes for other people's software.

However, our webkit2-gtk port is years out of date, so they probably don't want bug reports about something that old.

I was able to find that they fixed this problem two years ago. While that commit won't apply to our old version, the commit message explains the problem and how we can fix the code, if we want to fix our old version. Or we can ignore the warning for now, but warnings have a way of being promoted to errors in new compiler versions and ignoring them may have other consequences.

comment:9 Changed 12 days ago by qwertychouskie (QwertyChouskie)

Given how difficult updating the port seems to be as per the linked ticket, I don't think it makes sense to wait on a hypothetical update of the webkit2-gtk port. Just disabling the compiler warning will un-break the port (and the many ports that depend on it, directly or not) for now, so that seems like it should probably be done.

comment:10 Changed 6 hours ago by drkp (Dan Ports)

In a91e6f6697c396a88ec12edd6e9eef35c83e7c4d/macports-ports (master):

webkit2-gtk: disable compilation warning to fix build

See #73070

comment:11 Changed 6 hours ago by drkp (Dan Ports)

Cc: drkp added
Resolution: fixed
Status: assignedclosed

I applied that patch to disable the compilation warnings and fix the build for now. We may well want to update the port anyway, but there's no point in leaving it broken in the meantime.

(Feel free to reopen if you want to use this ticket to track subsequent updates or fixes.

Last edited 6 hours ago by drkp (Dan Ports) (previous) (diff)
Note: See TracTickets for help on using tickets.