Bug 750187

Summary: llvm needs to be updated for gcc 4.6.2
Product: [Fedora] Fedora Reporter: David Tardon <dtardon>
Component: llvmAssignee: Michel Lind <michel>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 16CC: bogado, bos, cesarb, dmalcolm, john.haxby, js, kklic, mark, michel, nerijus, peter, rh, schlaffi, stefan.friesel, theblessedadventhope, vonbrand
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: llvm-2.9-6.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-04 05:32:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch none

Description David Tardon 2011-10-31 09:55:33 UTC
Created attachment 530935 [details]
patch

Description of problem:
Any compilation with clang fails in the linker phase because of missing -L/usr/lib/gcc/x86_64-redhat-linux/4.6.2 .

Version-Release number of selected component (if applicable):
llvm-2.9-5.fc16.x86_64

How reproducible:
always

Steps to Reproduce:
1. echo 'int main(void) {return 0;}' > testcase.c
2. clang testcase.c
  
Actual results:
/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)

Expected results:
Compilation finishes and a.out is created.

Comment 1 David Tardon 2011-11-28 08:12:44 UTC
*** Bug 755356 has been marked as a duplicate of this bug. ***

Comment 2 David Tardon 2011-11-28 08:13:26 UTC
*** Bug 757241 has been marked as a duplicate of this bug. ***

Comment 3 David Tardon 2011-11-28 08:20:16 UTC
Note: given that llvm needs exact version of gcc, it should use versioned require for it. This way this kind of problem would be detected by broken dependencies.

Comment 4 Karel Klíč 2011-12-12 20:10:11 UTC
I've just been hit by this bug. Failed to link anything compiled with clang.

Would it be worthwhile submitting an update with just this fix?

Comment 5 Julian Stecklina 2011-12-12 21:28:22 UTC
By all means, yes. It's not that it is useful for anything right now.

Comment 6 Peter TB Brett 2011-12-12 22:06:27 UTC
I thought I'd try out clang.  So I installed it with yum, like I install all the other packages I want to try out.  I don't think it's unreasonable that when I install a compiler package, I get a compiler that works. :-P

I'm slightly surprised and disappointed that a bug that makes a package *completely useless* has been sitting around untouched for a month and a half!

Comment 7 Aravind vijayan 2011-12-29 14:32:42 UTC
*** Bug 770487 has been marked as a duplicate of this bug. ***

Comment 8 David Tardon 2012-01-30 06:42:08 UTC
*** Bug 742406 has been marked as a duplicate of this bug. ***

Comment 9 john.haxby@oracle.com 2012-02-01 13:09:36 UTC
The fix is dead simple: Add "4.6.2" to the list of gcc versions in clang-2.9-add_gcc_vers.patch (part of the SRPM) and rebuild.   You might want to increment the release number in the .spec file so that the RPMs will be an upgrade.

Comment 10 john.haxby@oracle.com 2012-02-01 13:11:37 UTC
I meant to add that since the patch is so simple, why can't this just be pushed out?

Comment 11 Michel Lind 2012-02-02 01:53:49 UTC
Apologies; was trying to fix another unrelated problem, but of course as you pointed out the supported compiler list needs updating. Thankfully this goes away with 3.0 (unfortunately we have bigger problems there with GCC 4.7)

Comment 12 Fedora Update System 2012-02-02 09:04:37 UTC
llvm-2.9-6.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/llvm-2.9-6.fc16

Comment 13 Fedora Update System 2012-02-02 17:26:13 UTC
Package llvm-2.9-6.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing llvm-2.9-6.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-1188/llvm-2.9-6.fc16
then log in and leave karma (feedback).

Comment 14 Fedora Update System 2012-02-04 05:32:28 UTC
llvm-2.9-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.