Oleg Smolsky via llvm-dev
2020-Aug-15 18:17 UTC
[llvm-dev] Sanitizers are broken/missing in my build of 10.0.1
<html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body> <p><font face="Calibri">Hi there! I've just tried ASan/MSan in my Clang 10.0.1 installation built from the monorepo tarball this way:</font></p> <p><font face="Calibri">export CC=/opt/gcc-9/bin/gcc<br> export CXX=/opt/gcc-9/bin/g++<br> export LDFLAGS="-Wl,--rpath,/opt/gcc-9/lib64,-L/opt/gcc-9/lib64"<br> </font></p> <p><font face="Calibri">cmake \<br> -DLLVM_ENABLE_PROJECTS="clang" \<br> -DCMAKE_BUILD_TYPE=Release \<br> -DCMAKE_INSTALL_PREFIX:PATH=$destination \<br> ../llvm<br> make</font></p> <p><font face="Calibri"><a class="moz-txt-link-freetext" href="https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz</a><br> </font></p> <p>In that installation I am unable to use ASan/MSan as the corresponding libs are missing. Here is what I get when linking a small executable:</p> <p>/usr/bin/ld: cannot find /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory<br> /usr/bin/ld: cannot find /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan_cxx-x86_64.a: No such file or directory</p> <p>The normal builds work well and executables do function.<br> </p> <p>What am I missing? Do I have to enable an additional project for these libs to get built/installed? (The environment is Ubuntu 16.04.2 x86-64, LLVM is built using GCC-9)<br> </p> <p>Thanks in advance,<br> Oleg.<br> </p> </body> </html>
Brian Cain via llvm-dev
2020-Aug-15 20:30 UTC
[llvm-dev] Sanitizers are broken/missing in my build of 10.0.1
The sanitizers are found in the compiler-rt project. On Sat, Aug 15, 2020, 1:17 PM Oleg Smolsky via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi there! I've just tried ASan/MSan in my Clang 10.0.1 installation built > from the monorepo tarball this way: > > export CC=/opt/gcc-9/bin/gcc > export CXX=/opt/gcc-9/bin/g++ > export LDFLAGS="-Wl,--rpath,/opt/gcc-9/lib64,-L/opt/gcc-9/lib64" > > cmake \ > -DLLVM_ENABLE_PROJECTS="clang" \ > -DCMAKE_BUILD_TYPE=Release \ > -DCMAKE_INSTALL_PREFIX:PATH=$destination \ > ../llvm > make > > > https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz > > In that installation I am unable to use ASan/MSan as the corresponding > libs are missing. Here is what I get when linking a small executable: > > /usr/bin/ld: cannot find > /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.a: No such > file or directory > /usr/bin/ld: cannot find > /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan_cxx-x86_64.a: No > such file or directory > > The normal builds work well and executables do function. > > What am I missing? Do I have to enable an additional project for these > libs to get built/installed? (The environment is Ubuntu 16.04.2 x86-64, > LLVM is built using GCC-9) > > Thanks in advance, > Oleg. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200815/0ef8e5b6/attachment.html>
Oleg Smolsky via llvm-dev
2020-Aug-15 22:18 UTC
[llvm-dev] [EXTERNAL] Re: Sanitizers are broken/missing in my build of 10.0.1
Confirmed, this brings working sanitizers: -DLLVM_ENABLE_PROJECTS="clang;compiler-rt" I wish that was an automatic dependency brought by Clang. Thank you very much! On Sat, Aug 15, 2020 at 1:30 PM Brian Cain <brian.cain at gmail.com> wrote:> The sanitizers are found in the compiler-rt project. > > On Sat, Aug 15, 2020, 1:17 PM Oleg Smolsky via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi there! I've just tried ASan/MSan in my Clang 10.0.1 installation built >> from the monorepo tarball this way: >> >> export CC=/opt/gcc-9/bin/gcc >> export CXX=/opt/gcc-9/bin/g++ >> export LDFLAGS="-Wl,--rpath,/opt/gcc-9/lib64,-L/opt/gcc-9/lib64" >> >> cmake \ >> -DLLVM_ENABLE_PROJECTS="clang" \ >> -DCMAKE_BUILD_TYPE=Release \ >> -DCMAKE_INSTALL_PREFIX:PATH=$destination \ >> ../llvm >> make >> >> >> https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz >> >> In that installation I am unable to use ASan/MSan as the corresponding >> libs are missing. Here is what I get when linking a small executable: >> >> /usr/bin/ld: cannot find >> /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.a: No such >> file or directory >> /usr/bin/ld: cannot find >> /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan_cxx-x86_64.a: No >> such file or directory >> >> The normal builds work well and executables do function. >> >> What am I missing? Do I have to enable an additional project for these >> libs to get built/installed? (The environment is Ubuntu 16.04.2 x86-64, >> LLVM is built using GCC-9) >> >> Thanks in advance, >> Oleg. >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200815/4aeb220c/attachment.html>