<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<span class="Apple-style-span" style="font-family: Tahoma, Verdana, Arial, sans-serif; color: rgb(42, 42, 42); "><p class="ecxMsoNormal" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">Hi  Clang Developers,</font></p><p class="ecxMsoNormal" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "> </font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">I downloaded the latest revision (r123891) of LLVM via SVN and followed the instructions at <a href="http://clang.llvm.org/get_started.html" target="_blank" style="line-height: 17px; font-weight: inherit; text-decoration: underline; color: rgb(0, 104, 207); cursor: pointer; ">http://clang.llvm.org/get_started.html</a>  to configure and build.</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">After building, compiling a simple C code gives follwing error:</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" color="#2A2A2A" size="2" face="Tahoma" style="line-height: normal; "><span class="ecxApple-style-span" style="line-height: 17px; ">/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/bin/ld: crtbegin.o: No such file: No such file or directory</span></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" color="#2A2A2A" size="2" face="Tahoma" style="line-height: normal; "><span class="ecxApple-style-span" style="line-height: 17px; ">clang: error: linker command failed with exit code 1 (use -v to see invocation)</span></font></p><br style="line-height: 17px; "><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">After searching for error, i followed instructions at <span class="ecxApple-style-span" style="line-height: normal; color: rgb(0, 0, 0); "><a href="http://stackoverflow.com/questions/4160262/clang-linker-problem" target="_blank" style="line-height: 17px; font-weight: inherit; text-decoration: underline; color: rgb(0, 104, 207); cursor: pointer; ">http://stackoverflow.com/questions/4160262/clang-linker-problem</a>.</span></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><span class="ecxApple-style-span" style="line-height: normal; color: rgb(0, 0, 0); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></span></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; color: rgb(42, 42, 42); "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><span class="ecxApple-style-span" style="line-height: normal; color: rgb(0, 0, 0); ">Hence I added the paths for crtbegin.o, crtend.o, crti.o,crt1.o,etc by adding following lines to llvm/tools/</span><span class="ecxApple-style-span" style="line-height: 18px; color: rgb(0, 0, 0); border-collapse: collapse; ">clang/lib/Driver/ToolChains.cpp :</span></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><span class="ecxApple-style-span" style="line-height: 18px; border-collapse: collapse; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></span></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">Paths.push_back("<span class="ecxApple-style-span" style="line-height: 18px; border-collapse: collapse; ">/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/</span>lib/gcc/x86_64-unknown-linux-gnu/3.4.2");</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">Paths.push_back("<span class="ecxApple-style-span" style="line-height: 18px; border-collapse: collapse; ">/u/asudani/project/gccnew/gcc-3.4.2-glibc-2.3.3/x86_64-unknown-linux-gnu/x86_64-unknown-linux-gnu/sys-root</span>/usr/lib64");</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">But this doesn't works.</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">How should I proceed to rectify the specified clang linker problem ?</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; "><br style="line-height: 17px; "></font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">Thanks,</font></p><p class="ecxMsoPlainText" style="line-height: 17px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.35em; margin-left: 0px; "><font class="ecxApple-style-span" face="Tahoma" size="2" style="line-height: normal; ">Mohit Asudani</font></p></span>                                     </body>
</html>