[LLVMdev] How to fix bug

Dan Liew dan at su-root.co.uk
Sun Nov 30 09:25:10 PST 2014


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_s

This 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/



More information about the llvm-dev mailing list