[LLVMdev] Build error fails at MachineInstr const* for the past two days
Andrew Trick
atrick at apple.com
Fri Jun 8 17:07:20 PDT 2012
On Jun 8, 2012, at 12:52 PM, Marc J. Driftmeyer <mjd at reanimality.com> wrote:
> I keep getting this error upon building:
>
>> Linking CXX executable ../../bin/opt
>> ../../lib/libLLVMTarget.so: error: undefined reference to 'llvm::TargetInstrInfo::getNumMicroOps(llvm::InstrItineraryData const*, llvm::MachineInstr const*) const'
>> ../../lib/libLLVMTarget.so: error: undefined reference to 'llvm::TargetInstrInfo::getInstrLatency(llvm::InstrItineraryData const*, llvm::MachineInstr const*, unsigned int*) const'
>> ../../lib/libLLVMTarget.so: error: undefined reference to 'llvm::TargetInstrInfo::hasLowDefLatency(llvm::InstrItineraryData const*, llvm::MachineInstr const*, unsigned int) const'
>> ../../lib/libLLVMTarget.so: error: undefined reference to 'llvm::TargetInstrInfo::getOperandLatency(llvm::InstrItineraryData const*, llvm::MachineInstr const*, unsigned int, llvm::MachineInstr const*, unsigned int) const'
>> clang-3: error: linker command failed with exit code 1 (use -v to see invocation)
>> make[2]: *** [bin/opt] Error 1
>> make[1]: *** [tools/opt/CMakeFiles/opt.dir/all] Error 2
>> make: *** [all] Error 2
>
> Is anyone else getting this outcome?
>
> - Marc
Marc,
Revision numbers are more useful than "last two days". Tobias reported a problem last night. I've committed a few changes hoping to make the situation better. But I haven't been able to verify the problem because my shared-lib build fails immediately as follows:
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_C_COMPILER=/usr/bin/clang -DLLVM_ENABLE_ASSERTIONS=1 ...
Linking CXX shared library ../libLLVMTableGen.dylib
Undefined symbols for architecture x86_64:
"llvm::cl::opt<std::string, false, llvm::cl::parser<std::string> >::setInitialValue(std::string const&)", referenced from:
void llvm::cl::initializer<char [2]>::apply<llvm::cl::opt<std::string, false, llvm::cl::parser<std::string> > >(llvm::cl::opt<std::string, false, llvm::cl::parser<std::string> >&) const in Main.cpp.o
If anyone can reproduce the errors that Marc reported above, contact me directly so we can figure out a fix. Until then, I'll continue trying to reproduce it.
-Andy
More information about the llvm-dev
mailing list