[cfe-dev] need help

Andy Somerville andy.somerville at gmail.com
Mon May 30 21:33:42 PDT 2011


On Tue, May 17, 2011 at 7:13 PM, Eric Christopher <echristo at apple.com> wrote:
>
> On May 17, 2011, at 3:52 PM, Wei Li wrote:
>
>
> On Tue, May 17, 2011 at 5:04 PM, Eric Christopher <echristo at apple.com>
> wrote:
>>
>> On May 17, 2011, at 3:02 PM, Wei Li wrote:
>>
>>
>> On Tue, May 17, 2011 at 3:33 PM, Eric Christopher <echristo at apple.com>
>> wrote:
>>>
>>> On May 17, 2011, at 1:29 PM, Wei Li wrote:
>>>
>>> Yes! I am not clear about the error. Here is the output when I used -V
>>> flag
>>>
>>> ------
>>>
>>>  "/usr/bin/ld" --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-XRbuBS.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
>>> /usr/bin/ld: crtbegin.o: No such file: No such file or directory
>>> clang: error: linker command failed with exit code 1 (use -v to see
>>> invocation)
>>> --------------
>>>
>>> I am unable to find the location of crtbegin.o on my system.
>>>
>>> find / -name crtbegin.o -print
>>
> here the locations....
> I tried compiling by linking them but getting the same error
> /usr/lib/gcc/x86_64-redhat-linux/4.1.1/32/crtbegin.o
> /usr/lib/gcc/x86_64-redhat-linux/4.1.1/crtbegin.o
> Thanks for th help
>
> I committed a patch here:
> [yendi:llvm/tools/clang] echristo% svn ci
> Sending        lib/Driver/ToolChains.cpp
> Sending        lib/Frontend/InitHeaderSearch.cpp
> Transmitting file data ..
> Committed revision 131505.
> which should help you. Go ahead and rebuild top of tree again and let me
> know.
> -eric

I dont known if the OP replied, but I'm at latest with llvm (r132323)
and clang(132321) running on Ubuntu 10.04 and am still having this
same issue:


clang++ test.o -v
clang version 3.0 (trunk 132323)
Target: i386-pc-linux-gnu
Thread model: posix
 "/usr/bin/ld" -z relro --hash-style=gnu --build-id --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out
/usr/lib/../lib/crt1.o /usr/lib/../lib/crti.o crtbegin.o -L
-L/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/../../..
-L/usr/lib/ test.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
crtend.o /usr/lib/../lib/crtn.o
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lgcc
clang: error: linker command failed with exit code 1 (use -v to see invocation)


      Andy




More information about the cfe-dev mailing list