tags:

views:

67

answers:

3

I have build a g++ v4.4 from source by using the archives provided by gcc.gnu.org.

But the resulting g++ cannot compile some of our projects c++ files. I am receiving a message simply saying: assembler error. It turned out that the assembler chokes on some extremely long symbol names, e.g. symbols names with a length of more then 2k.

Am I missing something to get it to work?

I would very appreciate an advice on how to get this working!

Environment: Debian-Lenny 64bit

EDIT: The mentioned c++ files are compiling fine with g++ versions v4.2 and v4.3. So I don't think it is a bug in the assembler (from binutils v2.18). Just to be sure I have also tried with binutils v2.20 - but I got the identical error message.

EDIT: I need g++ v4.4.x for the purpose of comparing the output of different g++ versions (and there is no g++ v4.4 in the official lenny repositories)

A: 

You're going to have to compile the corresponding gas instead of depending on what lenny has in his refrigerator (/usr/bin).

bmargulies
I have also tried gas from binutils-2.20. But no luck. The same error message.
+1 for "... corresponding gas instead of depending on what lenny `has in his refrigerator` ..."
A: 

Why don't a) upgrade or b) use the backports archive or c) rebuild from current Debian sources on your box? I happily run testing with g++ 4.2, 4.3 and 4.4.

Worst case, you could install a new Debian release in a virtual environment such as a chroot, a Xen or Kvm instance, or inside VirtualBox.

Dirk Eddelbuettel
(a) I can't upgrade because v4.4 isn't in the repository. (b) I don't know what the `backports archive` is. Could you give me an advice howto use it? (c) I cannot build rebuild v4.4 because ... see (a)
+1 for mentioning this `backport archive` thing
+1  A: 

If your analysis is correct, it seems the proper course of action would be to file a bug for binutils. Or gcc, if it turns out the long symbol names are due to a bug in gcc's name mangling.

Of course, a (preferably reduced) testcase will help the developers fix your problem. Heck, it could have helped SO readers to verify your problems.

janneb
Somewhere I read "gas: no length restriction for symbol names". For me it seems to be a bug in both, in g++ v4.4 *and* in binutils.