clang -g dies with bogus assembler error: duplicate .debug_line sections

Bug #599485 reported by Anders Kaseorg
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
LLVM
Unknown
Unknown
clang (Debian)
Fix Released
Unknown
clang (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: binutils

$ echo 'int main(){}' > test.c
$ clang -g -c test.c
/tmp/cc-xPGs3W.s: Assembler messages:
/tmp/cc-xPGs3W.s:413: Fatal error: duplicate .debug_line sections
clang: error: assembler command failed with exit code 1 (use -v to see invocation)

http://llvm.org/bugs/show_bug.cgi?id=6218 says this is a binutils bug. (“… there's nothing wrong with having multiple .debug_line section directives in a single .s file. Compilers do this all the time.”) This assembler message does not exist in upstream binutils or in Debian; it was added by the Ubuntu patch binutils/debian/patches/214-binutils-group.patch.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: binutils 2.20.51.20100617-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-5.6-generic 2.6.35-rc3
Uname: Linux 2.6.35-5-generic x86_64
NonfreeKernelModules: openafs nvidia wl
Architecture: amd64
Date: Mon Jun 28 14:18:03 2010
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate amd64 (20091020.3)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: binutils

Revision history for this message
Anders Kaseorg (andersk) wrote :
Revision history for this message
Anders Kaseorg (andersk) wrote :

That Ubuntu patch (214-binutils-group.patch) was taken from http://sourceware.org/bugzilla/show_bug.cgi?id=10531 ; I’ve added a comment there.

Matthias Klose (doko)
Changed in binutils (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.20.51.20100710-1ubuntu1

---------------
binutils (2.20.51.20100710-1ubuntu1) maverick; urgency=low

  * Update HJ patches from binutils 2.20.51.0.10.

binutils (2.20.51.20100710-1) experimental; urgency=low

  * Snapshot, taken from the trunk 20100710.
    - Fix PR gas/10531. LP: #599485.
  * debian/rules: Introduce PF macros (Jim Heck). Closes: #588357.

  [ Marcin Juszkiewicz ]
  * Don't install documentation files in -cross packages. Closes: #586636.
  * Set sysroot to /usr/$(TARGET) for cross builds. LP: #598389.
 -- Matthias Klose <email address hidden> Sat, 10 Jul 2010 11:42:27 +0200

Changed in binutils (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Anders Kaseorg (andersk) wrote :

The problem is still there after upgrading to binutils 2.20.51.20100710-1ubuntu1. The upstreams for binutils and clang agree that this is a clang bug, so I’m reassigning to the clang package.

affects: binutils (Ubuntu) → clang (Ubuntu)
Changed in clang (Ubuntu):
status: Fix Released → New
Revision history for this message
Anton Korobeynikov (anton-korobeynikov) wrote :

The problem is fixed in clang mainline. So, it will definitely go into 2.8

Revision history for this message
Anders Kaseorg (andersk) wrote :

Here’s a debdiff with the patch from upstream. I’ve tested it in my PPA <https://launchpad.net/~anders-kaseorg/+archive/ppa> and it solves the problem.

Robert Sajdok (ris)
tags: added: patch
Changed in clang (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package clang - 2.7-0ubuntu3

---------------
clang (2.7-0ubuntu3) maverick; urgency=low

  * debian/patches/0002-Dont-forward-any--g-options-to-gcc.patch: Take
    patch from upstream r110111 to fix “duplicate .debug_line sections”
    error with clang -g. (LP: #599485)
 -- Anders Kaseorg <email address hidden> Fri, 06 Aug 2010 02:01:10 -0400

Changed in clang (Ubuntu):
status: Fix Committed → Fix Released
Changed in clang (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.