Bug 436374 - Error: file number 2 already allocated
Error: file number 2 already allocated
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
Reported: 2008-03-06 15:55 EST by Doug Chapman
Modified: 2008-03-06 16:26 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-06 16:13:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
asm file from g++ -g -S foo.cc (157.30 KB, text/plain)
2008-03-06 15:55 EST, Doug Chapman
no flags Details

  None (edit)
Description Doug Chapman 2008-03-06 15:55:28 EST
Description of problem:

This is an odd one.  It was first seen with "real" code but the reproducer is
simply this:

create a file "foo.cc" with nothing but:

#include <iostream>

then build it in 2 steps:
g++ -g -S foo.cc
g++ -g foo.s

foo.s: Assembler messages:
foo.s:155: Error: file number 2 already allocated

If I do it in 1 step as normal:
g++ -g foo.cc

it works just fine.  There is at least 1 package in Fedora (I forget which one
right now) that for some reason does this in 2 steps and breaks.

I realize you may not have easy access to an ia64 box.  I will attach the .s
file which I imagine might be helpful.  Don't hesitate to ask me to try things
out to get more info.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Doug Chapman 2008-03-06 15:55:28 EST
Created attachment 297101 [details]
asm file from g++ -g -S foo.cc
Comment 2 Jakub Jelinek 2008-03-06 16:13:40 EST
User error.  You can't use -g twice.  Either you use -g to compile foo.cc, then
foo.s will already contain debug info, or you assemble with -g and the assembler
adds debugging info for the assembler.  If you both compile with -g, the
assembler already contains debug info and thus adding assembler debug info for
it is a bug.
Comment 3 Doug Chapman 2008-03-06 16:26:39 EST
Thanks, I will get the offending package to fix their makefiles.

- Doug

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