Bug 605266 - clang doesn't like the debug "-g" flag
Summary: clang doesn't like the debug "-g" flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: rawhide
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-17 14:27 UTC by Horst H. von Brand
Modified: 2010-10-28 06:22 UTC (History)
5 users (show)

Fixed In Version: llvm-2.7-11.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-10-25 16:41:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Horst H. von Brand 2010-06-17 14:27:37 UTC
Description of problem:
Compiling anything (e.g. the classice hello.c) with "-O2 -g -Wall" fails

Version-Release number of selected component (if applicable):
clang-2.7-5.fc14.x86_64

How reproducible:
Always

Steps to Reproduce:
1. clang -O2 -g -Wall hello.c
2.
3.
  
Actual results:
/tmp/cc-9CgPE8.s: Assembler messages:
/tmp/cc-9CgPE8.s:408: Fatal error: duplicate .debug_line sections
clang: error: assembler command failed with exit code 1 (use -v to see invocation)

Expected results:
a.out

Additional info:

Comment 1 Horst H. von Brand 2010-06-17 14:34:52 UTC
Sorry for the foulup. Bugzilla offered a menu for selecting the component, I selected clang, somehow it got 389-admintool when I submitted the report. "clang" isn't available for changing the component now.

BTW, I also get:

$ clang -O2 -g -Wall -v
clang version 1.1 (branches/release_27)
Target: x86_64-redhat-linux-gnu
Thread model: posix
clang: warning: argument unused during compilation: '-g'
You have new mail in /var/spool/mail/vonbrand
[vonbrand@laptop14 tmp]$ clang -O2 -g -Wall -v hello.c 
clang version 1.1 (branches/release_27)
Target: x86_64-redhat-linux-gnu
Thread model: posix
 "/usr/bin/clang" -cc1 -triple x86_64-redhat-linux-gnu -S -disable-free -disable-llvm-verifier -main-file-name hello.c -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -g -resource-dir /usr/lib/clang/1.1 -O2 -Wall -fmessage-length 80 -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-8gLA3g.s -x c hello.c
clang -cc1 version 1.1 based upon llvm 2.7 hosted on x86_64-redhat-linux-gnu
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/1.1/include
 /usr/local/include
 /usr/include
End of search list.
 "/usr/bin/gcc" -O2 -g -Wall -v -c -m64 -o /tmp/cc-SYFGnf.o -x assembler /tmp/cc-8gLA3g.s
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.4 20100611 (Red Hat 4.4.4-8) (GCC) 
COLLECT_GCC_OPTIONS='-O2' '-g' '-Wall' '-v' '-c' '-m64' '-o' '/tmp/cc-SYFGnf.o' '-mtune=generic'
 as --gdwarf2 -V -Qy --64 -o /tmp/cc-SYFGnf.o /tmp/cc-8gLA3g.s
GNU assembler version 2.20.51.0.7 (x86_64-redhat-linux) using BFD version version 2.20.51.0.7-4.fc14 20100318
/tmp/cc-8gLA3g.s: Assembler messages:
/tmp/cc-8gLA3g.s:408: Fatal error: duplicate .debug_line sections
clang: error: assembler command failed with exit code 1 (use -v to see invocation)

Comment 2 Bug Zapper 2010-07-30 12:09:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Michel Lind 2010-08-12 08:39:45 UTC
T(In reply to comment #1)
> Sorry for the foulup. Bugzilla offered a menu for selecting the component, I
> selected clang, somehow it got 389-admintool when I submitted the report.
> "clang" isn't available for changing the component now.
> 
Sounds like a Bugzilla foul-up -- clang is not shipped as a separate SRPM, so it really should not have appeared as a component at all.

I wonder if that's why the first package, when alphabetically sorted, gets a lot of bugs :)

Will look into this, and check with upstream.

Comment 4 Horst H. von Brand 2010-08-16 05:12:17 UTC
The correct package is llvm (as I set it now).

Luser foulup, sorry.

Comment 5 Horst H. von Brand 2010-09-23 03:22:47 UTC
Still the same with llvm-2.7-9.fc15.x86_64

Comment 6 Michel Lind 2010-09-23 07:23:43 UTC
Yap, -9 is a stop-gap update aimed at fixing a C++-only problem.

The problem is really only with -g itself, not with the use of -O2 and -Wall (the latter two are fine even when combined).

I've filed this upstream: http://llvm.org/bugs/show_bug.cgi?id=8210 and will try to reproduce this on F-14 i686 and F-13 {x86_64,i686}.

Comment 7 Horst H. von Brand 2010-10-03 16:30:34 UTC
Upstream <http://llvm.org/bugs/show_bug.cgi?id=6218> claims this has been fixed, but as of llvm-2.7-10.fc15.x86_64 it still fails here.

Comment 8 Horst H. von Brand 2010-10-03 18:14:35 UTC
The upstream commit supposed to fix this is <http://llvm.org/viewvc/llvm-project?view=rev&revision=110111>.

Comment 9 Michel Lind 2010-10-13 08:12:10 UTC
Thanks! This fix should be in 2.8-1.fc15 as it came out before llvm/clang 2.8 final. Looks like it should be cleanly appliable to clang 2.7 in F-13/14 too, so I'll mark this ON_DEV for now.

Comment 10 Fedora Update System 2010-10-14 23:08:11 UTC
llvm-2.7-11.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/llvm-2.7-11.fc14

Comment 11 Fedora Update System 2010-10-14 23:53:25 UTC
llvm-2.7-11.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/llvm-2.7-11.fc13

Comment 12 Fedora Update System 2010-10-15 04:09:24 UTC
llvm-2.7-11.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update llvm'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/llvm-2.7-11.fc14

Comment 13 Horst H. von Brand 2010-10-15 21:28:05 UTC
Fixed here (rawhide, llvm-2.8-3.fc15.x86_64)

Comment 14 Fedora Update System 2010-10-27 22:51:31 UTC
llvm-2.7-11.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2010-10-28 06:22:07 UTC
llvm-2.7-11.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


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