<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Those look like the linker is being passed the same .o file built twice, ex:</div><div>  <span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; ">../Objects-normal/x86_64/asan_globals_test.o</span></div><div><span class="Apple-style-span" style="font-family: Menlo; font-size: 11px; "> ../</span><span class="Apple-style-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>On Dec 19, 2012, at 9:48 AM, Relph, Richard wrote:</div><blockquote type="cite">

<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">

<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
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 asan_mac_test.mm. 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; text-indent: -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; text-indent: -12px; font-size: 11px; font-family: Menlo; ">
    cd /Volumes/Shared/NewShared/llvm/3.2/source</div>
<div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">
    setenv MACOSX_DEPLOYMENT_TARGET 10.8</div>
<div style="margin: 0px 0px 0px 12px; text-indent: -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; text-indent: -12px; font-size: 11px; font-family: Menlo; min-height: 13px; ">
<br>
</div>
<div style="margin: 0px 0px 0px 12px; text-indent: -12px; font-size: 11px; font-family: Menlo; ">
duplicate symbol __Z11GlobalsTesti in:</div>
<div style="margin: 0px 0px 0px 12px; text-indent: -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; text-indent: -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; text-indent: -12px; font-size: 11px; font-family: Menlo; ">
duplicate symbol _kStartupStr in:</div>
<div style="margin: 0px 0px 0px 12px; text-indent: -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; text-indent: -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; text-indent: -12px; font-size: 11px; font-family: Menlo; ">
and 370 more…</div>
</div>
</div>

_______________________________________________<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">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></body></html>