RESOLVED FIXED 241524
Unified build: error: reference to 'FontInfo' is ambiguous
https://bugs.webkit.org/show_bug.cgi?id=241524
Summary Unified build: error: reference to 'FontInfo' is ambiguous
Yury Semikhatsky
Reported 2022-06-10 15:16:49 PDT
We are getting the following error in our build. The error is likely caused by 'using namespace WebKit;' in one of the .cpp files compiled as part of the same UnifiedSource82.cpp. CompileC /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/UnifiedSource82.o /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp normal x86_64 c++ com.apple.compilers.llvm.cl ang.1_0.compiler (in target 'WebKit' from project 'WebKit') cd /Users/administrator/webkit/Source/WebKit export LANG\=en_US.US-ASCII /Applications/Xcode13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -target x86_64-apple-macos12.1 -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -std\=c++2a -stdlib\=libc++ -gmodules -Wno-trigr aphs -fno-exceptions -fno-rtti -fno-sanitize\=vptr -fpascal-strings -Os -fno-common -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wunreachable-code -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswit ch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -W no-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DNDEBUG -DHAVE_CORE_PREDICTION -DENABLE_LOWER_FORMATREADERBUNDLE_CODESIGNING_REQUIREMENTS -DFRAMEWORK_NAME\=WebKit -isysroot /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -g -fvisibility\=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conver sion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -iquote /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/WebKit-generated-files.hmap -I/Users/administ rator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/WebKit-own-target-headers.hmap -I/Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/WebKit-all-target-headers.hmap -iquote /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.b uild/WebKit-project-headers.hmap -I/Users/administrator/webkit/WebKitBuild/Release/include -I/Users/administrator/webkit/WebKitBuild/Release/usr/local/include -I/Users/administrator/webkit/WebKitBuild/Release/WebCore.framework/Versions/A/PrivateHeaders/ForwardingHeaders -I/ Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit -I/Users/administrator/webkit/WebKitBuild/Release/usr/local/include/pal/graphics/WebGPU -I/Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/local/ include/pal/graphics/WebGPU -I/Users/administrator/webkit/WebKitBuild/Release/usr/local/include/WebKitAdditions -I/Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/local/include/WebKitAdditions -I/Users/administrato r/webkit/WebKitBuild/Release/usr/local/include/webrtc -I/Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/local/include/webrtc -I/Users/administrator/webkit/Source/WebKit -isystem /Applications/Xcode13.2.1.app/Conte nts/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/local/include -I/Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/DerivedSources-normal/x86_64 -I/Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/Deriv edSources/x86_64 -I/Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat\=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wno-unus ed-parameter -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wliteral-conversion -Wthread-safety -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofile d -F/Users/administrator/webkit/WebKitBuild/Release -F/Users/administrator/webkit/WebKitBuild/Release -F/Users/administrator/webkit/WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/120000 -iframework /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/PrivateFrameworks -iframework /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks -iframework /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/PrivateFrameworks -D__STDC_WANT_LIB_EXT1__\=1 -fprofile-instr-use\=/Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/WebKit.profdata -isystem /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/System.framework/PrivateHeaders -include /Users/administrator/webkit/WebKitBuild/PrecompiledHeaders/SharedPrecompiledHeaders/9300323727089741043/WebKit2Prefix.h -MMD -MT dependencies -MF /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/UnifiedSource82.d --serialize-diagnostics /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/UnifiedSource82.dia -c /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp -o /Users/administrator/webkit/WebKitBuild/WebKit.build/Release/WebKit.build/Objects-normal/x86_64/UnifiedSource82.o In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp:8: In file included from /Users/administrator/webkit/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:32: In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/RemoteCaptureSampleManagerMessages.h:37: In file included from /Users/administrator/webkit/WebKitBuild/Release/WebCore.framework/PrivateHeaders/CVUtilities.h:28: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:29: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:23: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h:28: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:43: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/HIServices.h:26: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/HIShape.h:22: /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:209:16: error: reference to 'FontInfo' is ambiguous typedef struct FontInfo FontInfo; ^ /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:203:8: note: candidate found by name lookup is 'FontInfo' struct FontInfo { ^ In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp:4: In file included from /Users/administrator/webkit/Source/WebKit/UIProcess/Authentication/AuthenticationDecisionListener.cpp:35: /Users/administrator/webkit/Source/WebKit/UIProcess/WebPageProxy.h:414:8: note: candidate found by name lookup is 'WebKit::FontInfo' struct FontInfo; ^ In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp:8: In file included from /Users/administrator/webkit/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:32: In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/RemoteCaptureSampleManagerMessages.h:37: In file included from /Users/administrator/webkit/WebKitBuild/Release/WebCore.framework/PrivateHeaders/CVUtilities.h:28: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:29: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:23: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVImageBuffer.h:28: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:43: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/HIServices.h:26: In file included from /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/HIShape.h:22: /Applications/Xcode13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/Quickdraw.h:282:116: error: reference to 'FontInfo' is ambiguous typedef CALLBACK_API( short , QDTxMeasProcPtr )(short byteCount, const void *textAddr, Point *numer, Point *denom, FontInfo *info); ^ In file included from /Users/administrator/webkit/WebKitBuild/Release/DerivedSources/WebKit/unified-sources/UnifiedSource82.cpp:4: In file included from /Users/administrator/webkit/Source/WebKit/UIProcess/Authentication/AuthenticationDecisionListener.cpp:35: /Users/administrator/webkit/Source/WebKit/UIProcess/WebPageProxy.h:414:8: note: candidate found by name lookup is 'WebKit::FontInfo' struct FontInfo; ^
Attachments
Yury Semikhatsky
Comment 1 2022-06-10 15:22:20 PDT
EWS
Comment 2 2022-06-10 15:45:48 PDT
Committed r295466 (251471@main): <https://commits.webkit.org/251471@main> Reviewed commits have been landed. Closing PR #1456 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2022-06-10 15:46:13 PDT
Note You need to log in before you can comment on or make changes to this bug.