Opened 7 years ago

Closed 7 years ago

#54798 closed defect (fixed)

webkit2-gtk +quartz build fails with many compiler errors

Reported by: Polyergic (Shad Sterling) Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: dbevans (David B. Evans)
Port: webkit2-gtk

Description

port upgrade outdated was failing because Error: Failed to archivefetch webkit2-gtk: gtk3 must be installed with +x11. It seems that somewhere buried in the dependency tree something switched to webkit2-gtk, and gtk3 was already installed with +quartz rather than +x11. The natural solution seems to be to install webkit2-gtk +quartz, but that won't build.

There are tens of compiler errors, none jumped out at me as the key error; other updates built successfully so I'm pretty sure it's not something like an xcode update breaking everything.

Attachments (1)

main.log (788.4 KB) - added by Polyergic (Shad Sterling) 7 years ago.

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by Polyergic (Shad Sterling)

Attachment: main.log added

comment:1 Changed 7 years ago by kencu (Ken)

Somewhat strange errors. I guess I'm in this based on the last PR to this, but I don't at this moment see that this has to do with the recent changes <https://github.com/macports/macports-ports/pull/686/files> we made in the webkit2-gtk-* ports to support building on older systems. None of that seems to be pulled in (as it shouldn't).

4216	:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.14.2/Source/WTF/wtf/StdLibExtras.h:154:14: error: expected ';' at end of declaration
4217	:info:build     ToType to{ };
4218	:info:build              ^
4219	:info:build              ;

and

4289	:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.14.2/Source/WTF/wtf/Atomics.h:29:
4290	:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/atomic:543:2: error: <atomic> is not implemented
4291	:info:build #error <atomic> is not implemented
4292	:info:build  ^

I will try building it again on Sierra and see. Sincerely hope it's not my bad.

comment:2 Changed 7 years ago by mf2k (Frank Schima)

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

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

I just got the same error, and so I tried building the last Portfile prior to the recent PR, and got the same error as the OP again. So it doesn't appear to be the recent PR, but something else ...

Adding -std=c++11 led to different errors, and no success.

Removing that, and blacklisting {clang < 900} results in MacPorts building webkit2-gtk with macports-clang-3.9, and that works:

$ port -v installed webkit2-gtk
The following ports are currently installed:
  webkit2-gtk @2.14.2_2+quartz (active) platform='darwin 16' archs='x86_64' date='2017-09-10T11:09:04-0700'
Last edited 7 years ago by kencu (Ken) (previous) (diff)

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

With the current Portfiles in MacPorts tree (including the latest PRs) I found the following on Sierra Xcode 8.3:

webkit2-gtk (either +quartz or not) does not build with the system clang, giving the errors such as no type named 'make_index_sequence' in namespace 'std' as previously noted in the Portfile with other clangs. It does however build with macport-clang-3.9 (and likely others as it builds with clang-4.0 on other systems).

webkit2-gtk-devel +quartz does build on Sierra with the system clang.

To the OP, for right now you can install webkit2-gtk-devel +quartz to solve your dependency issue, or install a newer clang such as sudo port -v install clang-3.9 and built webkit2-gtk with that sudo port -v install webkit2-gtk +quartz configure.compiler=macports-clang-3.9

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

comment:5 Changed 7 years ago by kencu (Ken)

Ah. A more appropriate fix is this:

configure.cxxflags-append -std=c++14

which, when added to the webkit2-gtk @2.14.2 portfile, fixes the build using the system clang on Sierra (and maybe some of those other previous clangs that wouldn't build it as well).

comment:6 Changed 7 years ago by Polyergic (Shad Sterling)

Installing webkit2-gtk-devel +quartz doesn't solve it; it leads to the message Error: Can't install webkit2-gtk because conflicting ports are active: webkit2-gtk-devel

comment:7 Changed 7 years ago by kencu (Ken)

yeah, well, that is true. please uninstall webkit2-gtk-devel first.

comment:8 Changed 7 years ago by Polyergic (Shad Sterling)

I was trying to follow the first suggestion in comment 4, which says installing the -devel package will satisfy the dependency. It doesn't.

The suggestion in comment 5 also doesn't work. Errors include this:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.14.2/Source/WTF/wtf/TypeCasts.h:80:5: error: use of undeclared identifier 'static_assert'
:info:build     static_assert(std::is_base_of<Source, Target>::value, "Should be a downcast");
:info:build     ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.14.2/Source/WTF/wtf/TypeCasts.h:87:57: error: to
o many arguments provided to function-like macro invocation
:info:build     static_assert(!std::is_same<Source, Target>::value, "Unnecessary cast to same type");
:info:build                                                         ^
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__config:729:12: note: macro 'static_assert' defined here
:info:build #   define static_assert(__b, __m) _Static_assert(__b, __m)
:info:build            ^

The second suggestion in comment 4 seems to have worked. Do I understand right that if that fix is included in the next update I won't have to do this again myself?

comment:9 in reply to:  8 Changed 7 years ago by kencu (Ken)

glad to hear one of the suggestions worked for you,

ports are mean to be satisfied by either webkit2-gtk or webkit2-gtk-devel ; if you can recall which one wouldn't accept the -devel version I can probably fix that.

adding -std=c++14 did work for me on Sierra, but the compilers just updated again, and perhaps things there have changed.

comment:10 Changed 7 years ago by Polyergic (Shad Sterling)

port uninstall webkit2-gtk now complains that The following ports will break: liferea @1.12-rc3_0

If you can't trust the apple compilers to stay compatible, wouldn't it be better to have the distributed Portfile configured to use one of the macports compilers?

comment:11 Changed 7 years ago by kencu (Ken)

retesting Sierra, adding -std=c++14 works to fix it for me. It's also reported to work on High Sierra, I'll go ahead and add that to the Portfile. Not sure how to explain why it didn't work for the OP.

comment:12 Changed 7 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 3f759c8b29e91bc64b0a397fa67dbd1f60f31600/macports-ports:

webkit2-gtk: add std=c++14 to fix build with newer clangs

closes: #54798
closes: #54928

Note: See TracTickets for help on using tickets.