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

Issue 799042 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 796379
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocking:
issue 771995



Sign in to add a comment

ffmpeg fails to compile on a Linux32 Debug build

Project Member Reported by ehmaldonado@chromium.org, Jan 4 2018

Issue description

When building Chromium (or WebRTC) with the following gn args:

ffmpeg_branding = "Chrome"
is_debug = true           
rtc_use_h264 = true       
target_cpu = "x86"        
use_goma = true           

it fails to compile:

ninja: Entering directory `out/linux32_dbg/'
[18170/36623] CC obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o
FAILED: obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o 
/usr/local/google/home/ehmaldonado/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF 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 -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=\"318667-1\" -DCOMPONENT_BUILD -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../../third_party/ffmpeg/chromium/config/Chrome/linux/ia32 -I../../third_party/ffmpeg -I../.. -Igen -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 -no-canonical-prefixes -m32 -msse2 -mfpmath=sse -mmmx -momit-leaf-frame-pointer -mstack-alignment=16 -mstackrealign -g2 -gsplit-dwarf -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 -fvisibility=default -std=gnu11 --sysroot=../../build/linux/debian_stretch_i386-sysroot -c ../../third_party/ffmpeg/libavcodec/h264_cabac.c -o 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"\
        ^
../../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"\
        ^
../../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"\
        ^
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"\
        ^
../../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"\
        ^
../../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/lib/CodeGen/RegAllocGreedy.cpp:1062: void (anonymous namespace)::RAGreedy::evictInterference(llvm::LiveInterval &, unsigned int, SmallVectorImpl<unsigned int> &): Assertion `(ExtraRegInfo[Intf->reg].Cascade < Cascade || VirtReg.isSpillable() < Intf->isSpillable()) && "Cannot decrease cascade number, illegal eviction"' failed.
#0 0x0000000001e58964 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1e58964)
#1 0x0000000001e58cc6 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1e58cc6)
#2 0x00007fdb51984330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#3 0x00007fdb50573c37 gsignal /build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#4 0x00007fdb50577028 abort /build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#5 0x00007fdb5056cbf6 __assert_fail_base /build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#6 0x00007fdb5056cca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#7 0x0000000001834cee (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1834cee)
#8 0x000000000182f73f (../../third_party/llvm-build/Release+Asserts/bin/clang+0x182f73f)
#9 0x000000000182c838 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x182c838)
#10 0x000000000183abad (../../third_party/llvm-build/Release+Asserts/bin/clang+0x183abad)
#11 0x000000000182de61 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x182de61)
#12 0x0000000001829451 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1829451)
#13 0x000000000186e375 llvm::RegAllocBase::allocatePhysRegs() (../../third_party/llvm-build/Release+Asserts/bin/clang+0x186e375)
#14 0x00000000018281d6 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x18281d6)
#15 0x00000000016301a8 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x16301a8)
#16 0x0000000001963b5f llvm::FPPassManager::runOnFunction(llvm::Function&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1963b5f)
#17 0x0000000001963e23 llvm::FPPassManager::runOnModule(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1963e23)
#18 0x0000000001964306 llvm::legacy::PassManagerImpl::run(llvm::Module&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x1964306)
#19 0x000000000200338f 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+0x200338f)
#20 0x00000000027a2460 (../../third_party/llvm-build/Release+Asserts/bin/clang+0x27a2460)
#21 0x000000000245eafc clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x245eafc)
#22 0x0000000002c83306 clang::ParseAST(clang::Sema&, bool, bool) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x2c83306)
#23 0x00000000024359a0 clang::FrontendAction::Execute() (../../third_party/llvm-build/Release+Asserts/bin/clang+0x24359a0)
#24 0x00000000023e2411 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x23e2411)
#25 0x00000000024cc26b clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x24cc26b)
#26 0x00000000008600f9 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (../../third_party/llvm-build/Release+Asserts/bin/clang+0x8600f9)
#27 0x000000000085db66 main (../../third_party/llvm-build/Release+Asserts/bin/clang+0x85db66)
#28 0x00007fdb5055ef45 __libc_start_main /build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#29 0x000000000085aaf2 _start (../../third_party/llvm-build/Release+Asserts/bin/clang+0x85aaf2)
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 -enable-split-dwarf -debug-info-kind=limited -debugger-tuning=gdb -split-dwarf-file obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.dwo -momit-leaf-frame-pointer -ffunction-sections -fdata-sections -coverage-notes-file /usr/local/google/home/ehmaldonado/chromium/src/out/linux32_dbg/obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.gcno -resource-dir ../../third_party/llvm-build/Release+Asserts/lib/clang/6.0.0 -dependency-file obj/third_party/ffmpeg/ffmpeg_internal/h264_cabac.o.d -MT 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 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="318667-1" -D COMPONENT_BUILD -D _DEBUG -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D WTF_USE_DYNAMIC_ANNOTATIONS=1 -I ../../third_party/ffmpeg/chromium/config/Chrome/linux/ia32 -I ../../third_party/ffmpeg -I ../.. -I 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/ehmaldonado/chromium/src/out/linux32_dbg -ferror-limit 19 -fmessage-length 0 -fvisibility default -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 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 318667)
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: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/h264_cabac-1cb304.c
clang: note: diagnostic msg: /tmp/h264_cabac-1cb304.sh
clang: note: diagnostic msg: 

********************
[18219/36623] CC obj/third_party/ffmpeg/ffmpeg_internal/h264qpel.o
ninja: build stopped: subcommand failed.

 
Cc: sande...@chromium.org chcunningham@chromium.org dalecur...@chromium.org thomasanderson@chromium.org xhw...@chromium.org
Latest builds on the dbg 32 Linux builder are green:
https://ci.chromium.org/buildbot/chromium.linux/Linux%20Builder%20%28dbg%29%2832%29/

gn args there are:
is_component_build = true
is_debug = true
strip_absolute_paths_from_debug_symbols = true
target_cpu = "x86"
use_goma = true

It seems is_component_build=false is an additional requirement to reproduce the failure.

+media OWNERS
Blocking: 771995
Owner: sande...@chromium.org
Status: Assigned (was: Untriaged)
Mergedinto: 796379
Status: Duplicate (was: Assigned)
Duplicate of  Issue 796379 . See there for additional context.

I think the important difference between the bot args vs whats used above is the ffmpeg_branding = "chrome" which brings in h264 code.

Sign in to add a comment