Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 wont build on SuSE 9.2

open
nobody
None
5
2005-05-05
2005-05-05
Lars Stavholm
No

I get the following when trying to build on SuSE 9.2
(and Redhat 9):

gcc -g -O2 -I. -DMAX_INC_DIR=64 -DMAX_INC_DEPTH=64
-DHAVE_CONFIG_H -I. -DMAX_INC_DIR=64
-DMAX_INC_DEPTH=64 -DHAVE_CONFIG_H -c -o y.tab.o y.tab.c
./grammar.y:171: error: conflicting types for `YYSTYPE'
cproto.h:119: error: previous declaration of `YYSTYPE'
./grammar.y: In function `yyparse':
./grammar.y:207: error: request for member `decl_spec'
in something not a structure or union
...

What gives?

Discussion

  • Logged In: NO

    Here is a solution to this problem, which occurs on many
    platforms. At the beginning of grammar.y, add:

    %{
    #define YYSTYPE_IS_DECLARED
    %}

     
  • Arnaud Lacombe
    Arnaud Lacombe
    2008-05-31

    Logged In: YES
    user_id=2069680
    Originator: NO

    for those who wants to use cproto and reach this problem, the following patch works for me:

    diff --git a/grammar.y b/grammar.y
    index f54ebb0..7bd5ff4 100644
    --- a/grammar.y
    +++ b/grammar.y
    @@ -69,6 +69,7 @@
    #include "semantic.h"

    #define YYMAXDEPTH 150
    +#define YYSTYPE_IS_DECLARED 1

    extern int yylex ARGS((void));

     
  • Arnaud Lacombe
    Arnaud Lacombe
    2008-05-31

    Logged In: YES
    user_id=2069680
    Originator: NO

    sorry for the noise, I didn't scroll back :/.

    Maybe should the 4.7f[1] be uploaded on sf.net and this bug be closed ?

    [1]: ftp://invisible-island.net/cproto/cproto-4.7f.tgz

     
  • sniperck
    sniperck
    2008-12-23

    I have the same problem!