Repository navigation
v6.5.0 fails to build using clang-3.4. #8323
Description
Activity
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
on Aug 29, 2016 - changed the title
[-]v6.4.0 fails to build using clang-3.4.[/-][+]v6.5.0 fails to build using clang-3.4.[/+]on Aug 29, 2016 Can you post or link to the build log?
What I've seen building 6.5.0 this morning is that the builds fail during the V8 compilation on both Ubuntu Precise and Debian Wheezy. Both were trying to use
clang-3.4because the default compilers that ship with those distros have been too old to compile a modern V8 for some time now.The builds failed in the same way for Wheezy and Precise, on both 32bit and 64bit architectures. The error message in all cases from
clanglooked like this: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/mark-compact-f6dbed.cpp clang: note: diagnostic msg: /tmp/mark-compact-f6dbed.sh clang: note: diagnostic msg: ********************I have attached those
mark-compact-*files here, gzipped.
mark-compact-f6dbed.sh.gz
mark-compact-f6dbed.cpp.gzNewer versions of Debian and Ubuntu (which do have
gccnew enough to work out of the box) are building just fine.Working on getting a full build log @bnoordhuis, please stay tuned.
Full build log attached @bnoordhuis. This was attempting to build on Ubuntu Precise, amd64, with
clang 3.4. However, the errors look the same in all the contexts where I saw the builds die. Please let me know if there's any additional details I can provide.Stops with:
/usr/bin/clang++ '-DV8_TARGET_ARCH_X64' '-DENABLE_DISASSEMBLER' '-DV8_I18N_SUPPORT' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_CONVERSION=1' -I../deps/v8 -I../deps -I../deps/icu/source/i18n -I../deps/icu/source/common -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /build/nodejs-6.5.0/out/Release/.deps//build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/constant-array-builder.o.d.raw -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -c -o /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/constant-array-builder.o ../deps/v8/src/interpreter/constant-array-builder.cc 0 libLLVM-3.4.so.1 0x00002b77ff46be92 llvm::sys::PrintStackTrace(_IO_FILE*) + 34 1 libLLVM-3.4.so.1 0x00002b77ff46c229 2 libpthread.so.0 0x00002b7800144cb0 3 clang 0x000000000119cbe2 clang::Expr::EvaluateAsInitializer(clang::APValue&, clang::ASTContext const&, clang::VarDecl const*, llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic> >&) const + 82 4 clang 0x0000000001139591 clang::VarDecl::evaluateValue(llvm::SmallVectorImpl<std::pair<clang::SourceLocation, clang::PartialDiagnostic> >&) const + 209 5 clang 0x000000000113f649 clang::VarDecl::checkInitIsICE() const + 345 6 clang 0x0000000000ade33a clang::Sema::ActOnFinishFullExpr(clang::Expr*, clang::SourceLocation, bool, bool, bool) + 1754 7 clang 0x0000000000b76643 clang::Sema::ActOnExprStmt(clang::ActionResult<clang::Expr*, true>) + 67 8 clang 0x000000000091910b clang::Parser::ParseExprStatement() + 107 9 clang 0x0000000000912e0f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) + 3103 10 clang 0x000000000091300d clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*) + 141 11 clang 0x0000000000913bcf clang::Parser::ParseCompoundStatementBody(bool) + 1743 12 clang 0x00000000008f665a clang::Parser::ParseLambdaExpressionAfterIntroducer(clang::LambdaIntroducer&) + 1546 13 clang 0x00000000008f7ddd clang::Parser::ParseLambdaExpression() + 397 14 clang 0x00000000008e4239 clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 7113 15 clang 0x00000000008e551d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) + 29 16 clang 0x00000000008e65df clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31 17 clang 0x00000000008e682d clang::Parser::ParseExpressionList(llvm::SmallVectorImpl<clang::Expr*>&, llvm::SmallVectorImpl<clang::SourceLocation>&, void (clang::Sema::*)(clang::Scope*, clang::Expr*, llvm::ArrayRef<clang::Expr*>), clang::Expr*) + 221 18 clang 0x00000000008e9177 clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) + 759 19 clang 0x00000000008e275b clang::Parser::ParseCastExpression(bool, bool, bool&, clang::Parser::TypeCastState) + 235 20 clang 0x00000000008e551d clang::Parser::ParseCastExpression(bool, bool, clang::Parser::TypeCastState) + 29 21 clang 0x00000000008e65df clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 31 22 clang 0x00000000008e72f9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 9 23 clang 0x00000000009190e0 clang::Parser::ParseExprStatement() + 64 24 clang 0x0000000000912e0f clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) + 3103 25 clang 0x000000000091300d clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, bool, clang::SourceLocation*) + 141 26 clang 0x0000000000913bcf clang::Parser::ParseCompoundStatementBody(bool) + 1743 27 clang 0x0000000000914073 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 195 28 clang 0x00000000008b5a9e clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) + 1534 29 clang 0x000000000091e58b clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int, clang::Parser::ParsedTemplateInfo const&, clang::ParsingDeclRAIIObject&, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 4027 30 clang 0x000000000091f099 clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 681 31 clang 0x000000000091f360 clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int, clang::SourceLocation&, clang::AccessSpecifier, clang::AttributeList*) + 144 32 clang 0x00000000008cb899 clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 841 33 clang 0x00000000008b7f7f clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 639 34 clang 0x00000000008d65bd clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 381 35 clang 0x00000000008d721e clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) + 2958 36 clang 0x00000000008cb90b clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 955 37 clang 0x00000000008b7f7f clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 639 38 clang 0x00000000008d65bd clang::Parser::ParseInnerNamespace(std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, std::vector<clang::IdentifierInfo*, std::allocator<clang::IdentifierInfo*> >&, std::vector<clang::SourceLocation, std::allocator<clang::SourceLocation> >&, unsigned int, clang::SourceLocation&, clang::ParsedAttributes&, clang::BalancedDelimiterTracker&) + 381 39 clang 0x00000000008d721e clang::Parser::ParseNamespace(unsigned int, clang::SourceLocation&, clang::SourceLocation) + 2958 40 clang 0x00000000008cb90b clang::Parser::ParseDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, unsigned int, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&) + 955 41 clang 0x00000000008b7f7f clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) + 639 42 clang 0x00000000008b8792 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 178 43 clang 0x00000000008ae9ad clang::ParseAST(clang::Sema&, bool, bool) + 493 44 clang 0x00000000005c5baa clang::FrontendAction::Execute() + 202 45 clang 0x00000000005a5ead clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 285 46 clang 0x000000000058dd3e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1582 47 clang 0x0000000000587ea8 cc1_main(char const**, char const**, char const*, void*) + 1160 48 clang 0x00000000005865a8 main + 632 49 libc.so.6 0x00002b78008897ed __libc_start_main + 237 50 clang 0x00000000005878d1 Stack dump: 0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name mark-compact.cc -mrelocation-model static -mdisable-fp-elim -relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.22 -momit-leaf-frame-pointer -g -ffunction-sections -fdata-sections -coverage-file /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/heap/mark-compact.o -resource-dir /usr/bin/../lib/clang/3.4 -dependency-file /build/nodejs-6.5.0/out/Release/.deps//build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/heap/mark-compact.o.d.raw -MT /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/heap/mark-compact.o -D V8_TARGET_ARCH_X64 -D ENABLE_DISASSEMBLER -D V8_I18N_SUPPORT -D V8_IMMINENT_DEPRECATION_WARNINGS -D ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -D UCONFIG_NO_TRANSLITERATION=1 -D UCONFIG_NO_SERVICE=1 -D UCONFIG_NO_REGULAR_EXPRESSIONS=1 -D U_ENABLE_DYLOAD=0 -D U_STATIC_IMPLEMENTATION=1 -D U_HAVE_STD_STRING=0 -D UCONFIG_NO_BREAK_ITERATION=0 -D UCONFIG_NO_LEGACY_CONVERSION=1 -D UCONFIG_NO_CONVERSION=1 -D _FORTIFY_SOURCE=2 -I ../deps/v8 -I ../deps -I ../deps/icu/source/i18n -I ../deps/icu/source/common -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6 -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/x86_64-linux-gnu -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/backward -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/../../../../include/x86_64-linux-gnu/c++/4.6 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-externc-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/4.6/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wall -Wextra -Wno-unused-parameter -Wformat -Wformat-security -std=gnu++0x -fdeprecated-macro -fdebug-compilation-dir /build/nodejs-6.5.0/out -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 1 -stack-protector-buffer-size 4 -mstackrealign -fno-rtti -fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/heap/mark-compact.o -x c++ ../deps/v8/src/heap/mark-compact.cc 1. ../deps/v8/src/heap/mark-compact.cc:3502:65: current parser token '}' 2. ../deps/v8/src/heap/mark-compact.cc:32:1: parsing namespace 'v8' 3. ../deps/v8/src/heap/mark-compact.cc:33:1: parsing namespace 'internal' 4. ../deps/v8/src/heap/mark-compact.cc:3498:71: parsing function body 'UpdatePointersInParallel' 5. ../deps/v8/src/heap/mark-compact.cc:3498:71: in compound statement ('{}') 6. ../deps/v8/src/heap/mark-compact.cc:3502:13: lambda expression parsing 7. ../deps/v8/src/heap/mark-compact.cc:3502:40: in compound statement ('{}') /usr/bin/clang++ '-DV8_TARGET_ARCH_X64' '-DENABLE_DISASSEMBLER' '-DV8_I18N_SUPPORT' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_CONVERSION=1' -I../deps/v8 -I../deps -I../deps/icu/source/i18n -I../deps/icu/source/common -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /build/nodejs-6.5.0/out/Release/.deps//build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/control-flow-builders.o.d.raw -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -c -o /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/control-flow-builders.o ../deps/v8/src/interpreter/control-flow-builders.cc /usr/bin/clang++ '-DV8_TARGET_ARCH_X64' '-DENABLE_DISASSEMBLER' '-DV8_I18N_SUPPORT' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC' '-DUCONFIG_NO_TRANSLITERATION=1' '-DUCONFIG_NO_SERVICE=1' '-DUCONFIG_NO_REGULAR_EXPRESSIONS=1' '-DU_ENABLE_DYLOAD=0' '-DU_STATIC_IMPLEMENTATION=1' '-DU_HAVE_STD_STRING=0' '-DUCONFIG_NO_BREAK_ITERATION=0' '-DUCONFIG_NO_LEGACY_CONVERSION=1' '-DUCONFIG_NO_CONVERSION=1' -I../deps/v8 -I../deps -I../deps/icu/source/i18n -I../deps/icu/source/common -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++0x -MMD -MF /build/nodejs-6.5.0/out/Release/.deps//build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/handler-table-builder.o.d.raw -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -c -o /build/nodejs-6.5.0/out/Release/obj.target/v8_base/deps/v8/src/interpreter/handler-table-builder.o ../deps/v8/src/interpreter/handler-table-builder.cc clang: error: unable to execute command: Segmentation fault (core dumped) clang: error: clang frontend command failed due to signal (use -v to see invocation)@chrislea Thanks. It's hitting an ICE, an internal compiler error. You're using clang 3.4.1 now. Is testing with 3.4.2 an option for you?
If that doesn't fix the issue, we have three options:
- Revert the V8 upgrade. (I don't think this is really an option but I put it in for completeness.)
- Tweak mark-compact.cc until it avoids the ICE.
- Update the minimally supported clang version to 3.5 or 3.6.
I think 3. is out of the question - that's effectively a breaking change.
Revert the V8 upgrade.
Less breaking than 3. at this point.
@bnoordhuis going to a newer version of clang is not immediately possible, as in, I can't do it in the next 30min. But I can look into it and see how much work will be involved.
Why is 3 a breaking change?
We're now failing to compile on mainstream linux distros we previously compiled on...?
Yes, but that is not a breaking change for users. People who build packages are impacted, yes, but if we can build a package successfully using either 3.5 that is compatible on that distro, it is not a breaking change.
Reacted by Sean Vieira and Leo Dutra39 remaining items
- added a commit that references this issue
on Feb 14, 2017
Our package builds for Debian Wheezy, Ubuntu Precise, and perhaps others, are failing on v6.5.0 using
clang-3.4.This seems to be a regression possibly introduced by V8 5.1.
See also: #8054 (comment)
cc @nodejs/v8 @nodejs/ctc