[cfe-dev] transient link failures when building clang examples

Jay Foad jay.foad at gmail.com
Mon Aug 1 05:04:53 PDT 2011


When rebuilding llvm+clang with "make -j2 BUILD_EXAMPLES=1", I
frequently see link failures like this:

llvm[4]: Linking Release+Asserts executable clang-interpreter (without symbols)
/usr/bin/ld: /home/jay/llvm/objdir/Release+Asserts/lib/libclangCodeGen.a(CodeGenModule.o):
in function clang::CodeGen::CodeGenModule::EmitAliasDefinition(clang::GlobalDecl):CodeGenModule.cpp(.text+0x983b):
error: undefined reference to
'llvm::GlobalAlias::GlobalAlias(llvm::Type*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Constant*,
llvm::Module*)'
/usr/bin/ld: /home/jay/llvm/objdir/Release+Asserts/lib/libclangCodeGen.a(TargetInfo.o):
in function (anonymous
namespace)::MSP430TargetCodeGenInfo::SetTargetAttributes(clang::Decl
const*, llvm::GlobalValue*, clang::CodeGen::CodeGenModule&)
const:TargetInfo.cpp(.text+0x15a0): error: undefined reference to
'llvm::GlobalAlias::GlobalAlias(llvm::Type*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Constant*,
llvm::Module*)'
/usr/bin/ld: /home/jay/llvm/objdir/Release+Asserts/lib/libclangCodeGen.a(TargetInfo.o):
in function (anonymous
namespace)::MBlazeTargetCodeGenInfo::SetTargetAttributes(clang::Decl
const*, llvm::GlobalValue*, clang::CodeGen::CodeGenModule&)
const:TargetInfo.cpp(.text+0xaf42): error: undefined reference to
'llvm::GlobalAlias::GlobalAlias(llvm::Type*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Constant*,
llvm::Module*)'
/usr/bin/ld: /home/jay/llvm/objdir/Release+Asserts/lib/libclangCodeGen.a(CGCXX.o):
in function clang::CodeGen::CodeGenModule::TryEmitDefinitionAsAlias(clang::GlobalDecl,
clang::GlobalDecl):CGCXX.cpp(.text+0x9e5): error: undefined reference
to 'llvm::GlobalAlias::GlobalAlias(llvm::Type*,
llvm::GlobalValue::LinkageTypes, llvm::Twine const&, llvm::Constant*,
llvm::Module*)'
collect2: ld returned 1 exit status
make[4]: *** [/home/jay/llvm/objdir/Release+Asserts/bin/clang-interpreter]
Error 1

The failures tend to go away if I rerun the "make", so I've been
ignoring them for a while.

I'm using configure, not cmake.

Thanks,
Jay.



More information about the cfe-dev mailing list