New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 600888 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Compile error: ../../base/bit_cast.h:71:22: error: no member named 'is_trivially_copyable' in namespace 'std'

Project Member Reported by michae...@chromium.org, Apr 6 2016

Issue description

Looks like this was introduced in https://codereview.chromium.org/1837563002
and a workaround is available in https://codereview.chromium.org/1863523005/
but not yet committed.

Building with chromeos=1 fails with:

[3715/19391] CXX obj/third_party/zlib/google/compression_utils.compression_utils.o
FAILED: /usr/local/google/home/michaelpg/tools/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/zlib
/google/compression_utils.compression_utils.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DDISABLE_NACL -DCHROMIUM_BUILD 
-DCR_CLANG_REVISION=264915-1 -DCOMPONENT_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT
_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DENABLE_PEPPER_CDMS -DENA
BLE_NOTIFICATIONS -DENABLE_TOPCHROME_MD=1 -DENABLE_WAYLAND_SERVER=1 -DUSE_UDEV -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MA
NAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_
PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SUPERVISED_USERS=1 -DE
NABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DUSE_
LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_NSS_VERIFIER=1 -DOS_CHROMEOS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0
 -Igen -I../.. -I../../third_party/zlib -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hi
dden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /usr/local/google/home/michaelpg/dev/c/work3/src/third_party/llvm-build
/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang chec
k-templates -Xclang -plugin-arg-find-bad-constructs -Xclang follow-macro-expansion -fcolor-diagnostics -B/usr/local/google/home/michaelpg/dev/c/w
ork3/src/third_party/binutils/Linux_x64/Release/bin -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-
default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-unuse
d-variable -m64 -march=x86-64 -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-static
s -fvisibility-inlines-hidden -std=gnu++11 -Wno-deprecated  -c ../../third_party/zlib/google/compression_utils.cc -o obj/third_party/zlib/google/
compression_utils.compression_utils.o
In file included from ../../third_party/zlib/google/compression_utils.cc:13:
../../base/bit_cast.h:71:22: error: no member named 'is_trivially_copyable' in namespace 'std'
  static_assert(std::is_trivially_copyable<Dest>::value,
                ~~~~~^
../../base/bit_cast.h:71:44: error: 'Dest' does not refer to a value
  static_assert(std::is_trivially_copyable<Dest>::value,
                                           ^
../../base/bit_cast.h:62:17: note: declared here
template <class Dest, class Source>
                ^
../../base/bit_cast.h:71:51: error: no member named 'value' in the global namespace
  static_assert(std::is_trivially_copyable<Dest>::value,
                                                ~~^
../../base/bit_cast.h:73:22: error: no member named 'is_trivially_copyable' in namespace 'std'
  static_assert(std::is_trivially_copyable<Source>::value,
                ~~~~~^
../../base/bit_cast.h:73:44: error: 'Source' does not refer to a value
  static_assert(std::is_trivially_copyable<Source>::value,
                                           ^
../../base/bit_cast.h:62:29: note: declared here
template <class Dest, class Source>
                            ^
../../base/bit_cast.h:73:53: error: no member named 'value' in the global namespace
  static_assert(std::is_trivially_copyable<Source>::value,
                                                  ~~^
6 errors generated.

 

Comment 1 by jfb@chromium.org, Apr 18 2016

Status: Fixed (was: Assigned)
Fixed.

Comment 2 by sanfin@chromium.org, Apr 27 2016

Status: Available (was: Fixed)
We still encounter this error (with the patch above) when we build Cast for Android TV with GCC. As a workaround, we're using clang (which our build infrastructure uses anyways), but I thought it was worth pointing out that this issue is still visible.

Comment 3 by sanfin@chromium.org, Apr 27 2016

Cc: sanfin@chromium.org

Comment 4 by jfb@chromium.org, Apr 27 2016

#2: is this the same issue as 607158 or a different one? What are the repro instructions? Which bot is failing?

I believe I've fixed the issue reported here already, since it was using clang and you report using GCC.

Comment 5 by sanfin@chromium.org, Apr 28 2016

This is only when we try to build on our workstations with GCC (the buildbots use clang).

You should be able to repro the error by making your gn args:

gn gen out_fugu/release --args='target_cpu="x86" target_os="android" is_chromecast=true'

And then building using:

ninja -C out_fugu/release cast_shell_apk

Comment 6 by sanfin@chromium.org, Apr 28 2016

If you're too impatient to build it yourself, the error looks like this:
FAILED: obj/content/renderer/renderer/pepper_plugin_instance_impl.o 
../../third_party/android_tools/ndk/toolchains/x86-4.9/prebuilt/linux-x86_64/bin/i686-linux-android-g++ -MMD -MF obj/content/renderer/renderer/pepper_plugin_instance_impl.o.d -DUSE_SECCOMP_BPF -DV8_DEPRECATION_WARNINGS -DENABLE_NOTIFICATIONS -DENABLE_BROWSER_CDMS -DENABLE_PLUGINS=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DENABLE_WEBRTC=1 -DDISABLE_NACL -DENABLE_SUPERVISED_USERS=1 -DENABLE_AUTOFILL_DIALOG=1 -DUSE_PROPRIETARY_CODECS -DVIDEO_HOLE=1 -DSAFE_BROWSING_DB_REMOTE -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DENABLE_WEBVR -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -DANDROID -DHAVE_SYS_UIO_H -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__GNU_SOURCE=1 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DCONTENT_IMPLEMENTATION -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_NOEXCEPT= -DU_STATIC_IMPLEMENTATION -DUSE_EGL -DDISABLE_FFMPEG_VIDEO_DECODERS -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_SUPPORT_GPU=1 -DSK_BUILD_FOR_ANDROID -DUSE_CHROMIUM_SKIA -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DUSE_LIBJPEG_TURBO=1 -DENABLE_LAYOUT_UNIT_IN_INLINE_BOXES=0 -DENABLE_OILPAN=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DWTF_USE_CONCATENATED_IMPULSE_RESPONSES=1 -DWTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION=1 -DWTF_USE_WEBAUDIO_OPENMAX_DL_FFT=1 -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DCHROME_PNG_READ_PACK_SUPPORT -DMOJO_USE_SYSTEM_IMPL -DV8_USE_EXTERNAL_STARTUP_DATA -DMESA_EGL_NO_X11_HEADERS -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DANDROID -DWEBRTC_POSIX -DXML_STATIC -DI18N_PHONENUMBERS_USE_ICU_REGEXP=1 -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DWEBRTC_ANDROID -DSSL_USE_OPENSSL -DHAVE_OPENSSL_SSL_H -DFEATURE_ENABLE_SSL -DLOGGING=1 -DNO_MAIN_THREAD_WRAPPING -DENABLE_MOJO_MEDIA -DENABLE_MOJO_CDM -DENABLE_MOJO_AUDIO_DECODER -DENABLE_MOJO_MEDIA_IN_GPU_PROCESS -I../.. -Igen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/khronos -I../../gpu -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/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/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/libwebp -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -I../../third_party/boringssl/src/include -I../../third_party/libjpeg_turbo -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../third_party/qcms/src -I../../v8/include -Igen -I../../third_party/mesa/src/include -I../../third_party/webrtc_overrides -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../testing/gtest/include -I../../third_party -I../../third_party/expat/files/lib -Igen/media/base/android/media_jni_headers -Igen/media/base/android/media_jni_headers/media -I../../third_party/opus/src/include -I../../third_party/libyuv -I../../third_party/libyuv/include -I../../third_party/android_tools/ndk/sources/android/cpufeatures -I../../third_party/libphonenumber/dist/cpp/src -Igen/third_party/libphonenumber -I../../third_party/libvpx/source/libvpx -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/webrtc/common_video/include -I../../third_party/webrtc/common_video/libyuv/include -I../../third_party/webrtc/modules/include -I../../third_party/webrtc/modules/audio_device/include -I../../third_party/webrtc/modules/audio_device/dummy -fno-strict-aliasing --param=ssp-buffer-size=4 -fno-stack-protector -funwind-tables -fPIC -pipe -ffunction-sections -fno-short-enums -finline-limit=64 -mstackrealign -m32 -Wall -Werror -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-unused-parameter -Os -fdata-sections -ffunction-sections -fomit-frame-pointer -g2 --sysroot=../../third_party/android_tools/ndk/platforms/android-16/arch-x86 -fvisibility=hidden -fno-threadsafe-statics -fvisibility-inlines-hidden -std=gnu++11 -Wno-narrowing -fno-rtti -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include -isystem../../third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++abi/libcxxabi/include -isystem../../third_party/android_tools/ndk/sources/android/support/include -fno-exceptions -Wno-non-virtual-dtor -c ../../content/renderer/pepper/pepper_plugin_instance_impl.cc -o obj/content/renderer/renderer/pepper_plugin_instance_impl.o
In file included from ../../content/renderer/pepper/pepper_plugin_instance_impl.cc:10:0:
../../base/bit_cast.h: In instantiation of 'Dest bit_cast(const Source&) [with Dest = ppapi::WebKitGamepads; Source = blink::WebGamepads]':
../../content/renderer/pepper/pepper_plugin_instance_impl.cc:468:71:   required from here
../../base/bit_cast.h:71:3: error: static assertion failed: non-trivially-copyable bit_cast is undefined
   static_assert(std::is_trivially_copyable<Dest>::value,
   ^
../../base/bit_cast.h:73:3: error: static assertion failed: non-trivially-copyable bit_cast is undefined
   static_assert(std::is_trivially_copyable<Source>::value,
   ^

(Note that the issue does not occur if we add is_clang=true to the gn args.)

Comment 7 by thakis@chromium.org, Apr 28 2016

sanfin: I think you're seeing bug 607158

Comment 8 by sanfin@chromium.org, Apr 28 2016

Status: Fixed (was: Available)
Yep, I cherry-picked the patch for that bug and it compiled perfectly. Thanks for the pointer.

Sign in to add a comment