Please help me. How do I fix this bug @ubuntu:~/Documents/test$ clang hello.c -o hello /usr/bin/ld: cannot find crt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: cannot find crtbegin.o: No such file or directory /usr/bin/ld: cannot find -lgcc /usr/bin/ld: cannot find -lgcc_s clang-2: error: linker command failed with exit code 1 (use -v to see invocation) Best regards, Huy Mobile: 01668178291 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141130/f05fb2dd/attachment.html>
Dose this help? http://stackoverflow.com/questions/6329887/compiling-problems-cannot-find-crt1-o Jingyue On Sun Nov 30 2014 at 7:53:38 AM huyite <huyite.vn at gmail.com> wrote:> Please help me. > > How do I fix this bug > > > > @ubuntu:~/Documents/test$ clang hello.c -o hello > > /usr/bin/ld: cannot find crt1.o: No such file or directory > > /usr/bin/ld: cannot find crti.o: No such file or directory > > /usr/bin/ld: cannot find crtbegin.o: No such file or directory > > /usr/bin/ld: cannot find -lgcc > > /usr/bin/ld: cannot find -lgcc_s > > clang-2: error: linker command failed with exit code 1 (use -v to see > invocation) > > Best regards, > > Huy > > > > *Mobile: 01668178291* > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141130/b9c56336/attachment.html>
On 30 November 2014 at 15:51, huyite <huyite.vn at gmail.com> wrote:> Please help me. > > How do I fix this bug > > > > @ubuntu:~/Documents/test$ clang hello.c -o hello > > /usr/bin/ld: cannot find crt1.o: No such file or directory > > /usr/bin/ld: cannot find crti.o: No such file or directory > > /usr/bin/ld: cannot find crtbegin.o: No such file or directory > > /usr/bin/ld: cannot find -lgcc > > /usr/bin/ld: cannot find -lgcc_sThis is (probably) not a bug. Either clang or your system in set up incorrectly because it can't find the necessary files needed by the linker (ld). Are you using the pre-built binaries? If you are it wouldn't surprise me if they didn't work "out of the box" due to differences between your system and the system the binaries were built on. Seeing as you're using Ubuntu (or at least that's what your e-mail suggests) why don't you just use the packages [1] that are provided? [1] http://llvm.org/apt/
Yes, I am using the pre-built binaries. Because, I would like to modify some algorithms in llvm. How to pre-built that it is work -----Original Message----- From: Dan Liew [mailto:dan at su-root.co.uk] Sent: Monday, December 1, 2014 12:25 AM To: huyite Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] How to fix bug On 30 November 2014 at 15:51, huyite <huyite.vn at gmail.com> wrote:> Please help me. > > How do I fix this bug > > > > @ubuntu:~/Documents/test$ clang hello.c -o hello > > /usr/bin/ld: cannot find crt1.o: No such file or directory > > /usr/bin/ld: cannot find crti.o: No such file or directory > > /usr/bin/ld: cannot find crtbegin.o: No such file or directory > > /usr/bin/ld: cannot find -lgcc > > /usr/bin/ld: cannot find -lgcc_sThis is (probably) not a bug. Either clang or your system in set up incorrectly because it can't find the necessary files needed by the linker (ld). Are you using the pre-built binaries? If you are it wouldn't surprise me if they didn't work "out of the box" due to differences between your system and the system the binaries were built on. Seeing as you're using Ubuntu (or at least that's what your e-mail suggests) why don't you just use the packages [1] that are provided? [1] http://llvm.org/apt/