This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 757241 - clang fails to link "Hello, world"
clang fails to link "Hello, world"
Status: CLOSED DUPLICATE of bug 750187
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michel Alexandre Salim
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-25 18:44 EST by Horst H. von Brand
Modified: 2011-11-28 03:13 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-11-28 03:13:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
The file in the compilation example (63 bytes, text/x-csrc)
2011-11-25 18:44 EST, Horst H. von Brand
no flags Details

  None (edit)
Description Horst H. von Brand 2011-11-25 18:44:02 EST
Created attachment 536481 [details]
The file in the compilation example

Description of problem:
Comoiling the bog-standard "Hello, world" example fails:

$ clang hello.c 
/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: error: linker command failed with exit code 1 (use -v to see invocation)
[vonbrand@netbook1 tmp]$ clang -v hello.c 
clang version 2.9 (tags/RELEASE_29/final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-redhat-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name hello.c -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version 2.21.53.0.1 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/2.9 -ferror-limit 19 -fmessage-length 80 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-dM0GH4.o -x c hello.c
clang -cc1 version 2.9 based upon llvm 2.9 hosted on x86_64-redhat-linux-gnu
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.6.1/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/bin/../lib/clang/2.9/include
 /usr/include
End of search list.
 "/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-dM0GH4.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: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Version-Release number of selected component (if applicable):
llvm-2.9-4.fc16.x86_64
gcc-4.6.2-1.fc16.x86_64
glibc-2.14.90-18.x86_64
glibc-2.14.90-18.i686

How reproducible:
Always...

Steps to Reproduce:
1. clang hello.c
2.
3.
  
Actual results:
Error

Expected results:
Executable file.

Additional info:
Comment 1 David Tardon 2011-11-28 03:13:26 EST

*** This bug has been marked as a duplicate of bug 750187 ***

Note You need to log in before you can comment on or make changes to this bug.