Useless error message

SunStudio12 rh4 (yet again)/storage/temp2/sunstudio12/prod/lib/ld: Dwarf Error: mangled line number sectionSo what file is bad or what do I do with this?
[174 byte] By [Brett_Tiplitza] at [2007-11-27 0:36:24]
# 1
The message reflects an internal error in the compiler. Please file a bug report at bugs.sun.com, supplying a test case. Or you could just post the test case here.
clamage45a at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
I am not sure what's bad, so I could use a hint on what to look for.
Brett_Tiplitza at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
The compiler had an internal failure. There is nothing you can do about it. If you submit a test case that yields this error message, we can fix the problem.
clamage45a at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

http://www.genunix.org/wiki/index.php/Sun_Studio_FAQs#Linux_-_The_linker_keeps_s aying:_.22mangled_line_number_section.22

This message shows up in combination with other linker messages. If this message is showing up by itself, please let me know.

You can try using the system linker (if you have a more recent update of binutils) by using the "-Yl,/usr/bin" option to the C++ compiler.

--chris

ChrisQuenellea at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 5
That is what I have been trying to say. I am getting the error message all by itself. I tried trussing the compile yesterday, but nothing jumped out at me with what file was bad (and note that I am not a compiler expert, so I was really fishing)
Brett_Tiplitza at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 6

This message comes from the linker because the linker is trying to use Dwarf information

to translate a link-time error address into a source file name. It's very

clever and useful when it works, but if it encounters something that it

thinks is an error in the dwarf data, it spits out this warning.

For more info see here:

http://www.genunix.org/wiki/index.php/Sun_Studio_FAQs#Linux_-_The_linker_keeps_ saying:_.22mangled_line_number_section.22

ChrisQuenellea at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 7

This is actually being caused by a bug in the linker. All attempts at a test case have failed and it does not always happen. Sometimes, I clean up the build, start over, and it gets further.

I did put in a bug that the error message her does not indicate the file producing the error. I believe that this will not help as I suspect a table has become corrupt within the linker causing the error.

I did strace the output and the last open is

[pid 9316] open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 4

I have no idea what is in this file, but it has not been changed in a while. I checked the undefined symbols I get after the dwarf error and confirmed they are all a specified library which has been opened successfully during the link stage.

So it is really hard to proceed without a working diagnostic message to trace down for a problem that is not easy to reproduce. I believe that all the error messages after the dwarf error are incorrect as I guess the linker stops doing all linking and then put's out the errors that existed when the task was abandoned. This seems like a bad code branch

Brett_Tiplitza at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 8

The dwarf error happens when another linker message is

being printed. It's a side-effect of trying to format the error message.

What's confusing is that the dwarf error shows up first, before the

linker error that caused the dwarf error. This makes it look like

the dwarf error is causing the following errors, but that's not the case.

If you fix the other linker problems, the dwarf complaint should go away.

The other linker errors should be very explicit about what's defined

and what's not defined. You should believe whatever those errors

are telling you. ;-)

--chris

ChrisQuenellea at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 9
Just to clarify, this is the only error coming from the compiler (or linker in this case). There is no other error message of any sort and thus no way to track this down.It is however a random bug. I can clean the build, rebuild, and it might go away
Brett_Tiplitza at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 10

In rereading my responses above, I realized that I sound like a

broken record. Sorry about that. Even if that message is

showing up by itself, it might not indicate a proper failure.

That code in the GNU linker can fire without terminating your

link or doing anything bad. If you find a way to reproduce this

please let us know.

--chris

ChrisQuenellea at 2007-7-11 22:45:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...