Unusual compiler warning

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Unusual compiler warning

Unread postby squeen » Wed Mar 10, 2004 7:28 am

Has anyone seen this kind of error before.

Code: Select all

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: Select all

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: Select all

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? :)

User avatar
dexter1
Moderator
Moderator
Posts: 2062
Joined: Thu Feb 20, 2003 6:57 am
Location: Voorburg, The Netherlands
Contact:

Unread postby dexter1 » Wed Mar 10, 2004 8:32 am

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...

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Unread postby squeen » Wed Mar 10, 2004 9:02 am

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. :(

User avatar
dexter1
Moderator
Moderator
Posts: 2062
Joined: Thu Feb 20, 2003 6:57 am
Location: Voorburg, The Netherlands
Contact:

Unread postby dexter1 » Wed Mar 10, 2004 3:37 pm

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.

User avatar
SkyBound
Posts: 136
Joined: Tue Jan 13, 2004 10:57 am
Location: Enschede, The Netherlands
Contact:

Re: Unusual compiler warning

Unread postby SkyBound » Thu Mar 11, 2004 1:12 am

squeen wrote:Has anyone seen this kind of error before.

Code: Select all

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

User avatar
squeen
Moderator
Moderator
Posts: 2932
Joined: Fri May 09, 2003 6:10 am
Location: Maryland, USA

Unread postby squeen » Thu Mar 11, 2004 3:21 am

:shock: Thanks SkyBound! (you too dexter1)

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Thu Mar 11, 2004 3:26 am

And another Dutchy!

Welcome SkyBound :D
Shall I describe it to you? Or do you want me to get you a box?

User avatar
SkyBound
Posts: 136
Joined: Tue Jan 13, 2004 10:57 am
Location: Enschede, The Netherlands
Contact:

Unread postby SkyBound » Thu Mar 11, 2004 10:40 am

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


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 2 guests