[cfe-dev] clang bootstrap broken on darwin10

Jack Howarth howarth at bromo.med.uc.edu
Sun Mar 6 12:28:19 PST 2011


On Sun, Mar 06, 2011 at 10:34:34AM -0800, Chris Lattner wrote:
> 
> On Mar 5, 2011, at 11:26 AM, Jack Howarth wrote:
> 
> >   I found the origin of the build failure. It is the habitually
> > leaky buildroot in llvm's projects. I have constantly had to deinstall
> > the prior copies of llvm/clang/llvm-gcc42 before the new builds 
> > consistently complete. The problem seems to be that the llvm Makefiles
> > allow the previously installed copies of the llvm shared libraries to be
> > used in later in the builds rather than the newly built copies. I am
> > amazed that this issue isn't run into more often.
> 
> I'm not sure what you mean Jack.  Can you describe more of what you're doing here?
> 
> -Chris

Chris,
   Here is the explicit failure. If I have llvm/clang 2.8 installed and attempt to
build llvm/clang svn, the following build failure occurs...

llvm[2]: Linking Release+Asserts executable FileCheck (without symbols)
g++ -I/sw/src/fink.build/llvm-clang-2.9-0/llvm-2.9/include -I/sw/src/fink.build/llvm-clang-2.9-0/llvm-2.9/utils/FileCheck -I/sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/include -I/sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/utils/FileCheck  -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3  -fno-exceptions -fno-rtti -fno-common -Woverloaded-virtual -Wcast-qual  -L/sw/lib -m64  -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings  -O3 -Wl,-rpath -Wl, at executable_path/../lib -L/sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/Release+Asserts/lib -L/sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/Release+Asserts/lib -Wl,-exported_symbol,_main  -o /sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/Release+Asserts/bin/FileCheck  /sw/src/fink.build/llvm-clang-2.9-0/llvm_objdir/utils/FileCheck/Release+Asserts/FileCheck.o -lLLVMSupport \
	   -lpthread -lm 
Undefined symbols:
  "llvm::sys::Path::eraseFromDisk(bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >*) const", referenced from:
      llvm::tool_output_file::CleanupInstaller::~CleanupInstaller()in libLLVMSupport.a(raw_ostream.o)
  "llvm::llvm_is_multithreaded()", referenced from:
      llvm::cl::extrahelp::extrahelp(char const*)in libLLVMSupport.a(CommandLine.o)
      llvm::cl::extrahelp::extrahelp(char const*)in libLLVMSupport.a(CommandLine.o)
      (anonymous namespace)::HelpPrinter::operator=(bool)in libLLVMSupport.a(CommandLine.o)
      (anonymous namespace)::HelpPrinter::operator=(bool)in libLLVMSupport.a(CommandLine.o)
      (anonymous namespace)::HelpPrinter::operator=(bool)in libLLVMSupport.a(CommandLine.o)
      llvm::cl::ParseCommandLineOptions(int, char**, char const*, bool)in libLLVMSupport.a(CommandLine.o)
      llvm::install_fatal_error_handler(void (*)(void*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), void*)in libLLVMSupport.a(ErrorHandling.o)
      llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) constin libLLVMSupport.a(ManagedStatic.o)
      llvm::llvm_shutdown()      in libLLVMSupport.a(ManagedStatic.o)
  "llvm::sys::Process::FileDescriptorIsDisplayed(int)", referenced from:
      llvm::raw_fd_ostream::is_displayed() const in libLLVMSupport.a(raw_ostream.o)
  "llvm::raw_ostream::write_escaped(llvm::StringRef, bool)", referenced from:
      Pattern::PrintFailureInfo(llvm::SourceMgr const&, llvm::StringRef, llvm::StringMap<llvm::StringRef, llvm::MallocAllocator> const&) constin FileCheck.o
      Pattern::PrintFailureInfo(llvm::SourceMgr const&, llvm::StringRef, llvm::StringMap<llvm::StringRef, llvm::MallocAllocator> const&) constin FileCheck.o
....

Notice that you just blindly link in -lLLVMSupport without any attempt to make certain that it comes from the build directory
and not the installed binaries for llvm/clang.
          Jack



More information about the cfe-dev mailing list