Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#63877 closed defect (fixed)

qt5-qtwebkit fails to build with Xcode 13.1 Big Sur and Monterey 12.0.1

Reported by: 6aKa Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: jhoyt4, ballapete (Peter "Pete" Dyballa), hapaguy (Brian Kurt Fujikawa), i0ntempest
Port: qt5-qtwebkit

Description

Error: Failed to build qt5-qtwebkit: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebkit/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port wkhtmltopdf failed

Attachments (1)

main.log (5.0 MB) - added by 6aKa 3 years ago.
main.log

Change History (24)

Changed 3 years ago by 6aKa

Attachment: main.log added

main.log

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:2 Changed 3 years ago by jhoyt4

I'm seeing the same problem. From looking into the compile error, it looks like qt5-qtwebkit needs to be build with a non-c++11 compiler.

Alternatively, someone could patch all of the virtual function casts adding in an explicit override.

Similar too: https://github.com/lxqt/qterminal/issues/564

Last edited 3 years ago by jhoyt4 (previous) (diff)

comment:3 Changed 3 years ago by jhoyt4

Cc: jhoyt4 added

comment:4 Changed 3 years ago by jhoyt4

those warning were just a red herring.

I see that webkit is now up to 5.212 - it may be worth updating the portfile to build the more recent version. I imagine getting that working may take some time.

[edit] - webkit 5.212 changed a ton of things and switch to cmake - I decided to get 5.9.2 working instead.

Last edited 3 years ago by jhoyt4 (previous) (diff)

comment:5 Changed 3 years ago by jhoyt4

I believe the real culprit for qtwebkit 5.9.2 is (at least when trying with macports-clang-11 and Monterey's default clang...):

In file included from ../WTF/wtf/HashFunctions.h:24:
../WTF/wtf/RefPtr.h:62:35: error: no matching function for call to 'derefIfNotNull'
        ALWAYS_INLINE ~RefPtr() { derefIfNotNull(m_ptr); }
                                  ^~~~~~~~~~~~~~

Last edited 3 years ago by jhoyt4 (previous) (diff)

comment:6 Changed 3 years ago by jhoyt4

or possibly this:

loader/FrameLoader.cpp:130:10: warning: non-portable path to file '"archive.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "Archive.h"
         ^~~~~~~~~~~
         "archive.h"

comment:7 Changed 3 years ago by jhoyt4

I got further by patching Archive.h to archive/Archive.h. Then I ran into this nasty bit:

/opt/local/bin/clang++-mp-11 -c -pipe -stdlib=libc++ -I/opt/local/include -Wno-inconsistent-missing-override -Wno-null-dereference -Wno-undefined-bool-conversion -Wno-implicit-int-float-conversion -Werror=nonportable-include-path -Werror=nonportable-system-include-path -iwithsysroot /usr/include/libxslt -iwithsysroot /usr/include/libxml2 -fno-strict-aliasing -Os -fPIC -std=gnu++11  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=12.0 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -MD -DQT_NO_LINKED_LIST -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -DBUILDING_QT__=1 -DNDEBUG -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=1 -DENABLE_BLOB=1 -DENABLE_CANVAS_PATH=1 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=1 -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_IMAGE_SET=1 -DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHAPES=1 -DENABLE_CSS_STICKY_POSITION=1 -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_DATALIST_ELEMENT=1 -DENABLE_DETAILS_ELEMENT=1 -DENABLE_DEVICE_ORIENTATION=1 -DENABLE_DOWNLOAD_ATTRIBUTE=1 -DENABLE_FAST_MOBILE_SCROLLING=1 -DENABLE_FILTERS=1 -DENABLE_FTPDIR=1 -DENABLE_FULLSCREEN_API=1 -DENABLE_GEOLOCATION=1 -DENABLE_GESTURE_EVENTS=1 -DENABLE_ICONDATABASE=1 -DENABLE_IFRAME_SEAMLESS=1 -DENABLE_INDEXED_DATABASE=1 -DENABLE_INPUT_TYPE_COLOR=1 -DENABLE_INSPECTOR=1 -DENABLE_INSPECTOR_SERVER=1 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_LEGACY_NOTIFICATIONS=1 -DENABLE_LEGACY_VIEWPORT_ADAPTION=1 -DENABLE_LEGACY_VENDOR_PREFIXES=1 -DENABLE_LEGACY_WEB_AUDIO=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_METER_ELEMENT=1 -DENABLE_MHTML=1 -DENABLE_NOTIFICATIONS=1 -DENABLE_ORIENTATION_EVENTS=1 -DENABLE_PAGE_VISIBILITY_API=1 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_RESOLUTION_MEDIA_QUERY=1 -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_SHARED_WORKERS=1 -DENABLE_SMOOTH_SCROLLING=1 -DENABLE_SQL_DATABASE=1 -DENABLE_SUBPIXEL_LAYOUT=1 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_TOUCH_ADJUSTMENT=1 -DENABLE_TOUCH_EVENTS=1 -DENABLE_TOUCH_SLIDER=1 -DENABLE_VIDEO_TRACK=1 -DENABLE_VIEW_MODE_CSS_MEDIA=1 -DENABLE_WEB_SOCKETS=1 -DENABLE_WEB_TIMING=1 -DENABLE_WORKERS=1 -DENABLE_XHR_TIMEOUT=1 -DWTF_USE_TILED_BACKING_STORE=1 -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1 -DHAVE_QTQUICK=1 -DHAVE_QTPRINTSUPPORT=1 -DHAVE_QSTYLE=1 -DHAVE_QTTESTLIB=1 -DHAVE_QTPOSITIONING=1 -DHAVE_QTSENSORS=1 -DWTF_USE_LIBXML2=1 -DENABLE_XSLT=1 -DWTF_USE_ZLIB=1 -DWTF_USE_WEBP=1 -DWTF_USE_SYSTEM_LEVELDB=1 -DWTF_USE_LIBJPEG=1 -DWTF_USE_LIBPNG=1 -DENABLE_NETSCAPE_PLUGIN_API=1 -DPLUGIN_ARCHITECTURE_UNSUPPORTED=1 -DWTF_USE_3D_GRAPHICS=1 -DENABLE_WEBGL=1 -DENABLE_VIDEO=1 -DWTF_USE_QT_MULTIMEDIA=1 -DHAVE_SQLITE3=1 -DWTF_USE_GRAPHICS_SURFACE=1 -DWTF_USE_LEVELDB=1 -DENABLE_BATTERY_STATUS=0 -DENABLE_CANVAS_PROXY=0 -DENABLE_CSP_NEXT=0 -DENABLE_CSS_GRID_LAYOUT=0 -DENABLE_CSS_HIERARCHIES=0 -DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=0 -DENABLE_CSS_SHADERS=0 -DENABLE_CSS_VARIABLES=0 -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=0 -DENABLE_CSS3_TEXT_LINE_BREAK=0 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_DATAGRID=0 -DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_GAMEPAD=0 -DENABLE_HIGH_DPI_CANVAS=0 -DENABLE_INPUT_SPEECH=0 -DENABLE_INPUT_TYPE_DATE=0 -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0 -DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0 -DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 -DENABLE_MATHML=0 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_MEDIA_STREAM=0 -DENABLE_MICRODATA=0 -DENABLE_MOUSE_CURSOR_SCALE=0 -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETWORK_INFO=0 -DENABLE_NOSNIFF=0 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0 -DENABLE_RESOURCE_TIMING=0 -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_SECCOMP_FILTERS=0 -DENABLE_SHADOW_DOM=0 -DENABLE_STYLE_SCOPED=0 -DENABLE_TEMPLATE_ELEMENT=0 -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_USER_TIMING=0 -DENABLE_VIBRATION=0 -DENABLE_WEB_AUDIO=0 -DSTATICALLY_LINKED_WITH_ANGLE -DSTATICALLY_LINKED_WITH_JavaScriptCore -DSTATICALLY_LINKED_WITH_WTF -DBUILDING_WebCore -DBUILDING_WEBKIT -DQT_ASCII_CAST_WARNINGS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_SQL_LIB -DQT_SENSORS_LIB -DQT_CORE_LIB -I. -I. -IModules/filesystem -IModules/geolocation -IModules/indexeddb -IModules/mediasource -IModules/navigatorcontentutils -IModules/notifications -IModules/proximity -IModules/quota -IModules/webaudio -IModules/webdatabase -IModules/websockets -Iaccessibility -Ibindings -Ibindings/generic -Ibridge -Ibridge/qt -Icss -Idom -Idom/default -Iediting -Ifileapi -Ihistory -Ihtml -Ihtml/canvas -Ihtml/forms -Ihtml/parser -Ihtml/shadow -Ihtml/track -Iinspector -Iloader -Iloader/appcache -Iloader/archive -Iloader/cache -Iloader/icon -Imathml -Ipage -Ipage/animation -Ipage/qt -Ipage/scrolling -Ipage/scrolling/coordinatedgraphics -Iplatform -Iplatform/animation -Iplatform/audio -Iplatform/graphics -Iplatform/graphics/cpu/arm -Iplatform/graphics/cpu/arm/filters -Iplatform/graphics/filters -Iplatform/graphics/filters/texmap -Iplatform/graphics/opengl -Iplatform/graphics/opentype -Iplatform/graphics/qt -Iplatform/graphics/surfaces -Iplatform/graphics/texmap -Iplatform/graphics/texmap/coordinated -Iplatform/graphics/transforms -Iplatform/image-decoders -Iplatform/image-decoders/bmp -Iplatform/image-decoders/ico -Iplatform/image-decoders/gif -Iplatform/image-decoders/jpeg -Iplatform/image-decoders/png -Iplatform/image-decoders/webp -Iplatform/leveldb -Iplatform/mock -Iplatform/network -Iplatform/network/qt -Iplatform/qt -Iplatform/sql -Iplatform/text -Iplatform/text/transcoder -Iplugins -Irendering -Irendering/mathml -Irendering/shapes -Irendering/style -Irendering/svg -Istorage -Isvg -Isvg/animation -Isvg/graphics -Isvg/graphics/filters -Isvg/properties -Itesting -I/opt/local/var/macports/build/_Users_jhoyt_macports_ports_aqua_qt5/qt5-qtwebkit/work/qtwebkit-opensource-src-5.9.2/Source/WebCore/websockets -Iworkers -Ixml -Ixml/parser -I../ThirdParty -Ibridge/jsc -Ibindings/js -Ibridge/c -Itesting/js -Igenerated -Iplatform/mac -Iplatform/graphics/gpu -Iplatform/graphics/gpu -Iloader/archive/mhtml -I../../Source -I../include -I../ThirdParty/ANGLE/include/GLSLANG -I../ThirdParty/ANGLE/include/KHR -I../JavaScriptCore -I../../Source -I../WTF -I../JavaScriptCore/assembler -I../JavaScriptCore/bytecode -I../JavaScriptCore/bytecompiler -I../JavaScriptCore/heap -I../JavaScriptCore/dfg -I../JavaScriptCore/debugger -I../JavaScriptCore/disassembler -I../JavaScriptCore/interpreter -I../JavaScriptCore/jit -I../JavaScriptCore/llint -I../JavaScriptCore/parser -I../JavaScriptCore/profiler -I../JavaScriptCore/runtime -I../JavaScriptCore/tools -I../JavaScriptCore/yarr -I../JavaScriptCore/API -I../JavaScriptCore/ForwardingHeaders -I../JavaScriptCore/generated -I/opt/local/var/macports/build/_Users_jhoyt_macports_ports_aqua_qt5/qt5-qtwebkit/work/qtwebkit-opensource-src-5.9.2/Source/JavaScriptCore/generated/LLIntOffsetsExtractor -I../JavaScriptCore/generated/release -I../WTF -I/opt/local/include -I/opt/local/libexec/qt5/lib/QtGui.framework/Headers/5.15.2 -I/opt/local/libexec/qt5/lib/QtGui.framework/Headers/5.15.2/QtGui -I/opt/local/libexec/qt5/lib/QtMultimedia.framework/Headers -I/opt/local/libexec/qt5/lib/QtGui.framework/Headers -I/opt/local/libexec/qt5/lib/QtNetwork.framework/Headers -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.15.2 -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.15.2/QtCore -I/opt/local/libexec/qt5/lib/QtSensors.framework/Headers -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers -I.moc -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -I/opt/local/libexec/qt5/mkspecs/macx-clang -F/opt/local/libexec/qt5/lib -o .obj/rendering/svg/RenderSVGAllInOne.o rendering/svg/RenderSVGAllInOne.cpp
In file included from platform/text/mac/StringImplMac.mm:25:
In file included from ../WTF/wtf/RetainPtr.h:34:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:12:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSBundle.h:91:143: error: function does not return NSString
- (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1) NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
                                                         ~~~~~~~~~~~~~~                                                                       ^                  ~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:103:48: note: expanded from macro 'NS_FORMAT_ARGUMENT'
        #define NS_FORMAT_ARGUMENT(A) __attribute__ ((format_arg(A)))
                                                      ^          ~

Other sites suggest adding "-DNS_FORMAT_ARGUMENT(A)" to the build, but I haven't figure out how to do that as yes (happy to get a pointer to the solution :) )

Example 1: https://youtrack.jetbrains.com/issue/KT-48807
Example 2: https://community.sonarsource.com/t/sonar-failing-with-xcode-13/50819
Example 3: https://discuss.kotlinlang.org/t/library-from-swift-cinterop-doesnt-compile-with-xcode-13/23021/3

Last edited 3 years ago by jhoyt4 (previous) (diff)

comment:8 Changed 3 years ago by jhoyt4

This seems to have gotten me past the NSString issue

configure.cppflags-append \
                    '-DNS_FORMAT_ARGUMENT\(A\)=' \
                    -D_Nullable_result=_Nullable

I'll be cleaning up my work and issuing a Pull Request shortly.

comment:10 Changed 3 years ago by jhoyt4

@6aKa - its been noted on my pull request that this bug is also resident on Big Sur when running Xcode 13.1. Can you modify the summary line (I don't have the right permissions) to "qt5-qtwebkit fails to build with Xcode 13.1 Big Sur and Monterey 12.0.1"

comment:11 Changed 3 years ago by 6aKa

Summary: qt5-qtwebkit fails to build on Monterey 12.0.1qt5-qtwebkit fails to build with Xcode 13.1 Big Sur and Monterey 12.0.1

comment:12 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:13 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

I have a similar failure when I try to build NS variant of GNU Emacs 28.0.90 outside of MacPorts. I configure with LDFLAGS=-v -arch x86_64 -Wl,-bind_at_load -Wl,-t and can see which C header files are used. With Xcode 13 installed I can clearly see that configuration stops when usability of AppKit/AppKit.h is checked. When I tell configure to first search /usr/bin and some time later /opt/local/bin (by using env PATH=…) configuration succeeds because macOS' Clang 13 is used. The cause of at least my failure is that MacPorts' Clang 11 uses C header files from Xcode 13. This certainly cannot work.

comment:14 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Sorry, I made a mistake and copied the wrong text: It is CFLAGS=-H that makes the compilers list which C header files they are including.

comment:15 Changed 3 years ago by jhoyt4

I've noticed that a prebuilt qt5-qtwebkit is now available so I've closed my long open PR to resolve this issue.

comment:16 Changed 3 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added

comment:17 Changed 2 years ago by i0ntempest

Cc: i0ntempest added

comment:18 Changed 2 years ago by i0ntempest

This is still a problem. From my testing looks like these are enough to make it build successfully:

configure.cppflags-delete "-I${prefix}/include"
configure.cxxflags-delete "-I${prefix}/include"
configure.cflags-delete "-I${prefix}/include"

comment:19 Changed 2 years ago by jhoyt4

For those trying to get this building on ARM64 / Ventura, i0ntempest's solution seems to work there as well

comment:20 Changed 2 years ago by ostefano (Stefano Ortolani)

Confirming that is still an issue since qt5-qtwebkit is not prebuilt on Ventura.

comment:21 Changed 2 years ago by jhoyt4

@ostefano - I've issued a new PR that applies @i0ntempest's suggested fix https://github.com/macports/macports-ports/pull/16890.

I've tested it on both intel and arm without issues and am able to use webkit.

I'd suggest giving that PR a try and let me know if it doesn't work for you as it can be updated.

comment:22 Changed 2 years ago by jhoyt4

Resolution: fixed
Status: assignedclosed

In 8b528349a8adb591352e8a81ec884764c7bb8e65/macports-ports (master):

qt5-qtwebkit: Fix build for Big Sur, Monterey, and Ventura with header conflicts

On case insensitive file systems, the include search path picks up header files from
macports before the local header files causing an error while compiling. This
modification places flags the known conflicting ports with conflicts_build.

Closes: #63877
Closes: #62027
Closes: #66177
Closes: #63566

[skip ci]

fun

comment:23 Changed 2 years ago by jhoyt4

to get this installed while a more permanent fix is identified do the following:

sudo port -f deactivate libarchive ruby31 ruby30 libevent
sudo port install qt5-qtwebkit
sudo port -f activate libarchive ruby31 ruby30 libevent

Depending on what is installed on your system, you may need to adjust the deactivate/reactivate commands.

Note: See TracTickets for help on using tickets.