#66219 closed defect (fixed)

qt5-qtwebengine @5.15.11_0: does not build in macOS 10.14 (Mojave)

Reported by: JD-Veiga Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: Cc: kencu (Ken), StanSanderson, someuser12, cooljeanius (Eric Gallager), dliessi (Davide Liessi)
Port: qt5-qtwebengine

Description

Hi,

I cannot build qt5-qtwebengine@5.15.11_0 in macOS 10.14 (Mojave).

According to log:

ninja: build stopped: subcommand failed.
make[3]: *** [run_ninja] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src/core'
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src/core'
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src'
make: *** [sub-src-make_first] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts" && /usr/bin/make -j2 -w 
Exit code: 2
Error: Failed to build qt5-qtwebengine: command execution failed

I have attached a incomplete log since real log file is huge. I hope that it will be useful anyway.

Thank you.

Attachments (1)

main.log.txt (103.3 KB) - added by JD-Veiga 18 months ago.

Download all attachments as: .zip

Change History (18)

Changed 18 months ago by JD-Veiga

Attachment: main.log.txt added

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

Cc: kencu added; mcalhoun@… removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:2 Changed 18 months ago by kencu (Ken)

this error has been recently fixed.

please try this

sudo port clean qt5-qtwebengine
sudo port selfupdste
sudo port -v install qt5-qtwebengine

and pls report back success or failure.

comment:3 Changed 18 months ago by JD-Veiga

I am afraid that it is not working in my case.

I followed your instructions and got exactly the same error --though I am upgrading, not installing.

[22111/23845] ../../../../../../../../../../../../Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -MMD -MF obj/third_party/blink/renderer/core/editing/editing/editing_jumbo_17.o.d -DOFFICIAL_BUILD -DTOOLKIT_QT -D_LIBCPP_HAS_NO_ALIGNED_ALLOCATION -DCR_XCODE_VERSION=1131 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBLINK_CORE_IMPLEMENTATION=1 -DWEBP_EXTERN=extern -DUSE_EGL -DBLINK_IMPLEMENTATION=1 -DINSIDE_BLINK -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_ENABLE_TRACING=1 -DU_ENABLE_RESOURCE_TRACING=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -DWEBRTC_USE_BUILTIN_ISAC_FIX=0 -DWEBRTC_USE_BUILTIN_ISAC_FLOAT=1 -DHAVE_SCTP -DNO_MAIN_THREAD_WRAPPING -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DSK_CODEC_DECODES_PNG -DSK_CODEC_DECODES_WEBP -DSK_ENCODE_PNG -DSK_ENCODE_WEBP -DSK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\" -DSK_GL -DSK_CODEC_DECODES_JPEG -DSK_ENCODE_JPEG -DSK_USE_LIBGIFCODEC -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_MAC -DSK_METAL -DANGLE_USE_ABSEIL -DABSL_ALLOCATOR_NOTHROW=1 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_REVERSE_JSARGS -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DSUPPORT_WEBGL2_COMPUTE_CONTEXT=1 -DUSE_BLINK_V8_BINDING_NEW_IDL_INTERFACE -DUSE_LIBJPEG_TURBO=1 -DV8_COMPRESS_POINTERS -DV8_31BIT_SMIS_ON_64BIT_ARCH -DV8_DEPRECATION_WARNINGS -DV8_REVERSE_JSARGS -DLIBXSLT_STATIC -I. -Igen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../../3rdparty/chromium/third_party/libyuv/include -I../../3rdparty/chromium/third_party/jsoncpp/source/include -I../../3rdparty/chromium/third_party/libwebp/src -I../../3rdparty/chromium/third_party/khronos -I../../3rdparty/chromium/gpu -Igen/third_party/dawn/src/include -I../../3rdparty/chromium/third_party/dawn/src/include -I../../3rdparty/chromium/third_party/abseil-cpp -I../../3rdparty/chromium/third_party/boringssl/src/include -I../../3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -I../../3rdparty/chromium/third_party/ced/src -I../../3rdparty/chromium/third_party/icu/source/common -I../../3rdparty/chromium/third_party/icu/source/i18n -I../../3rdparty/chromium/third_party/webrtc_overrides -I../../3rdparty/chromium/third_party/webrtc -Igen/third_party/webrtc -I../../3rdparty/chromium/third_party/protobuf/src -I../../3rdparty/chromium/third_party/skia -I../../3rdparty/chromium/third_party/libgifcodec -I../../3rdparty/chromium/third_party/angle/include -I../../3rdparty/chromium/third_party/angle/src/common/third_party/base -I../../3rdparty/chromium/third_party/abseil-cpp -Igen/angle -I../../3rdparty/chromium/third_party/angle/include -I../../3rdparty/chromium/v8/include -Igen/v8/include -I../../3rdparty/chromium/third_party/mesa_headers -I../../3rdparty/chromium/third_party/libwebm/source -I../../3rdparty/chromium/third_party/leveldatabase -I../../3rdparty/chromium/third_party/leveldatabase/src -I../../3rdparty/chromium/third_party/leveldatabase/src/include -I../../3rdparty/chromium/third_party/libjpeg_turbo -I../../3rdparty/chromium/third_party/iccjpeg -I../../3rdparty/chromium/third_party/libpng -I../../3rdparty/chromium/third_party/zlib -I../../3rdparty/chromium/third_party/ots/include -I../../3rdparty/chromium/v8/include -Igen/v8/include -I../../3rdparty/chromium/third_party/libxml/src/include -I../../3rdparty/chromium/third_party/libxml/mac/include -I../../3rdparty/chromium/third_party/libxslt/src -I../../3rdparty/chromium/third_party/snappy/src -I../../3rdparty/chromium/third_party/snappy/mac -fno-strict-aliasing -fstack-protector -Wno-unknown-attributes -Wno-unknown-pragmas -Wno-unknown-warning-option -fcolor-diagnostics -fmerge-all-constants -arch x86_64 -Wall -Wextra -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wimplicit-fallthrough -Wunreachable-code -Wthread-safety -Wextra-semi -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wno-max-tokens -fno-omit-frame-pointer -isysroot ../../../../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -O2 -g0 -Wno-unused-variable -Wconversion -Wno-float-conversion -Wno-sign-conversion -Wno-implicit-float-conversion -Wno-implicit-int-conversion -Wno-enum-float-conversion -Wno-shorten-64-to-32 -DLIBXML_STATIC= -Wno-parentheses-equality -Wno-tautological-compare -Wno-thread-safety-attributes -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=c++14 -fno-trigraphs -Wno-trigraphs -stdlib=libc++ -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wno-deprecated-declarations -c gen/third_party/blink/renderer/core/editing/editing_jumbo_17.cc -o obj/third_party/blink/renderer/core/editing/editing/editing_jumbo_17.o
ninja: build stopped: subcommand failed.
make[3]: *** [run_ninja] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src/core'
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src/core'
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts/src'
make: *** [sub-src-make_first] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtwebengine/work/qtwebengine-5.15.11-lts" && /usr/bin/make -j2 -w 
Exit code: 2
Error: Failed to build qt5-qtwebengine: command execution failed

Last edited 18 months ago by JD-Veiga (previous) (diff)

comment:4 Changed 18 months ago by kencu (Ken)

Thanks for doing that. I see now that the error you are getting is a variation on what was fixed:

:info:build ./../../3rdparty/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc:633:10: error: variable has incomplete type 'CGRect'
:info:build   CGRect r = FindInPageRectFromRange(EphemeralRange(ActiveMatch()));
:info:build          ^
:info:build ../../3rdparty/chromium/ui/gfx/geometry/rect.h:29:16: note: forward declaration of 'CGRect'
:info:build typedef struct CGRect CGRect;
:info:build                ^
:info:build In file included from gen/third_party/blink/renderer/core/editing/editing_jumbo_9.cc:7:
:info:build ./../../3rdparty/chromium/third_party/blink/renderer/core/editing/finder/text_finder.cc:646:10: error: variable has incomplete type 'CGRect'
:info:build   CGRect r = match.rect_;
:info:build          ^
:info:build ../../3rdparty/chromium/ui/gfx/geometry/rect.h:29:16: note: forward declaration of 'CGRect'
:info:build typedef struct CGRect CGRect;
:info:build                ^

and yet, not building on Mojave. I'll have to sit down with my Mojave system and see how to fix that without breaking the newer systems in the process...

comment:5 Changed 18 months ago by rufty (Bill Hill)

Couldn't get this to build on 10.13.6 either.

comment:6 Changed 18 months ago by pietvo (Pieter van Oostrum)

Same problem on Catalina macOS 10.15.7 19H2026 x86_64 Xcode 12.4 12D4e

comment:7 Changed 18 months ago by kencu (Ken)

making this change fixes the build on Mojave, but breaks the build on Monterey with Xcode 14.1 with the ambiguous constructor problem, hah hah:

$ git diff
diff --git a/aqua/qt5/Portfile b/aqua/qt5/Portfile
index ac20dc89602..7b16f822c2e 100644
--- a/aqua/qt5/Portfile
+++ b/aqua/qt5/Portfile
@@ -683,7 +683,7 @@ array set modules {
         {"Qt WebEngine"}
         "very large and relatively new"
         "variant overrides: "
-        "revision 0"
+        "revision 1"
         "License: "
     }
     qtwebglplugin {
diff --git a/aqua/qt5/files/patch-qt5-qtwebengine-RectF-ambiguous.diff b/aqua/qt5/files/patch-qt5-qtwebengine-RectF-ambiguous.diff
index bd303877741..9a72468cd85 100644
--- a/aqua/qt5/files/patch-qt5-qtwebengine-RectF-ambiguous.diff
+++ b/aqua/qt5/files/patch-qt5-qtwebengine-RectF-ambiguous.diff
@@ -8,7 +8,7 @@ index e41a894fc..be79bf7cf 100644
  
 -  return gfx::RectF(FindInPageRectFromRange(EphemeralRange(ActiveMatch())));
 +//  return gfx::RectF(FindInPageRectFromRange(EphemeralRange(ActiveMatch())));
-+  CGRect r = FindInPageRectFromRange(EphemeralRange(ActiveMatch()));
++  FloatRect r = FindInPageRectFromRange(EphemeralRange(ActiveMatch()));
 +  return gfx::RectF(r);
 +
  }
@@ -20,7 +20,7 @@ index e41a894fc..be79bf7cf 100644
      DCHECK(!match.rect_.IsEmpty());
 -    match_rects.push_back(match.rect_);
 +//    match_rects.push_back(match.rect_);
-+  CGRect r = match.rect_;
++  FloatRect r = match.rect_;
 +  match_rects.push_back(r);
 +
    }
@@ -36,7 +36,7 @@ index 48d06120e..e7963b327 100644
      return float_rect;
 -  return FloatRect(widget->BlinkSpaceToDIPs(gfx::RectF(float_rect)));
 +//  return FloatRect(widget->BlinkSpaceToDIPs(gfx::RectF(float_rect)));
-+  CGRect r = float_rect;
++  FloatRect r = float_rect;
 +  return FloatRect(widget->BlinkSpaceToDIPs(gfx::RectF(r)));
  }
  
@@ -51,7 +51,7 @@ index f7a348c81..45de8d332 100644
    offset_container = WebAXObject(container);
 -  bounds_in_container = gfx::RectF(bounds);
 +  //bounds_in_container = gfx::RectF(bounds);
-+  CGRect r = bounds;
++  FloatRect r = bounds;
 +  bounds_in_container = gfx::RectF(r);
  }
  

I really don't like having a patch that is conditional on the Xcode (/clang) version. That is just bad.

Maybe we can find out instead why Mojave is not seeing a definition for CGRect; that might be a nice fix for this.

Seems very odd that Monterey+ see such a definition, but Mojave and Catalina do not.... what's up with that?

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:8 Changed 18 months ago by StanSanderson

Cc: StanSanderson added

comment:9 Changed 18 months ago by pietvo (Pieter van Oostrum)

I got it working on Catalina 10.15.7 Xcode 12.4 with the following patch, which probably has to be brought into Portfile compatible format.

diff -u src/3rdparty/chromium/ui/gfx/geometry/rect.h.\~1\~ src/3rdparty/chromium/ui/gfx/geometry/rect.h
--- src/3rdparty/chromium/ui/gfx/geometry/rect.h.~1~
+++ src/3rdparty/chromium/ui/gfx/geometry/rect.h
@@ -26,6 +26,7 @@
 #if defined(OS_WIN)
 typedef struct tagRECT RECT;
 #elif defined(OS_APPLE)
+#include <CoreGraphics/CoreGraphics.h>
 typedef struct CGRect CGRect;
 #endif
 

And actually, this should be done upstream.

Last edited 18 months ago by pietvo (Pieter van Oostrum) (previous) (diff)

comment:10 Changed 18 months ago by kencu (Ken)

looks good, trivial header addition, can’t see why that should break Ventura but will check.

This port is touchy! All this code has been removed upstream from newer chromium versions.

qt did not appear too interested in this error in the open ticket on it, last I looked. They suggested upgrade to newer version.

Last edited 18 months ago by kencu (Ken) (previous) (diff)

comment:11 Changed 18 months ago by someuser12

Cc: someuser12 added

comment:12 Changed 18 months ago by kencu (Ken)

homebrew's fix looks a lot like the one that was suggested in the other ticket recently. Someone could test this one.

https://raw.githubusercontent.com/Homebrew/formula-patches/405b6b7ca7b95860ee70368076382b171a1c66f4/qt5/qt5-webengine-xcode14.diff

comment:13 in reply to:  9 Changed 17 months ago by JD-Veiga

I was able to build qt5-qtwebengine@5.15.11_0 in macOS 10.14.6 Xcode 11.3.1 (11C504) with the patch provided by pietvo:

I got it working on Catalina 10.15.7 Xcode 12.4 with the following patch, which probably has to be brought into Portfile compatible format.

diff -u src/3rdparty/chromium/ui/gfx/geometry/rect.h.\~1\~ src/3rdparty/chromium/ui/gfx/geometry/rect.h
--- src/3rdparty/chromium/ui/gfx/geometry/rect.h.~1~
+++ src/3rdparty/chromium/ui/gfx/geometry/rect.h
@@ -26,6 +26,7 @@
 #if defined(OS_WIN)
 typedef struct tagRECT RECT;
 #elif defined(OS_APPLE)
+#include <CoreGraphics/CoreGraphics.h>
 typedef struct CGRect CGRect;
 #endif
 

And actually, this should be done upstream.

comment:14 Changed 17 months ago by pietvo (Pieter van Oostrum)

comment:15 Changed 17 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:16 Changed 17 months ago by dliessi (Davide Liessi)

Cc: dliessi added

comment:17 Changed 17 months ago by pietvo (Pieter van Oostrum)

Resolution: fixed
Status: assignedclosed

In 2c05438e0170ca2022b779f963ae8fb84ee7231a/macports-ports (master):

qt5-qtwebengine: Fix undefined CGRect

fixes: #66219

Note: See TracTickets for help on using tickets.