<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">Hi Richard!<div><br>On Thu, Dec 20, 2012 at 12:48 AM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Those look like the linker is being passed the same .o file built twice, ex:</div>
<div> <span style="font-family:Menlo;font-size:11px">../Objects-normal/x86_64/asan_globals_test.o</span></div><div><span style="font-family:Menlo;font-size:11px"> ../</span><span style="font-family:Menlo;font-size:11px">lib/asan/tests/asan_globals_test.cc.asan.o</span></div>
<div><br></div><div>So, the symbols are colliding. Something is set up wrong in the xcode project.</div><div><br></div><div>-Nick</div><br><div><div><div class="h5"><div>On Dec 19, 2012, at 9:48 AM, Relph, Richard wrote:</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div style="word-wrap:break-word">
Following a blend of instructions on 3 web pages, I have succeeded in getting LLVM 3.2 (with clang, extras, and compiler-rt) building - but not testing - on Xcode. I used CMake 2.8.10 GUI to create the Xcode project file. Below are my notes.
<div><br>
</div>
<div>First, I believe CMake ends up setting things up so that Xcode has 1 warning after scanning the project having to do with hires images or some such… it takes a long time to fix that up in a project as large as this, but I'm not sure there's anything we
can do about it.</div>
<div>Second, a build of the ALL_BUILD target in Xcode produces 16 warnings about 8 functions declared noreturn, but without a expected __builtin_unreachable() before the end of the function. (The first attempt to build produced 2 errors, the first an unable
to create directory error for runtime/libprofile/LLVM.build/Debug/profile_rt-static.build/Objects-normal/x86_64; the second a libtool failure… both went away upon a rebuild.)</div>
<div>Third, a build of the check-all target produced 8 warnings about the 8 functions declared noreturn as for ALL_BUILD, and 6 or 7 "errors", mostly from <a href="http://asan_mac_test.mm" target="_blank">asan_mac_test.mm</a>. After fixing up these "errors" (int vs. size_t comparisons and malloc being assigned
to volatile pointers), I got 372 duplicate symbol errors from this:</div>
<div><br>
</div>
<div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
Ld /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest normal x86_64</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
cd /Volumes/Shared/NewShared/llvm/3.2/source</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
setenv MACOSX_DEPLOYMENT_TARGET 10.8</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug
-F/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug -filelist /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/AsanTest.LinkFileList -mmacosx-version-min=10.8
-framework Foundation -Wl,-search_paths_first -Wl,-headerpad_max_install_names -lpthread /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest_main.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a
/Volumes/Shared/NewShared/llvm/3.2/xcode/lib/clang/3.2/lib/darwin/Debug/libclang_rt.asan_osx.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libgtest.a /Volumes/Shared/NewShared/llvm/3.2/xcode/lib/Debug/libLLVMSupport.a -lpthread -fobjc-link-runtime /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o
/Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_test.cc.asan.o /Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o -o /Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/Debug/AsanTest</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo;min-height:13px">
<br>
</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
duplicate symbol __Z11GlobalsTesti in:</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_globals_test.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
/Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_globals_test.cc.asan.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
duplicate symbol _kStartupStr in:</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
/Volumes/Shared/NewShared/llvm/3.2/xcode/projects/compiler-rt/lib/asan/tests/LLVM.build/Debug/AsanTest.build/Objects-normal/x86_64/asan_mac_test.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
/Volumes/Shared/NewShared/llvm/3.2/source/../xcode/projects/compiler-rt/lib/asan/tests/asan_mac_test.mm.asan.o</div>
<div style="margin:0px 0px 0px 12px;font-size:11px;font-family:Menlo">
and 370 more…</div>
</div>
</div></div></div>
</blockquote></div></div></blockquote><div>Recently the way we build ASan unit tests has changed. Could you please check if your XCode build works for the trunk?</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><blockquote type="cite">_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</div></div>