Dave Mitchell
2015-Apr-21 12:35 UTC
[LLVMdev] libclang_rt.asan-x86_64.a: No such file or directory
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"
Alexey Samsonov
2015-Apr-21 17:30 UTC
[LLVMdev] libclang_rt.asan-x86_64.a: No such file or directory
+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>
Dave Mitchell
2015-Apr-21 20:52 UTC
[LLVMdev] libclang_rt.asan-x86_64.a: No such file or directory
On Tue, Apr 21, 2015 at 10:30:34AM -0700, Alexey Samsonov wrote:> 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-summaryThat did the trick, thanks. -- Wesley Crusher gets beaten up by his classmates for being a smarmy git, and consequently has a go at making some friends of his own age for a change. -- Things That Never Happen in "Star Trek" #18
I have architecture in which only legal type supported is i64. So inside getCopyToParts() function. when ValueVT=f32 and PartVT==i64 I added code to handle this condition inside if(NumParts * PartBits > ValueVT.getSizeInBits()) block as follows: if(ValueVT == EVT(MVT::f32) && PartVT == MVT::i64){ SDValue IntMVal = DAG.getNode(ISD::FP_EXTEND, DL, MVT::f64, Val); Val = DAG.getNode(ISD::BITCAST, DL, PartVT, IntMVal); } And inside getCopyFromParts() function at the end I added: if(ValueVT == EVT(MVT::f32)) { SDValue IntMVal = DAG.getNode(ISD::TRUNCATE, DL, EVT(MVT::i32), Val); return DAG.getNode(ISD::BITCAST, DL, ValueVT, IntMVal); } After giving -debug to llc, in Optimized lowered selection DAG phase I get sequence: 0x21103e0: i64,ch = CopyFromReg 0x20d86e0, 0x210e6b0 [ORD=4] 0x210e7b0: i32 = truncate 0x21103e0 [ORD=4] 0x2110ce0: f32 = bitcast 0x210e7b0 [ORD=4] 0x210ffd0: f32 = ConstantFP<1.000000e+00> 0x210e5b0: f32 = fadd 0x2110ce0, 0x210ffd0 [ORD=4] 0x210f7d0: f64 = fp_extend 0x210e5b0 [ORD=4] 0x210f3d0: i64 = bitcast 0x210f7d0 [ORD=4] 0x210deb0: ch = CopyToReg 0x20d86e0, 0x21106e0, 0x210f3d0 [ORD=4] after this llc fails in Legalizer: "Operand not processed? 0x210deb0: ch = CopyToReg 0x20d86e0, 0x21106e0, 0x2125d30 [ORD=4] [ID=1] " with third operand of CopyToReg some garbage value. What am I doing wrong ? Thanks, Akhsay.