 |
 |
source line too long - need to rebuild assembler?
|
 |
|
 |
|
Senior User
Join Date: Nov 2002
Location: US
Status:
Offline
|
|
Just switched from Linux and found my C++ code generated this funny error:
/var/tmp//ccGoshBd.s:1181:FATAL:Source line too long. Please change file /SourceCache/cctools/cctools-435/as/input-scrub.c then rebuild assembler.
So what is the cause of the error? How do I solve it (I don't suppose I need to get the source of assembler somewhere and rebuild it right?)
Many thanks.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
I've never seen this error, but it sounds as though the compiler thinks your entire source file is a single line. You can change the encoding in project builder - also, try opening it with vi - if the line endings are screwy, you may see it manifested there.
This is just a guess, of course.
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2002
Location: US
Status:
Offline
|
|
thanks but I don't think that's the reason - my code was written on Linux and I checked the src files no funny things there. I did discover that if I removed -g (no debugging info) then the problem went away - something to do with the debugging info compiled in? Is gdb at fault here?
Please, I don't want to spend $3000 and find out that I can't compile my UNIX code anymore....
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
Rest assured, you can compile unix code.
Can you try to narrow down the problem by compiling a subset of your code? This way, maybe you can figure out where the offending code is.
Also, this is a longshot, but you could try using BBEdit's "Zap Gremlins" feature to see whether there are any unusual characters in your source.
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Here's another tip: have you updated to the latest developer tools?
You can also try looking in the file /var/tmp/ccGoshBd.s at line 1181 to look for clues as to which line is the problem.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2002
Location: US
Status:
Offline
|
|
One thing I'm sure - it's not because of different line endings in UNIX and Mac, etc, as I've tried using BBEdit to 'fix' the files into either Mac or UNIX format - both gave me the same compiling error.
As to the specific line in .s file: I've looked at the line and sure enough it's REALLY long - it's a line starting with .stubs, and then a long double-quoted string, like a mangled name. I'm now knowledgeable enough to know what that is though. Anyone has furthur suggestions?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
Could you post the long line? If it's a mangled string, we can demangle it and see where the problem is in the code.
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2002
Location: US
Status:
Offline
|
|
(my apology for this extremely long message)
Okay so I set out to get the problematic line in .s file. Here is what I did: the original make process stopped at this one:
g++ -g -ftemplate-depth-24 -Wall -pedantic -DVERSION=\"1.89\" -I../Toolbox -c -o eFunc.o eFunc.cpp
/var/tmp//cc5TLcbf.s:1181:FATAL:Source line too long. Please change file /SourceCache/cctools/cctools-435/as/input-scrub.c then rebuild assembler.
I re-issued a slightly changed command:
g++ -g -ftemplate-depth-24 -Wall -pedantic -DVERSION=\"1.89\" -I../Toolbox -S eFunc.cpp
and looked into eFunc.s, at line 1181:
.stabs "_Rb_tree_iterator<Toolbox::_UTreeNode<Toolbox::_T rieNode<UKernel::RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> >, std::less<Toolbox::_TrieNode<UKernel::RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> > > >*,Toolbox::_UTreeNode<Toolbox::_TrieNode<UKernel: :RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> >, std::less<Toolbox::_TrieNode<UKernel::RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> > > >*&,Toolbox::_UTreeNode<Toolbox::_TrieNode<UKe rnel::RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> >, std::less<Toolbox::_TrieNode<UKernel::RLiteral, std::_List_iterator<std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >&, std::map<UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList, std::less<UKernel::Symbol>, std::allocator<std::pair<const UKernel::Symbol, Toolbox::CFG<UKernel::Symbol, UKernel::RLiteral, UKernel::RuleBody>::RIList> > >*> > > >**>:Tt(1,4419)",128,0,184,0
(and there're lots of abnormally long .stabs before this line too)
BUT, if I do this
g++ -S -g -ftemplate-depth-24 -Wall -pedantic -DVERSION=\"1.89\" -I../Toolbox -c -o eFunc.o eFunc.cpp
the code compiles FINE - there's no error of any kind!
Any further suggestions?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Nov 2002
Location: US
Status:
Offline
|
|
Also I'm not sure if this matters - but I have Fink installed on my PowerBook. (the latest CVS)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
Very strange. I'm not sure exactly what's going on, but I think I can see the cause of your problem at the shallow level: it appears to be storing the verbose nametable of your code as a string literal. If you were meaning to include debug info this is perfectly normal and won't cause any problems (hence it working with no -g) but it certainly shouldn't be happening with -g. Are you using any kind of strange preprocessor directives?
|
|
[vash:~] banana% killall killall
Terminated
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status:
Offline
|
|
It's possible you have a circular dependency in your templatized code.
But, I rearranged your insane precompile line into something where you can actually see the structure a bit more clearly, and it looks like it could represent valid (very heavily templatized) code.
Maybe try typedef'ing some of those insane sub-chunks. For example, here's your line of code:
Code:
_Rb_tree_iterator<ReallyLongChunk*,ReallyLongChunk*&,ReallyLongChunk**>:Tt(1,4419)",128,0,184,0
using the following typedef's:
Code:
typedef Toolbox::CFG<
UKernel::Symbol,
UKernel::RLiteral,
UKernel::RuleBody
>::RIList SomeChunk;
typedef std::map<
UKernel::Symbol,
SomeChunk,
std::less<UKernel::Symbol>,
std::allocator<
std::pair<
const UKernel::Symbol,
SomeChunk
>
>
> LongerChunk;
typdef Toolbox::_UTreeNode<
Toolbox::_TrieNode<
UKernel::RLiteral,
std::_List_iterator<LongerChunk, LongerChunk&, LongerChunk*>
>,
std::less<
Toolbox::_TrieNode<
UKernel::RLiteral,
std::_List_iterator<LongerChunk, LongerChunk&, LongerChunk*>
>
>
> ReallyLongChunk;
Good luck. This is pretty nutso!
|
Geekspiff - generating spiffdiddlee software since before you began paying attention.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|