Open matt-hammond-001 opened 3 years ago
Using a sysroot produced by yocto hardknott release (latest release at this time) ... I encountered deprecation warnings resulting in build failures:
hardknott
FAILED: obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/Process.o ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/Process.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DCR_CLANG_REVISION=\"llvmorg-12-init-16296-g5e476061-1\" -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -DCR_LIBCXX_REVISION=375504 -DCR_SYSROOT_HASH=e7d7b3d23c21b8f46911b8428d38aba46cf58ba2 -DOS_CHROMEOS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DNO_SANITIZE_FUNCTION=__attribute__\(\(no_sanitize\(\"function\"\)\)\) -DANGLE_DISABLE_TRACE -DNDEBUG -DALLOW_DUMP=0 -DALLOW_TIMERS=0 -DALLOW_LLVM_CL=0 -DALLOW_LLVM_IR=0 -DALLOW_LLVM_IR_AS_INPUT=0 -DALLOW_MINIMAL_BUILD=0 -DALLOW_WASM=0 -DICE_THREAD_LOCAL_HACK=0 -DSZTARGET=ARM32 -DSUBZERO_TARGET=ARM32 -I../.. -Igen -I../../third_party/swiftshader/third_party/subzero -I../../third_party/swiftshader/third_party/subzero/pnacl-llvm/include -I../../third_party/swiftshader/third_party/llvm-subzero/include -I../../third_party/swiftshader/third_party/llvm-subzero/build/Linux/include -fno-delete-null-pointer-checks -fno-strict-aliasing -funwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 --target=arm-linux-gnueabihf -march=armv7-a -mfloat-abi=hard -mtune=generic-armv7-a -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -mfpu=neon -mthumb -Os -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g0 -ftrivial-auto-var-init=pattern -fvisibility=hidden -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-misleading-indentation -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 -std=c++14 -fno-exceptions -fno-operator-names -ffunction-sections -fdata-sections -fomit-frame-pointer -Os -Wno-macro-redefined -Wno-header-hygiene -Wno-enum-compare-switch -Wno-unused-lambda-capture -Wno-unused-function -std=c++14 -fno-trigraphs -Wno-trigraphs -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include --sysroot=../../build/linux/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -fvisibility-inlines-hidden -c ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/Process.cpp -o obj/third_party/swiftshader/src/Reactor/swiftshader_subzero/Process.o In file included from ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/Process.cpp:85: ../../third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Process.inc:91:10: error: 'mallinfo' is deprecated [-Werror,-Wdeprecated-declarations] mi = ::mallinfo(); ^ ../../build/linux/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/malloc.h:118:48: note: 'mallinfo' has been explicitly marked deprecated here extern struct mallinfo mallinfo (void) __THROW __MALLOC_DEPRECATED; ^ ../../build/linux/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/malloc.h:31:30: note: expanded from macro '__MALLOC_DEPRECATED' # define __MALLOC_DEPRECATED __attribute_deprecated__ ^ ../../build/linux/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/sys/cdefs.h:261:51: note: expanded from macro '__attribute_deprecated__' # define __attribute_deprecated__ __attribute__ ((__deprecated__)) ^ 1 error generated. [147/55499] ACTION //components/resources:about_credits(//build/toolchain/linux:clang_arm) ninja: build stopped: subcommand failed.
Modifying build/config/compiler/BUILD.gn prevents this by stopping deprecation warnings counting as errors:
build/config/compiler/BUILD.gn
if (treat_warnings_as_errors) { cflags += [ "-Werror" ] + cflags += [ "-Wno-deprecated-declarations" ] ... # GCC may emit unsuppressible warnings so don't add -Werror for no chromium # code. crbug.com/589724 if (treat_warnings_as_errors && is_clang) { cflags += [ "-Werror" ] + cflags += [ "-Wno-deprecated-declarations" ] ldflags = [ "-Werror" ] }
Might be worth seeing if we can set treat_warnings_as_errors in the build flags. Otherwise we should maintain a patch until this is hopefully fixed in a later version of Chromium.
treat_warnings_as_errors
Using a sysroot produced by yocto
hardknott
release (latest release at this time) ... I encountered deprecation warnings resulting in build failures:Modifying
build/config/compiler/BUILD.gn
prevents this by stopping deprecation warnings counting as errors: