Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

"error: ‘trunk’ was not declared in this scope" while compiling clang #22815

Open Quuxplusone opened 9 years ago

Quuxplusone commented 9 years ago
Bugzilla Link PR22816
Status NEW
Importance P normal
Reported by Andreas Fink (andreas@fink.org)
Reported on 2015-03-06 00:42:53 -0800
Last modified on 2015-03-06 16:09:35 -0800
Version trunk
Hardware PC Linux
CC llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
System: stock debian7 64bit

checkout from SVN: llvm, clang, lldb, extra, compiler-rt

configure like this:

CC=gcc CXX=g++ ../llvm/configure --enable-targets=all

fails to compile:

llvm[4]: Compiling ASTWriter.cpp for Debug+Asserts build
/Users/afink/llvm/llvm/tools/clang/lib/Serialization/ASTWriter.cpp: In member
function ‘void clang::ASTWriter::WriteControlBlock(clang::Preprocessor&,
clang::ASTContext&, llvm::StringRef, const string&)’:
/Users/afink/llvm/llvm/tools/clang/lib/Serialization/ASTWriter.cpp:1155:20:
error: ‘trunk’ was not declared in this scope
/Users/afink/llvm/llvm/tools/clang/lib/Serialization/ASTWriter.cpp:1156:39:
error: no matching function for call to ‘llvm::SmallVector<long unsigned int,
64u>::push_back()’
/Users/afink/llvm/llvm/tools/clang/lib/Serialization/ASTWriter.cpp:1156:39:
note: candidate is:
In file included from /Users/afink/llvm/llvm/include/llvm/ADT/ArrayRef.h:14:0,
                 from /Users/afink/llvm/llvm/include/llvm/ADT/APInt.h:19,
                 from /Users/afink/llvm/llvm/include/llvm/ADT/APFloat.h:20,
                 from /Users/afink/llvm/llvm/tools/clang/lib/Serialization/../../include/clang/AST/APValue.h:18,
                 from /Users/afink/llvm/llvm/tools/clang/lib/Serialization/../../include/clang/AST/Decl.h:17,
                 from /Users/afink/llvm/llvm/tools/clang/lib/Serialization/../../include/clang/Serialization/ASTWriter.h:18,
                 from /Users/afink/llvm/llvm/tools/clang/lib/Serialization/ASTWriter.cpp:14:
/Users/afink/llvm/llvm/include/llvm/ADT/SmallVector.h:328:8: note: void
llvm::SmallVectorTemplateBase<T, true>::push_back(const T&) [with T = long
unsigned int]
/Users/afink/llvm/llvm/include/llvm/ADT/SmallVector.h:328:8: note:   candidate
expects 1 argument, 0 provided
/bin/rm: cannot remove `/Users/afink/llvm/llvm-
build/tools/clang/lib/Serialization/Debug+Asserts/ASTWriter.d.tmp': No such
file or directory

trying to compile using CMAKE fails too but with other errors (will open other
ticket)
Quuxplusone commented 9 years ago

CLANG_VERSION_MINOR somehow got set to 'trunk', rather than to a number. Perhaps something is clobbering PACKAGE_VERSION.