<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Right, I forgot to delete llvm-build.<div><br></div><div>I deleted llvm-build and made a clean build, but now I get different linker errors. First, I get about 50 warnings that there is direct access to several weak symbols from lldb-platform:</div><div><br></div><div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">ld: warning: direct access in (anonymous namespace)::ASTInfoCollector::ReadLanguageOptions(clang::LangOptions const&, bool) to global weak symbol llvm::IntrusiveRefCntPtr<clang::TargetInfo>::getPtr() const means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">ld: warning: direct access in (anonymous namespace)::ASTInfoCollector::ReadTargetOptions(clang::TargetOptions const&, bool) to global weak symbol llvm::IntrusiveRefCntPtr<clang::TargetInfo>::getPtr() const means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">ld: warning: direct access in (anonymous namespace)::ASTInfoCollector::ReadTargetOptions(clang::TargetOptions const&, bool) to global weak symbol llvm::IntrusiveRefCntPtr<clang::TargetInfo>::getPtr() const means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.</div></div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">[...]</div><div><br></div><div>lldb-platform still compiles (although this looks very odd), but the LLDB framework doesn't compile because symbols used by LLDBWrapPython.cpp are apparently not found (54 of them):</div><div><br></div><div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">  "lldb::SBDebugger::GetSummaryForType(lldb::SBTypeNameSpecifier)", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      __wrap_SBDebugger_GetSummaryForType in LLDBWrapPython.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">  "lldb::SBDebugger::GetSyntheticForType(lldb::SBTypeNameSpecifier)", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      __wrap_SBDebugger_GetSyntheticForType in LLDBWrapPython.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">  "lldb::SBTypeSummary::GetOptions()", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      __wrap_SBTypeSummary_GetOptions in LLDBWrapPython.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">  "lldb::SBTypeSummary::SetOptions(unsigned int)", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      __wrap_SBTypeSummary_SetOptions in LLDBWrapPython.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">  "lldb::SBTypeSummary::GetDescription(lldb::SBStream&, lldb::DescriptionLevel)", referenced from:</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      __wrap_SBTypeSummary_GetDescription in LLDBWrapPython.o</div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">      lldb_SBTypeSummary___str__(lldb::SBTypeSummary*) in LLDBWrapPython.o</div></div><div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo;">[...]</div><div><br></div><div>Any idea?</div><div><br><div><div>Le 2013-11-23 à 00:05:34, Jason Molenda <<a href="mailto:jmolenda@apple.com">jmolenda@apple.com</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">I added --enable-cxx11 to build-llvm.pl, removed my existing llvm-build directory, did a clean build with Xcode and I got a successful link.<br><br>The problem came up due to the changes in r195239.  When included in C++11 mode, SmallPtrSet.h calls a method in SmallPtrSet.cpp (in llvm).  llvm was being built in C++03 mode so the additional method wasn't emitted for SmallPtrSet.o; lldb included SmallPtrSet.h in C++11 mode so a reference to that function was emitted.<br><br>(just to state the obvious - I'm sure we were all on the same page here)<br><br><br><br>On Nov 22, 2013, at 6:42 PM, Félix Cloutier <<a href="mailto:felixcca@yahoo.ca">felixcca@yahoo.ca</a>> wrote:<br><br><blockquote type="cite">I'm building from Xcode, so I guess I need to change scripts/build-llvm.pl. Xcode reports this when I build:<br><br>% cd '/Users/felix/Projets/OpenSource/lldb/llvm-build/Release+Asserts/x86_64' && '/Users/felix/Projets/OpenSource/lldb/llvm/configure' --enable-targets=x86_64,arm --disable-terminfo --enable-cxx11 --enable-optimized --enable-assertions --enable-libcpp --build=x86_64-apple-darwin11<br><br>--enable-cxx11 is there, but even with that build completing successfully I still get the same error.<br><br>Félix<br><br>Le 2013-11-22 à 04:15:21, Arnaud A. de Grandmaison <<a href="mailto:arnaud.adegm@gmail.com">arnaud.adegm@gmail.com</a>> a écrit :<br><br><blockquote type="cite">On 11/22/2013 07:56 AM, Félix Cloutier wrote:<br><blockquote type="cite">Hello people,<br><br>I got the lldb source fresh from SVN, and even after doing the little Python dance for Mavericks (setting SDKROOT to macosx10.8 like Jason Molenda suggested yesterday), I still get compile errors. The linker bails out with this when it tries to link lldb-platform:<br><br>Undefined symbols for architecture x86_64:<br>  "llvm::SmallPtrSetImpl::SmallPtrSetImpl(void const**, unsigned int, llvm::SmallPtrSetImpl&&)", referenced from:<br>      llvm::SmallPtrSet<DWARFDebugInfoEntry const*, 4u>::SmallPtrSet(llvm::SmallPtrSet<DWARFDebugInfoEntry const*, 4u>&&) in liblldb-core.a(SymbolFileDWARF.o)<br>ld: symbol(s) not found for architecture x86_64<br>clang: error: linker command failed with exit code 1 (use -v to see invocation)<br><br>Looking deeper, I found that it is declared like that:<br><br>#if LLVM_HAS_RVALUE_REFERENCES<br>  SmallPtrSetImpl(const void **SmallStorage, unsigned SmallSize,<br>                  SmallPtrSetImpl &&that);<br>#endif<br><br>Could it be that llvm is built without LLVM_HAS_RVALUE_REFERENCES but lldb is built with it?<br><br></blockquote><br>Hi Felix,<br><br>I also got this problem. It comes from the fact that lldb is built in c++11 mode (required), whereas your llvm codebase is built without. You should compile llvm in c++11 as well, or some functions will simply not be in the libraries.<br><br>If your are using cmake, I submitted (but diid not commit) a patch to optionally enable c++11 building with cmake a few hours ago on the llvm-commit list. For an autoconf build, there is an --enable-cxx11 to configure.<br><br>Cheers,<br>--<br>Arnaud<br><br><blockquote type="cite">Félix<br><br><br>_______________________________________________<br>lldb-dev mailing list<br><br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></blockquote><br><br>-- <br>Arnaud A. de Grandmaison<br><br></blockquote><br>_______________________________________________<br>lldb-dev mailing list<br><a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev<br></blockquote><br></blockquote></div><br></div></body></html>