[LLVMdev] libclang_rt.asan-x86_64.a: No such file or directory

Alexey Samsonov vonosmas at gmail.com
Tue Apr 21 10:30:34 PDT 2015


+Chris

Oh, I see. We've dropped support for ASan in autotools build a while ago.
The recommended build process now involves CMake:
http://llvm.org/docs/GettingStarted.html#getting-started-quickly-a-summary

I will update the www page shortly.

On Tue, Apr 21, 2015 at 5:35 AM, Dave Mitchell <davem at iabyn.com> wrote:

> I just tried building the latest clang following the instructions in
> http://clang.llvm.org/get_started.html, and got this error when trying to
> compile at test program:
>
> /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
>
> This thread:
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084175.html
>
> indicates that the solution is to start with a clean build, but that's
> what I just tried, and it still failed.
>
> Here's my install log:
>
> $ rm -rf ~/tmp/clang
> $ mkdir ~/tmp/clang; cd ~/tmp/clang
> $ svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
> $ cd llvm/tools
> $ svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
> $ cd ../..
> $ export clang_version=235086
> $ cd llvm/tools/clang/tools
> $ svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
> $ cd ../../../..
> $ cd llvm/projects
> $ svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
> $ cd ../..
> $ mkdir $HOME/clang-$clang_version
> $ mkdir build; cd build
> $ ../llvm/configure --prefix=$HOME/clang-$clang_version --enable-optimized
> --disable-assertions
> $ make && make install
> $ cd ~/tmp; mv clang/ clang.hide # make sure build dir isn't needed
>
> $ bash
> $ PATH=/home/davem/clang-$clang_version/bin:$PATH
> $ echo $PATH
>
> /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
> $ which clang
> ~/clang-235334/bin/clang
> $ cat d.c
> int main(int argc, char**argv)
> {
>     char *p = (char*)0x1234;
>     *p = 0;
> }
>
> $ clang -fsanitize=address -o d d.c
> /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
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>
> This recipe has worked for me in the past.
>
>
> --
> "Do not dabble in paradox, Edward, it puts you in danger of fortuitous
> wit."
>     -- Lady Croom, "Arcadia"
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150421/3a9ce73e/attachment.html>


More information about the llvm-dev mailing list