New issue
Advanced search Search tips

Issue 840251 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 837440



Sign in to add a comment

ClangToT fails compile with "no matching constructor for initialization of '(anonymous namespace)::dyld_interpose_tuple'"

Project Member Reported by h...@chromium.org, May 7 2018

Issue description

Seems to have started here:
https://ci.chromium.org/buildbot/chromium.clang/ToTMac/1581


FAILED: obj/media/audio/audio/coreaudio_dispatch_override.o 
export DEVELOPER_DIR=/b/c/b/ToTMac/src/build/mac_files/Xcode.app;  ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/media/audio/audio/coreaudio_dispatch_override.o.d -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_XCODE_VERSION=0832 -DCR_CLANG_REVISION=\"331441\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DMEDIA_IMPLEMENTATION -DWEBP_EXTERN=extern -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_USE_SKCMS -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DSK_BUILD_FOR_MAC -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/gpu -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/third_party/skcms -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -fno-strict-aliasing -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -Xclang -mllvm -Xclang -fast-isel-sink-local-values=1 -no-canonical-prefixes -arch x86_64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize -O2 -fno-omit-frame-pointer -g1 -isysroot ../../build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9.0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -std=c++14 -stdlib=libc++ -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../media/audio/mac/coreaudio_dispatch_override.cc -o obj/media/audio/audio/coreaudio_dispatch_override.o
../../media/audio/mac/coreaudio_dispatch_override.cc:178:24: error: no matching constructor for initialization of '(anonymous namespace)::dyld_interpose_tuple'
  dyld_interpose_tuple interposition(&GetGlobalQueueOverride,
                       ^             ~~~~~~~~~~~~~~~~~~~~~~~~
../../media/audio/mac/coreaudio_dispatch_override.cc:19:3: note: candidate template ignored: could not match 'const T *' against 'dispatch_queue_t (*)(long, unsigned long)' (aka 'dispatch_queue_s *(*)(long, unsigned long)')
  dyld_interpose_tuple(const T* replacement, const T* replacee)
  ^
../../media/audio/mac/coreaudio_dispatch_override.cc:17:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct dyld_interpose_tuple {
       ^
../../media/audio/mac/coreaudio_dispatch_override.cc:17:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
1 error generated.
 

Comment 1 by h...@chromium.org, May 7 2018

Status: Started (was: Available)
It's due to this change:

------------------------------------------------------------------------
r331424 | lliu0 | 2018-05-03 03:43:23 +0200 (Thu, 03 May 2018) | 10 lines

[Sema] Do not match function type with const T in template argument deduction

From http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1584,
function type should not match cv-qualified type in template argument
deduction. This also matches what GCC and EDG do in template argument
deduction.

Differential Revision: https://reviews.llvm.org/D45755


------------------------------------------------------------------------
Project Member

Comment 2 by bugdroid1@chromium.org, May 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a4c9414e54fd65b17a992bce95fc7cad2b624653

commit a4c9414e54fd65b17a992bce95fc7cad2b624653
Author: Hans Wennborg <hans@chromium.org>
Date: Mon May 07 09:43:43 2018

Drop 'const' from arguments that expect a deduced function-ptr type

Apparently the cv-qualifier of a function type must match,
during deduction, see http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1584

Recent Clang versions error about this so the code must be adjusted.

Bug:  840251 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I715da586731ee97a7c5bfc27b522454dac14d316
Reviewed-on: https://chromium-review.googlesource.com/1046588
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Max Morin <maxmorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556395}
[modify] https://crrev.com/a4c9414e54fd65b17a992bce95fc7cad2b624653/media/audio/mac/coreaudio_dispatch_override.cc

Comment 3 by h...@chromium.org, May 7 2018

Status: Fixed (was: Started)
I got through a full build on my mac, so hopefully that was the only instance.

Sign in to add a comment