New issue
Advanced search Search tips

Issue 799820 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 796379
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows
Pri: 3
Type: Bug

Blocking:
issue 495204



Sign in to add a comment

clang fails to compile third_party/ffmpeg/libavcodec/h264_cabac.c for linux in a linux->win cross bulid with proprietary codecs enabled

Project Member Reported by thakis@chromium.org, Jan 8 2018

Issue description

This is a regression. (I'm guessing we build h264 for host because of  bug 794838  comment 0 b, but we've been doing this for a while, so I'm guessing some clang roll broke this.)

My args.gn:

is_debug = false
target_os = "win"
dcheck_always_on = true
ffmpeg_branding = "Chrome"
is_component_build = false
is_debug = false
proprietary_codecs = true
strip_absolute_paths_from_debug_symbols = true
symbol_level = 1
target_cpu = "x86"


[31138/50868] CC clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o
FAILED: clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o 
../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o.d -DHAVE_AV_CONFIG_H -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_EBP_AVAILABLE=1 -D_ISOC99_SOURCE -D_LARGEFILE_SOURCE -DV8_DEPRECATION_WARNINGS -DDCHECK_ALWAYS_ON=1 -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 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"321529-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -I../../third_party/ffmpeg/chromium/config/Chrome/linux/ia32 -I../../third_party/ffmpeg -I../.. -Iclang_x86/gen -I../../third_party/opus/src/include -fPIC -fomit-frame-pointer -Wno-deprecated-declarations -std=c99 -pthread -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fdebug-prefix-map=/usr/local/google/home/thakis/src/chrome/src=. -no-canonical-prefixes -m32 -msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -g1 -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -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-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-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -Wno-incompatible-pointer-types -Wno-absolute-value -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-logical-op-parentheses -Wno-parentheses -Wno-pointer-sign -Wno-switch -Wno-unused-label -Wno-unused-variable -Wno-string-conversion -Wno-sometimes-uninitialized -Wno-unguarded-availability -Wno-unused-function -Wno-constant-conversion -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu11 --sysroot=../../build/linux/debian_stretch_i386-sysroot -c ../../third_party/ffmpeg/libavcodec/h264_cabac.c -o clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o
In file included from ../../third_party/ffmpeg/libavcodec/h264_cabac.c:36:
In file included from ../../third_party/ffmpeg/libavcodec/cabac_functions.h:46:
../../third_party/ffmpeg/libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available
        BRANCHLESS_GET_CABAC("%0", "%q0", "(%4)", "%1", "%w1",
        ^
../../third_party/ffmpeg/libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC'
        "movzbl "statep"    , "ret"                                     \n\t"\
        ^
error: register allocation failed: maximum depth for recoloring reached. Use -fexhaustive-register-search to skip cutoffs
../../third_party/ffmpeg/libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available
../../third_party/ffmpeg/libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC'
        "movzbl "statep"    , "ret"                                     \n\t"\
        ^
../../third_party/ffmpeg/libavcodec/x86/cabac.h:193:9: error: inline assembly requires more registers than available
../../third_party/ffmpeg/libavcodec/x86/cabac.h:143:9: note: expanded from macro 'BRANCHLESS_GET_CABAC'
        "movzbl "statep"    , "ret"                                     \n\t"\
...
clang: /b/build/slave/linux_upload_clang/build/src/third_party/llvm/include/llvm/CodeGen/VirtRegMap.h:115: void llvm::VirtRegMap::clearVirt(unsigned int): Assertion `Virt2PhysMap[virtReg] != NO_PHYS_REG && "attempt to clear a not assigned virtual register"' failed.
#0 0x0000000001eb4be4 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1eb4be4)
#1 0x0000000001eb4f46 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1eb4f46)
#2 0x00007f25357c6330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007f25343b5c37 gsignal /build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007f25343b9028 abort /build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#5 0x00007f25343aebf6 __assert_fail_base /build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#6 0x00007f25343aeca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#7 0x00000000018bee6b llvm::LiveRegMatrix::unassign(llvm::LiveInterval&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x18bee6b)
#8 0x0000000001880b63 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1880b63)
#9 0x000000000188d3ed (../../third_party/llvm-build/Release+Asserts/bin/clang+0x188d3ed)
#10 0x000000000188095f (../../third_party/llvm-build/Release+Asserts/bin/clang+0x188095f)
#11 0x000000000188d3ed (../../third_party/llvm-build/Release+Asserts/bin/clang+0x188d3ed)
#12 0x000000000188095f (../../third_party/llvm-build/Release+Asserts/bin/clang+0x188095f)
#13 0x000000000187bd01 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x187bd01)
#14 0x00000000018c051a llvm::RegAllocBase::allocatePhysRegs() (../../third_party/llvm-build/Release+Asserts/bin/clang+0x18c051a)
#15 0x000000000187aa86 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x187aa86)
#16 0x0000000001681938 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1681938)
#17 0x00000000019b776f llvm::FPPassManager::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x19b776f)
#18 0x00000000019b7a33 llvm::FPPassManager::runOnModule(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x19b7a33)
#19 0x00000000019b7f16 llvm::legacy::PassManagerImpl::run(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x19b7f16)
#20 0x00000000020633af clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x20633af)
#21 0x0000000002820d10 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x2820d10)
#22 0x00000000024cd24c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x24cd24c)
#23 0x0000000002d2aca6 clang::ParseAST(clang::Sema&, bool, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x2d2aca6)
#24 0x00000000024a3790 clang::FrontendAction::Execute() (../../third_party/llvm-build/Release+Asserts/bin/clang+0x24a3790)
#25 0x000000000244e421 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x244e421)
#26 0x000000000253ae3b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x253ae3b)
#27 0x000000000086d4ad cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x86d4ad)
#28 0x000000000086ae55 main (../../third_party/llvm-build/Release+Asserts/bin/clang+0x86ae55)
#29 0x00007f25343a0f45 __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#29 0x00007f25343a0f45 __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#30 0x0000000000867ec2 _start (../../third_party/llvm-build/Release+Asserts/bin/clang+0x867ec2)
Stack dump:
0.      Program arguments: ../../third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name h264_cabac.c -mrelocation-model pic -pic-level 2 -mthread-model posix -relaxed-aliasing -fno-signed-zeros -mfpmath sse -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu pentium4 -target-feature +sse2 -target-feature +mmx -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /usr/local/google/home/thakis/src/chrome/src/out/gnwin/clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.gcno -resource-dir ../../third_party/llvm-build/Release+Asserts/lib/clang/6.0.0 -dependency-file clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o.d -MT clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o -D HAVE_AV_CONFIG_H -D _POSIX_C_SOURCE=200112 -D _XOPEN_SOURCE=600 -D PIC -D HAVE_EBP_AVAILABLE=1 -D _ISOC99_SOURCE -D _LARGEFILE_SOURCE -D V8_DEPRECATION_WARNINGS -D DCHECK_ALWAYS_ON=1 -D USE_UDEV -D USE_AURA=1 -D USE_GLIB=1 -D USE_NSS_CERTS=1 -D USE_X11=1 -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D FIELDTRIAL_TESTING_ENABLED -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D _LARGEFILE64_SOURCE -D CR_CLANG_REVISION="321529-1" -D _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -I ../../third_party/ffmpeg/chromium/config/Chrome/linux/ia32 -I ../../third_party/ffmpeg -I ../.. -I clang_x86/gen -I ../../third_party/opus/src/include -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -isysroot ../../build/linux/debian_stretch_i386-sysroot -internal-isystem ../../build/linux/debian_stretch_i386-sysroot/usr/local/include -internal-isystem ../../third_party/llvm-build/Release+Asserts/lib/clang/6.0.0/include -internal-externc-isystem ../../build/linux/debian_stretch_i386-sysroot/usr/include/i386-linux-gnu -internal-externc-isystem ../../build/linux/debian_stretch_i386-sysroot/include -internal-externc-isystem ../../build/linux/debian_stretch_i386-sysroot/usr/include -O2 -Wno-deprecated-declarations -Wno-builtin-macro-redefined -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -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-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-constant-compare -Wtautological-constant-out-of-range-compare -Wno-incompatible-pointer-types -Wno-absolute-value -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-logical-op-parentheses -Wno-parentheses -Wno-pointer-sign -Wno-switch -Wno-unused-label -Wno-unused-variable -Wno-string-conversion -Wno-sometimes-uninitialized -Wno-unguarded-availability -Wno-unused-function -Wno-constant-conversion -std=gnu11 -fdebug-compilation-dir /usr/local/google/home/thakis/src/chrome/src/out/gnwin -fdebug-prefix-map=/usr/local/google/home/thakis/src/chrome/src=. -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -pthread -stack-protector 1 -stack-protector-buffer-size 4 -mstackrealign -mstack-alignment=16 -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -load ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -add-plugin find-bad-constructs -plugin-arg-find-bad-constructs check-ipc -o clang_x86/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o -x c ../../third_party/ffmpeg/libavcodec/h264_cabac.c 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module '../../third_party/ffmpeg/libavcodec/h264_cabac.c'.
4.      Running pass 'Greedy Register Allocator' on function '@ff_h264_decode_mb_cabac'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 6.0.0 (trunk 321529)
Target: i386-unknown-linux-gnu
Thread model: posix
InstalledDir: ../../third_party/llvm-build/Release+Asserts/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg: 
********************



 
tmp files written by clang
h264_cabac-058b38.zip
364 KB Download
Blocking: 495204
Summary: clang fails to compile third_party/ffmpeg/libavcodec/h264_cabac.c for linux in a linux->win cross bulid with proprietary codecs enabled (was: clang fails to compile third_party/ffmpeg/libavcodec/h264_cabac.c for linux in a linux->win cross bulid)
(Removing
ffmpeg_branding = "Chrome"
proprietary_codecs = true
makes my build go and I don't currently need it, so this isn't blocking me at the moment. But it's still broken and used to work.)
Mergedinto: 796379
Status: Duplicate (was: Untriaged)

Sign in to add a comment