HI,<br><br>I'm trying to execute clang on a simple c program. But I get the following error<br><br><span style="color: rgb(51, 51, 255);"><b>[root@ssan-rhel5u4-07 bin]# </b>./clang -v test.c</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">clang version 3.0 (trunk 136103)</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">Target: x86_64-unknown-linux-gnu</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">Thread model: posix</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"> "/root/llvm/Debug+Asserts/bin/clang" -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name test.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.17.50.0.6 -momit-leaf-frame-pointer -v -resource-dir /root/llvm/Debug+Asserts/bin/../lib/clang/3.0 -ferror-limit 19 -fmessage-length 221 -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-Na8daP.o -x c test.c</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">clang -cc1 version 3.0 based upon llvm 3.0svn hosted on x86_64-unknown-linux-gnu</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">ignoring nonexistent directory "/usr/include/x86_64-linux-gnu"</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">ignoring nonexistent directory "/usr/include/i686-linux-gnu/64"</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">ignoring nonexistent directory "/usr/include/i486-linux-gnu/64"</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">#include "..." search starts here:</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">#include <...> search starts here:</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"> /usr/local/include</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"> /root/llvm/Debug+Asserts/bin/../lib/clang/3.0/include</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);"> /usr/include</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">End of search list.</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);"> "/usr/bin/ld" --hash-style=gnu --no-add-needed --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o crtbegin.o -L -L/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/../../.. /tmp/cc-Na8daP.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed crtend.o /usr/lib/../lib64/crtn.o</span><br>
<b>/usr/bin/ld: crtbegin.o: No such file: No such file or directory</b><br><span style="color: rgb(51, 102, 255);">clang: error: linker command failed with exit code 1 (use -v to see invocation)</span><br><br><b>But when I try to locate the file, I can see them under</b><br>
<br><span style="color: rgb(51, 51, 255);"><b>[root@ssan-rhel5u4-07 bin]#</b> locate crtbegin.o</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux/3.4.6/crtbegin.o</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux/3.4.6/32/crtbegin.o</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux/4.1.1/crtbegin.o</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux/4.1.1/32/crtbegin.o</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/crtbegin.o</span><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">/usr/lib/gcc/x86_64-redhat-linux6E/4.4.0/32/crtbegin.o</span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">/usr/lib/gcc-lib/i386-redhat-linux/2.96/crtbegin.o</span><br>
<br><b>Any suggestions on how to resolve this? </b><br><br>Thanks,<br>Prasanth<br>