Build cc_unittests error
Reported by
wangqing...@loongson.cn,
Sep 5
|
||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3542.0 Safari/537.36
Steps to reproduce the problem:
1. ninja -C out/Release cc_unittests
What is the expected behavior?
What went wrong?
[154/325] CXX obj/cc/cc_unittests/worklet_animation_unittest.o
FAILED: obj/cc/cc_unittests/worklet_animation_unittest.o
mips64el-linux-gnu-g++ -MMD -MF obj/cc/cc_unittests/worklet_animation_unittest.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_MIPS_ARCH_LOONGSON -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=332543 -DCR_LIBCXXABI_REVISION=331450 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DWEBP_EXTERN=extern -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DVK_NO_PROTOTYPES -DGTEST_API_= -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DGTEST_HAS_TR1_TUPLE=0 -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\" -DSK_VULKAN=1 -DSK_SUPPORT_GPU=1 -DSK_GPU_WORKAROUNDS_HEADER=\"gpu/config/gpu_driver_bug_workaround_autogen.h\" -DVK_NO_PROTOTYPES -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DLEVELDB_PLATFORM_CHROMIUM=1 -DUNIT_TEST -I../.. -Igen -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/libyuv/include -I../../third_party/vulkan/include -I../../third_party/googletest/custom -I../../third_party/googletest/src/googletest/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/vulkan/include -I../../third_party/skia/third_party/vulkanmemoryallocator -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -I../../third_party/skia/modules/skottie/include -I../../third_party/vulkan/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -I../../third_party/googletest/custom -I../../third_party/googletest/src/googlemock/include -I../../third_party/protobuf/src -Igen/protoc_out -Igen/third_party/metrics_proto -I../../third_party/libwebm/source -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/mesa_headers -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -pthread -EL -mabi=64 -march=loongson3a -mno-branch-likely -Wa,-march=loongson3a -Wall -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fno-builtin-abs -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -std=gnu++14 -Wno-narrowing -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c ../../cc/animation/worklet_animation_unittest.cc -o obj/cc/cc_unittests/worklet_animation_unittest.o
../../cc/animation/worklet_animation_unittest.cc: 在成员函数‘virtual void cc::\xe5\x8c\xbf\xe5\x90\x8d}::WorkletAnimationTest_NonImplInstanceDoesNotTickKeyframe_Test::TestBody()’中:
../../cc/animation/worklet_animation_unittest.cc:64:58: 错误:‘cc::WorkletAnimation::WorkletAnimation(int, cc::WorkletAnimationId, const string&, std::__1::unique_ptr<cc::ScrollTimeline>, std::__1::unique_ptr<cc::AnimationOptions>, bool, std::__1::unique_ptr<cc::KeyframeEffect>)’ is private within this context
false /* not impl instance*/, std::move(effect)));
^
In file included from ../../cc/animation/worklet_animation_unittest.cc:5:
../../cc/animation/worklet_animation.h:77:3: 附注:declared private here
WorkletAnimation(int cc_animation_id,
^~~~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
Did this work before? N/A
Chrome version: 71.0.3542.0 Channel: n/a
OS Version: OS X 10.13.6
Flash Version:
,
Sep 6
,
Sep 11
,
Sep 14
What version of g++ are you using? Chromium developers generally build with Clang, and building with GCC is community supported. i.e. Feel free to submit a CL to fix this.
,
Sep 14
cc'ing people who worked on the code for awareness, but as comment #4 suggested, building w/ GCC is community supported.
,
Sep 14
The ctor has to remain private and the way of making tests to access a private ctor seems correct to me. Usage: https://cs.chromium.org/chromium/src/cc/animation/worklet_animation.h?g=0&l=75 Instruction: https://cs.chromium.org/chromium/src/base/gtest_prod_util.h?type=cs&q=FORWARD_DECLARE_TEST&g=0&l=21
,
Sep 17
for all. I add a static shared member function to access the private constructor Please look at: https://chromium-review.googlesource.com/c/chromium/src/+/1207782
,
Sep 17
The friend test macro used here simply expands to a friend declaration for the test class, and we use it extensively in the codebase. I'm not sure why that would be an issue with gcc. Could you mention what version you're using?
,
Sep 17
for #8 gcc verison: 7.3.0
,
Sep 18
Can you build content_unittests? Does removing the FORWARD_DECLARE_TEST help? |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rkdk8...@gmail.com
, Sep 5