Red Hat Bugzilla – Bug 436374
Error: file number 2 already allocated
Last modified: 2008-03-06 16:26:39 EST
Description of problem:
This is an odd one. It was first seen with "real" code but the reproducer is
create a file "foo.cc" with nothing but:
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):
Steps to Reproduce:
Created attachment 297101 [details]
asm file from g++ -g -S foo.cc
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.
Thanks, I will get the offending package to fix their makefiles.