<div dir="ltr"><span style="color:rgb(85,85,85);font-size:12.8000001907349px">+Chris</span><br><div><span style="color:rgb(85,85,85);font-size:12.8000001907349px"><br></span></div><div><font color="#555555"><span style="font-size:12.8000001907349px">Oh, I see. We've dropped support for ASan in autotools build a while ago. The recommended build process now involves CMake:</span></font></div><div><span style="font-size:12.8000001907349px;color:rgb(85,85,85)"><a href="http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary">http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary</a></span><br></div><div><span style="font-size:12.8000001907349px;color:rgb(85,85,85)"><br></span></div><div><font color="#555555"><span style="font-size:12.8000001907349px">I will update the www page shortly.</span></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 21, 2015 at 5:35 AM, Dave Mitchell <span dir="ltr"><<a href="mailto:davem@iabyn.com" target="_blank">davem@iabyn.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I just tried building the latest clang following the instructions in<br>
<a href="http://clang.llvm.org/get_started.html" target="_blank">http://clang.llvm.org/get_started.html</a>, and got this error when trying to<br>
compile at test program:<br>
<br>
/usr/bin/ld: cannot find /home/davem/clang-235334/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory<br>
<br>
This thread:<br>
<br>
<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084175.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084175.html</a><br>
<br>
indicates that the solution is to start with a clean build, but that's<br>
what I just tried, and it still failed.<br>
<br>
Here's my install log:<br>
<br>
$ rm -rf ~/tmp/clang<br>
$ mkdir ~/tmp/clang; cd ~/tmp/clang<br>
$ svn co <a href="http://llvm.org/svn/llvm-project/llvm/trunk" target="_blank">http://llvm.org/svn/llvm-project/llvm/trunk</a> llvm<br>
$ cd llvm/tools<br>
$ svn co <a href="http://llvm.org/svn/llvm-project/cfe/trunk" target="_blank">http://llvm.org/svn/llvm-project/cfe/trunk</a> clang<br>
$ cd ../..<br>
$ export clang_version=235086<br>
$ cd llvm/tools/clang/tools<br>
$ svn co <a href="http://llvm.org/svn/llvm-project/clang-tools-extra/trunk" target="_blank">http://llvm.org/svn/llvm-project/clang-tools-extra/trunk</a> extra<br>
$ cd ../../../..<br>
$ cd llvm/projects<br>
$ svn co <a href="http://llvm.org/svn/llvm-project/compiler-rt/trunk" target="_blank">http://llvm.org/svn/llvm-project/compiler-rt/trunk</a> compiler-rt<br>
$ cd ../..<br>
$ mkdir $HOME/clang-$clang_version<br>
$ mkdir build; cd build<br>
$ ../llvm/configure --prefix=$HOME/clang-$clang_version --enable-optimized --disable-assertions<br>
$ make && make install<br>
$ cd ~/tmp; mv clang/ clang.hide # make sure build dir isn't needed<br>
<br>
$ bash<br>
$ PATH=/home/davem/clang-$clang_version/bin:$PATH<br>
$ echo $PATH<br>
/home/davem/clang-235334/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/davem/bin:/home/davem/bin-perl<br>
$ which clang<br>
~/clang-235334/bin/clang<br>
$ cat d.c<br>
int main(int argc, char**argv)<br>
{<br>
    char *p = (char*)0x1234;<br>
    *p = 0;<br>
}<br>
<br>
$ clang -fsanitize=address -o d d.c<br>
/usr/bin/ld: cannot find /home/davem/clang-235334/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>
<br>
This recipe has worked for me in the past.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
"Do not dabble in paradox, Edward, it puts you in danger of fortuitous wit."<br>
    -- Lady Croom, "Arcadia"<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>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>