Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Thu Aug 21, 2014 8:02 am

All times are UTC - 8 hours


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Unusual compiler warning
Unread postPosted: Wed Mar 10, 2004 7:28 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
Has anyone seen this kind of error before.
Code:
ld32: FATAL   11 : Object file format error (./models/redux.o): missing section headers

It pops up from time to time on my project -- specific to that one file, but goes away when I make clean and rebuild all. I'm using gcc, because MIPSpro complains about my lex
file with the following:

Code:
cc-1047 cc: WARNING File = /usr/include/sys/termios.h, Line = 319
  Macro "ECHO" (declared at line 39 of "lex.yy.c") has an incompatible
          redefinition.

  #define       ECHO    0000010
                ^

cc-1167 cc: WARNING File = console.l, Line = 343
  Pointer points outside of underlying object.

  yycrank+-1,   0,              0,     
         ^

cc-1167 cc: WARNING File = console.l, Line = 344
  Pointer points outside of underlying object.

  yycrank+-4,   yysvec+1,       0,     
         ^

cc-1167 cc: WARNING File = console.l, Line = 349
  Pointer points outside of underlying object.

  yycrank+-3,   0,              yyvstop+11,
         ^

cc-1167 cc: WARNING File = console.l, Line = 359
  Pointer points outside of underlying object.

  yycrank+-4,   yysvec+7,       yyvstop+40,
         ^



worse yet, when I try to use flex I get ERRORS:

Code:
cc-1171 cc: WARNING File = console.l, Line = 85
  The indicated expression has no effect.

  ECHO;
  ^

cc-1018 cc: ERROR File = lex.yy.c, Line = 1169
  An unmatched left parentheses "(" appears in an expression.

  static int input()
             ^

cc-1143 cc: ERROR File = lex.yy.c, Line = 1169
  Declaration is incompatible with "char *line_read" (declared at line 29 of
          "console.h").

  static int input()
             ^

cc-1065 cc: ERROR File = lex.yy.c, Line = 1171
  A semicolon is expected at this point.

        {
        ^

cc-1012 cc: WARNING File = lex.yy.c, Line = 1198
  Parsing restarts here after previous syntax error.

                        *yy_c_buf_p = '\0';
                                          ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1200
  Expected a declaration.

                else
                ^

cc-1012 cc: WARNING File = lex.yy.c, Line = 1225
  Parsing restarts here after previous syntax error.

                                                return 0;
                                                        ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1226
  Expected a declaration.

                                        else
                                        ^

cc-1012 cc: WARNING File = lex.yy.c, Line = 1241
  Parsing restarts here after previous syntax error.

                                        yy_c_buf_p = yytext_ptr + offset;
                                                                        ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1242
  Expected a declaration.

                                        break;
                                        ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1243
  Expected a declaration.

                                }
                                ^

cc-1012 cc: WARNING File = lex.yy.c, Line = 1247
  Parsing restarts here after previous syntax error.

        c = *(unsigned char *) yy_c_buf_p;      /* cast for 8-bit char's */
                                         ^

cc-1077 cc: ERROR File = lex.yy.c, Line = 1248
  The indicated declaration has no storage class or type specifier.

        *yy_c_buf_p = '\0';     /* preserve yytext */
        ^

cc-1143 cc: ERROR File = lex.yy.c, Line = 1248
  Declaration is incompatible with "char *yy_c_buf_p" (declared at line 219).

        *yy_c_buf_p = '\0';     /* preserve yytext */
         ^

cc-1077 cc: ERROR File = lex.yy.c, Line = 1249
  The indicated declaration has no storage class or type specifier.

        yy_hold_char = *++yy_c_buf_p;
        ^

cc-1143 cc: ERROR File = lex.yy.c, Line = 1249
  Declaration is incompatible with "char yy_hold_char" (declared at line 211).

        yy_hold_char = *++yy_c_buf_p;
        ^

cc-1057 cc: ERROR File = lex.yy.c, Line = 1249
  The indicated operator is not allowed in a constant expression.

        yy_hold_char = *++yy_c_buf_p;
                        ^

cc-1077 cc: ERROR File = lex.yy.c, Line = 1251
  The indicated declaration has no storage class or type specifier.

        yy_current_buffer->yy_at_bol = (c == '\n');
        ^

cc-1143 cc: ERROR File = lex.yy.c, Line = 1251
  Declaration is incompatible with "YY_BUFFER_STATE yy_current_buffer" (declared
          at line 201).

        yy_current_buffer->yy_at_bol = (c == '\n');
        ^

cc-1065 cc: ERROR File = lex.yy.c, Line = 1251
  A semicolon is expected at this point.

        yy_current_buffer->yy_at_bol = (c == '\n');
                         ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1253
  Expected a declaration.

        return c;
        ^

cc-1166 cc: ERROR File = lex.yy.c, Line = 1254
  Expected a declaration.

        }
        ^

cc-1012 cc: WARNING File = lex.yy.c, Line = 1368
  Parsing restarts here after previous syntax error.

  extern int isatty YY_PROTO(( int ));
                                     ^

cc-1042 cc: ERROR File = lex.yy.c, Line = 1424
  The types of operands "YY_BUFFER_STATE" and "int" are incompatible.

        if ( b == yy_current_buffer )
               ^

18 errors detected in the compilation of "lex.yy.c".



any old school IRIX lexers out there willing to teach me the enlightened path? :)


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Mar 10, 2004 8:32 am 
Offline
Moderator
Moderator
User avatar

Joined: Thu Feb 20, 2003 6:57 am
Posts: 2062
Location: Voorburg, The Netherlands
if you could specify which package you're trying to build, we might be of some help :)
I'm not impressed by the multitude of compiler errors on MIPSPro output. It usually is a wrong declaration (inline or something similar) which cascades through your source file...


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Mar 10, 2004 9:02 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
Sorry dexter1, I didn't mean to litter ;)

The application is my own. It was developed up to now compiling with gcc (because of the lex warnings). Everything goes together OK. I just today switched over to MIPSpro in preparation of compiling -64 to use 128 bit precision in the calculations. My questions are:

a) what does that linking error mean? -- what has become garbled in the code that a rebuild clears out?

b) does MIPSpro C work with flex?

Thanks...and sorry -- everything I do is rushed these days. :(


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Mar 10, 2004 3:37 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Feb 20, 2003 6:57 am
Posts: 2062
Location: Voorburg, The Netherlands
I have no clue whatsoever about the linker error. Do you use fancy flags when compiling? -Ofast? -IPA? -TARG:? Do you use archives, maybe?

As for the flex errors, try to look hard at the function "input", looks like it's been redeclared in the c code, which conflicts with a previous prototype header. Compile gcc with -ansi -pedantic and see if it blurts more warnings about that function.


Top
 Profile  
 
Unread postPosted: Thu Mar 11, 2004 1:12 am 
Offline
User avatar

Joined: Tue Jan 13, 2004 10:57 am
Posts: 136
Location: Enschede, The Netherlands
squeen wrote:
Has anyone seen this kind of error before.
Code:
ld32: FATAL   11 : Object file format error (./models/redux.o): missing section headers

It pops up from time to time on my project -- specific to that one file, but goes away when I make clean and rebuild all.


This isually happens when the linker gets terminated while generating the object file. Removing that particular file and rebuilding should work.

Erik


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Mar 11, 2004 3:21 am 
Offline
Moderator
Moderator
User avatar

Joined: Fri May 09, 2003 5:10 am
Posts: 2931
Location: Maryland, USA
:shock: Thanks SkyBound! (you too dexter1)


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Mar 11, 2004 3:26 am 
Offline
User avatar

Joined: Tue Apr 29, 2003 1:02 pm
Posts: 967
Location: Rijswijk, The Netherlands. Reigate, England.
And another Dutchy!

Welcome SkyBound :D

_________________
Shall I describe it to you? Or do you want me to get you a box?


Top
 Profile  
 
 Post subject:
Unread postPosted: Thu Mar 11, 2004 10:40 am 
Offline
User avatar

Joined: Tue Jan 13, 2004 10:57 am
Posts: 136
Location: Enschede, The Netherlands
whiter wrote:
And another Dutchy!
Welcome SkyBound :D


Yeah thanks. Event the location is the same :P
Actually I've been reading most of the posts for some time now.
This is the first post though.

Erik


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group