yaozhenx / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

Compilation fails (redeclaration of yyparse) #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On a recent (2015-01-15) Debian sid, run
./configure
./make

What is the expected output? What do you see instead?
The compilation fails with the following error:

gcc -DHAVE_CONFIG_H -I. -I..     -g -O2 -MT mscgen-language.o -MD -MP -MF 
.deps/mscgen-language.Tpo -c -o mscgen-language.o `test -f 'language.c' || echo 
'./'`language.c
language.c:464:5: error: conflicting types for ‘yyparse’
 int yyparse (void);
     ^
language.y:203:14: note: previous declaration of ‘yyparse’ was here
 extern int   yyparse (void *YYPARSE_PARAM);
              ^
language.c:1401:1: error: conflicting types for ‘yyparse’
 yyparse (void)
 ^
language.y:203:14: note: previous declaration of ‘yyparse’ was here
 extern int   yyparse (void *YYPARSE_PARAM);
              ^

What version of mscgen are you using? On what operating system?
mscgen 0.21

andy@shannara:~/Programming/Projects/MscGen/mscgen.work$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2

andy@shannara:~/Programming/Projects/MscGen/mscgen.work$ flex --version
flex 2.5.39

andy@shannara:~/Programming/Projects/MscGen/mscgen.work$ bison --version
bison (GNU Bison) 3.0.2

A simple solution is to remove the forward declaration of yyparse (Patch 
attached)

Original issue reported on code.google.com by sternenf...@gmail.com on 15 Jan 2015 at 10:32

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for reporting this.  I believe it is a duplicate of issue 83, just fixed 
at r202.

If it is not please, comment back.

Thanks,

Mike 

Original comment by Michael....@gmail.com on 24 Jan 2015 at 5:58

GoogleCodeExporter commented 9 years ago
Only partially (on my system at least); issue 83 is about the wrong type. My 
patch here removes the "extern int" forward declaration in language.y. I think 
both patches are needed

Original comment by sternenf...@gmail.com on 24 Jan 2015 at 7:03

GoogleCodeExporter commented 9 years ago
I just built with Bison 3.0.4 and Bison 2.5, and see no warnings or errors with 
top of tree.

Could you double check the original error is still present?

Original comment by Michael....@gmail.com on 24 Jan 2015 at 7:17

GoogleCodeExporter commented 9 years ago
Yes, you are right. It compiles without problems now. Sorry for the noise!

Original comment by sternenf...@gmail.com on 31 Jan 2015 at 9:23

GoogleCodeExporter commented 9 years ago
Cool - no problem and thanks for double checking.

Original comment by Michael....@gmail.com on 31 Jan 2015 at 10:28