gnupic: [gnupic] [gpsim] How to build gpsim for Debian


Previous by date: 21 Jul 2005 01:01:33 +0100 Re: RE. basic frontend / sdcc, pbc.m8-i.net
Next by date: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Chen Xiao Fan
Previous in thread: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Scott Dattalo
Next in thread: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Chen Xiao Fan

Subject: RE: [gnupic] [gpsim] How to build gpsim for Debian
From: Chen Xiao Fan ####@####.####
Date: 21 Jul 2005 01:01:33 +0100
Message-Id: <3B8AEFFADD3DD4118F8100508BACEC2C07F77399@spex>

Thanks Scott for providing the links. I think that patch might be the
solution and I will try that.

Since Debian does not have the latest GTK+extra, so I downloaded
gtk+extra-2.1.1.tar.gz from Sourceforge and built it. The process
is okay on Ubuntu (Debian based). But this might well be one of the
reason why the building process failed. Anyway I tried with
"./configure --enable-gtk1" but still got similar building
errors at scan.cc and scan.ll.

Then I follow the procedure stated in the INSTALL file. The "MAKE"
step failed for the scan.cc and scan.ll file. The following is the
error message for the building of gpsim CVS source. Maybe there
is something obvious that I miss here. I really know too little
on programming to pinpoint the errors.

Sorry for the long post.

Regards,
Xiaofan

//------------------------------------------------------------
// Error message for building gpsim CVS using gtkextra-2.1.1
// System: Ubuntu 5.04 Linux based on Debian
// Take note that I actually downgrade the libreadline-dev to
// 1.4 from 1.5. Without downgrade, the make process seems to
// exit earlier.
//
// Similar error message for building with
// ./configure --enable-gtk1
//----------------------------------------------------------

mcuee@ubuntu:~/Desktop/build/gpsimcvs$ make
make  all-recursive
make[1]: Entering directory `/home/mcuee/Desktop/build/gpsimcvs'
Making all in cli
make[2]: Entering directory `/home/mcuee/Desktop/build/gpsimcvs/cli'
if /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I.. -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-g -O2 -MT scan.lo -MD -MP -MF ".deps/scan.Tpo" -c -o scan.lo scan.cc; \
then mv -f ".deps/scan.Tpo" ".deps/scan.Plo"; else rm -f ".deps/scan.Tpo";
exit 1; fi
 g++ -DHAVE_CONFIG_H -I. -I. -I.. -DXTHREADS -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -g -O2 -MT scan.lo -MD -MP -MF .deps/scan.Tpo -c
scan.cc  -fPIC -DPIC -o .libs/scan.o
scan.cc:904: error: syntax error before `(' token
scan.cc:907: error: register name not specified for `char*yy_cp'
scan.cc:907: error: register name not specified for `char*yy_bp'
scan.cc:908: error: register name not specified for `int yy_act'
scan.cc:919: error: parse error before `if'
scan.cc:938: error: ISO C++ forbids declaration of `yy_buffer_stack' with no
   type
scan.cc:938: error: variable-size type declared outside of any function
scan.cc:938: error: conflicting types for `int yy_buffer_stack[2]'
scan.cc:246: error: previous declaration as
`yy_buffer_state**yy_buffer_stack'
scan.cc:940: error: parse error before `}' token
scan.cc:942: error: ISO C++ forbids declaration of `yy_load_buffer_state'
with
   no type
scan.cc:942: error: new declaration `int yy_load_buffer_state()'
scan.cc:287: error: ambiguates old declaration `void yy_load_buffer_state()'
scan.cc:943: error: parse error before `}' token
scan.cc:950: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:950: error: conflicting types for `int*yy_cp'
scan.cc:907: error: previous declaration as `char*yy_cp'
scan.cc:955: error: ISO C++ forbids declaration of `yy_bp' with no type
scan.cc:955: error: conflicting types for `int yy_bp'
scan.cc:907: error: previous declaration as `char*yy_bp'
scan.cc:957: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:958: error: syntax error before `+=' token
scan.cc:959: error: syntax error before `:' token
scan.cc:966: error: ISO C++ forbids declaration of `yy_last_accepting_cpos'
   with no type
scan.cc:966: error: conflicting types for `int yy_last_accepting_cpos'
scan.cc:535: error: previous declaration as `char*yy_last_accepting_cpos'
scan.cc:967: error: parse error before `}' token
scan.cc:974: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:974: error: redefinition of `int yy_current_state'
scan.cc:957: error: `int yy_current_state' previously declared here
scan.cc:974: error: `yy_c' was not declared in this scope
scan.cc:975: error: parse error before `++' token
scan.cc:979: error: syntax error before `:' token
scan.cc:984: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:984: error: redefinition of `int yy_current_state'
scan.cc:974: error: `int yy_current_state' previously defined here
scan.cc:985: error: ISO C++ forbids declaration of `yy_act' with no type
scan.cc:985: error: redefinition of `int yy_act'
scan.cc:908: error: `int yy_act' previously declared here
scan.cc:986: error: parse error before `}' token
scan.cc:988: error: ISO C++ forbids declaration of `yytext' with no type
scan.cc:988: error: conflicting types for `int yytext'
scan.cc:547: error: previous declaration as `char*yytext'
scan.cc:988: error: ISO C++ forbids declaration of `yyleng' with no type
scan.cc:988: error: redefinition of `int yyleng'
scan.cc:266: error: `int yyleng' previously declared here
scan.cc:988: error: ISO C++ forbids declaration of `yy_hold_char' with no
type
scan.cc:988: error: conflicting types for `int yy_hold_char'
scan.cc:264: error: previous declaration as `char yy_hold_char'
scan.cc:988: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:988: error: redefinition of `int*yy_cp'
scan.cc:950: error: `int*yy_cp' previously defined here
scan.cc:988: error: ISO C++ forbids declaration of `yy_c_buf_p' with no type
scan.cc:988: error: conflicting types for `int yy_c_buf_p'
scan.cc:269: error: previous declaration as `char*yy_c_buf_p'
scan.cc:990: error: syntax error before `:' token
scan.cc:997: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:997: error: conflicting types for `int yy_cp'
scan.cc:988: error: previous declaration as `int*yy_cp'
scan.cc:998: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:998: error: redefinition of `int yy_current_state'
scan.cc:984: error: `int yy_current_state' previously declared here
scan.cc:999: error: parse error before `goto'
scan.ll:244: error: ISO C++ forbids declaration of `recognize' with no type
scan.ll:244: error: `int recognize' redeclared as different kind of symbol
scan.ll:100: error: previous declaration of `int recognize(int, const
char*)'
scan.ll:244: error: initializer list being treated as compound expression
scan.ll:244: error: invalid conversion from `const char*' to `int'
scan.ll:245: error: parse error before `break'
scan.ll:254: error: syntax error before `->' token
scan.ll:271: error: syntax error before `->' token
scan.ll:340: error: ISO C++ forbids declaration of `macroBodyPtr' with no
type
scan.ll:340: error: conflicting types for `int*macroBodyPtr'
scan.ll:53: error: previous declaration as `char*macroBodyPtr'
scan.ll:341: error: ISO C++ forbids declaration of `macroBodyPtr' with no
type
scan.ll:341: error: conflicting types for `int macroBodyPtr'
scan.ll:340: error: previous declaration as `int*macroBodyPtr'
scan.ll:342: error: parse error before `return'
scan.ll:350: error: ISO C++ forbids declaration of `exit' with no type
scan.ll:350: error: `int exit' redeclared as different kind of symbol
/usr/include/stdlib.h:612: error: previous declaration of `void exit(int)'
scan.ll:351: error: parse error before `}' token
scan.ll:398: error: ISO C++ forbids declaration of `printf' with no type
scan.ll:398: error: `int printf' redeclared as different kind of symbol
/usr/include/stdio.h:327: error: previous declaration of `int printf(const
   char*, ...)'
scan.ll:398: error: invalid conversion from `const char*' to `int'
scan.ll:399: error: parse error before `}' token
scan.ll:409: error: parse error before `if'
scan.cc:1353: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:1353: error: conflicting types for `int*yy_cp'
scan.cc:997: error: previous declaration as `int yy_cp'
scan.cc:1356: error: parse error before `if'
scan.cc:1368: error: syntax error before `->' token
scan.cc:1369: error: syntax error before `->' token
scan.cc:1383: error: ISO C++ forbids declaration of `yy_c_buf_p' with no
type
scan.cc:1383: error: redefinition of `int yy_c_buf_p'
scan.cc:988: error: `int yy_c_buf_p' previously defined here
scan.cc:1383: error: `yy_amount_of_matched_text' was not declared in this
scope
scan.cc:1385: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:1385: error: redefinition of `int yy_current_state'
scan.cc:998: error: `int yy_current_state' previously declared here
scan.cc:1396: error: ISO C++ forbids declaration of `yy_next_state' with no
   type
scan.cc:1398: error: ISO C++ forbids declaration of `yy_bp' with no type
scan.cc:1398: error: redefinition of `int yy_bp'
scan.cc:955: error: `int yy_bp' previously defined here
scan.cc:1400: error: parse error before `if'
scan.cc:1404: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:1404: error: redefinition of `int yy_current_state'
scan.cc:1385: error: `int yy_current_state' previously declared here
scan.cc:1405: error: parse error before `goto'
scan.cc:1434: error: ISO C++ forbids declaration of `yy_act' with no type
scan.cc:1434: error: redefinition of `int yy_act'
scan.cc:985: error: `int yy_act' previously declared here
scan.cc:1435: error: parse error before `goto'
scan.cc:1450: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:1450: error: redefinition of `int yy_current_state'
scan.cc:1404: error: `int yy_current_state' previously declared here
scan.cc:1452: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:1452: error: conflicting types for `int yy_cp'
scan.cc:1353: error: previous declaration as `int*yy_cp'
scan.cc:1453: error: ISO C++ forbids declaration of `yy_bp' with no type
scan.cc:1453: error: redefinition of `int yy_bp'
scan.cc:1398: error: `int yy_bp' previously declared here
scan.cc:1454: error: parse error before `goto'
scan.cc:1460: error: ISO C++ forbids declaration of `yy_current_state' with
no
   type
scan.cc:1460: error: redefinition of `int yy_current_state'
scan.cc:1450: error: `int yy_current_state' previously declared here
scan.cc:1462: error: ISO C++ forbids declaration of `yy_cp' with no type
scan.cc:1462: error: redefinition of `int yy_cp'
scan.cc:1452: error: `int yy_cp' previously defined here
scan.cc:1463: error: ISO C++ forbids declaration of `yy_bp' with no type
scan.cc:1463: error: redefinition of `int yy_bp'
scan.cc:1453: error: `int yy_bp' previously declared here
scan.cc:1464: error: parse error before `goto'
scan.cc: In function `int yy_get_next_buffer()':
scan.cc:1485: error: base operand of `->' is not a pointer
scan.cc:1486: error: invalid conversion from `int' to `char*'
scan.cc:1490: error: base operand of `->' is not a pointer
scan.cc:1494: error: base operand of `->' is not a pointer
scan.cc:1521: error: base operand of `->' is not a pointer
scan.cc:1525: error: base operand of `->' is not a pointer
scan.cc:1530: error: base operand of `->' is not a pointer
scan.cc:1536: error: invalid conversion from `int' to `yy_buffer_state*'
scan.cc:1539: error: invalid operands of types `int' and `char*' to binary `
   operator-'
scan.cc:1562: error: invalid conversion from `char*' to `int'
scan.cc:1564: error: base operand of `->' is not a pointer
scan.cc:1573: error: base operand of `->' is not a pointer
scan.cc:1576: error: base operand of `->' is not a pointer
scan.cc:1590: error: base operand of `->' is not a pointer
scan.cc:1599: error: base operand of `->' is not a pointer
scan.cc:1600: error: base operand of `->' is not a pointer
scan.cc:1602: error: base operand of `->' is not a pointer
scan.cc: In function `yy_state_type yy_get_previous_state()':
scan.cc:1615: error: base operand of `->' is not a pointer
scan.cc:1617: error: invalid conversion from `int' to `char*'
scan.cc:1617: error: ISO C++ forbids comparison between pointer and integer
scan.cc:1623: error: invalid conversion from `char*' to `int'
scan.cc: In function `yy_state_type yy_try_NUL_trans(int)':
scan.cc:1645: error: invalid conversion from `int' to `char*'
scan.cc:1651: error: invalid conversion from `char*' to `int'
scan.cc: In function `void yyunput(int, char*)':
scan.cc:1669: error: invalid conversion from `int' to `char*'
scan.cc:1674: error: base operand of `->' is not a pointer
scan.cc:1678: error: base operand of `->' is not a pointer
scan.cc:1679: error: base operand of `->' is not a pointer
scan.cc:1681: error: base operand of `->' is not a pointer
scan.cc:1683: error: base operand of `->' is not a pointer
scan.cc:1688: error: base operand of `->' is not a pointer
scan.cc:1689: error: base operand of `->' is not a pointer
scan.cc:1691: error: base operand of `->' is not a pointer
scan.cc:1697: error: invalid conversion from `char*' to `int'
scan.cc:1699: error: invalid conversion from `char*' to `int'
scan.cc: In function `int yyinput()':
scan.cc:1712: error: invalid type argument of `unary *'
scan.cc:1714: error: invalid type argument of `unary *'
scan.cc:1720: error: base operand of `->' is not a pointer
scan.cc:1722: error: invalid type argument of `unary *'
scan.cc:1769: error: invalid type argument of `unary *'
scan.cc:1770: error: invalid type argument of `unary *'
scan.cc:1772: error: base operand of `->' is not a pointer
scan.cc: In function `void yyrestart(FILE*)':
scan.cc:1789: error: invalid conversion from `yy_buffer_state*' to `int'
scan.cc:1792: error: invalid conversion from `int' to `yy_buffer_state*'
scan.cc: In function `void yy_switch_to_buffer(yy_buffer_state*)':
scan.cc:1809: error: ISO C++ forbids comparison between pointer and integer
scan.cc:1815: error: invalid type argument of `unary *'
scan.cc:1816: error: base operand of `->' is not a pointer
scan.cc:1817: error: base operand of `->' is not a pointer
scan.cc:1820: error: invalid conversion from `yy_buffer_state*' to `int'
scan.cc: In function `void yy_load_buffer_state()':
scan.cc:1832: error: new declaration `void yy_load_buffer_state()'
scan.cc:942: error: ambiguates old declaration `int yy_load_buffer_state()'
scan.cc: In function `void yy_load_buffer_state()':
scan.cc:1833: error: base operand of `->' is not a pointer
scan.cc:1834: error: base operand of `->' is not a pointer
scan.cc:1835: error: base operand of `->' is not a pointer
scan.cc:1836: error: invalid type argument of `unary *'
scan.cc: In function `void yy_delete_buffer(yy_buffer_state*)':
scan.cc:1879: error: ISO C++ forbids comparison between pointer and integer
scan.cc:1880: error: invalid conversion from `yy_buffer_state*' to `int'
scan.cc: In function `void yy_init_buffer(yy_buffer_state*, FILE*)':
scan.cc:1910: error: ISO C++ forbids comparison between pointer and integer
scan.cc: In function `void yy_flush_buffer(yy_buffer_state*)':
scan.cc:1943: error: ISO C++ forbids comparison between pointer and integer
scan.cc: In function `void yypush_buffer_state(yy_buffer_state*)':
scan.cc:1964: error: invalid type argument of `unary *'
scan.cc:1965: error: base operand of `->' is not a pointer
scan.cc:1966: error: base operand of `->' is not a pointer
scan.cc:1972: error: invalid conversion from `yy_buffer_state*' to `int'
scan.cc: In function `void yypop_buffer_state()':
scan.cc:1988: error: invalid conversion from `int' to `yy_buffer_state*'
scan.cc:1989: warning: converting to non-pointer type `int' from NULL
scan.cc: In function `void yyensure_buffer_stack()':
scan.cc:2015: error: incompatible types in assignment of `yy_buffer_state**'
to
   `int[2]'
scan.cc:2033: error: incompatible types in assignment of `yy_buffer_state**'
to
   `int[2]'
scan.cc: In function `void yy_fatal_error(const char*)':
scan.cc:2134: error: use of `exit' is ambiguous
scan.ll:350: error:   first declared as `int exit' here
<internal>:2134: error:   also declared as `void std::exit(int)' here
scan.cc:2134: error: `exit' undeclared (first use this function)
scan.cc:2134: error: (Each undeclared identifier is reported only once for
each
   function it appears in.)
scan.cc: In function `char* yyget_text()':
scan.cc:2195: error: invalid conversion from `int' to `char*'
scan.cc: In function `int yylex_destroy()':
scan.cc:2240: error: invalid conversion from `int' to `yy_buffer_state*'
scan.cc:2241: warning: converting to non-pointer type `int' from NULL
scan.cc:2247: error: incompatible types in assignment of `int' to `int[2]'
scan.ll: In function `int yywrap()':
scan.ll:451: error: invalid conversion from `int' to `yy_buffer_state*'
scan.ll: In function `void push_input_stack()':
scan.ll:467: error: invalid conversion from `int' to `yy_buffer_state*'
scan.ll: In function `int recognize(int, const char*)':
scan.ll:474: error: `int recognize(int, const char*)' redeclared as
different
   kind of symbol
scan.ll:244: error: previous declaration of `int recognize'
scan.ll:244: error: previous non-function declaration `int recognize'
scan.ll:474: error: conflicts with function declaration `int recognize(int,
   const char*)'
scan.ll: In function `int translate_token(int)':
scan.ll:489: error: `recognize' cannot be used as a function
scan.ll:491: error: `recognize' cannot be used as a function
scan.ll:493: error: `recognize' cannot be used as a function
scan.ll:495: error: `recognize' cannot be used as a function
scan.ll:497: error: `recognize' cannot be used as a function
scan.ll: In function `int handle_identifier(YYSTYPE*, std::string&,
   cmd_options**)':
scan.ll:598: error: `recognize' cannot be used as a function
scan.ll:634: error: `recognize' cannot be used as a function
scan.ll:654: error: `recognize' cannot be used as a function
scan.ll: In function `int process_intLiteral(YYSTYPE*, char*, int)':
scan.ll:702: error: `recognize' cannot be used as a function
scan.ll: In function `int process_macroBody(YYSTYPE*, const char*)':
scan.ll:711: error: `recognize' cannot be used as a function
scan.ll: In function `int process_booleanLiteral(YYSTYPE*, bool)':
scan.ll:720: error: `recognize' cannot be used as a function
scan.ll: In function `int process_floatLiteral(YYSTYPE*, char*)':
scan.ll:746: error: `recognize' cannot be used as a function
scan.ll: In function `int process_stringLiteral(YYSTYPE*, const char*)':
scan.ll:756: error: `recognize' cannot be used as a function
scan.ll: In function `int process_quotedStringLiteral(YYSTYPE*, const
char*)':
scan.ll:765: error: `recognize' cannot be used as a function
scan.ll: In function `int process_shellLine(YYSTYPE*, const char*)':
scan.ll:775: error: `recognize' cannot be used as a function
scan.ll: In function `void init_cmd_state()':
scan.ll:816: error: `YY_FLUSH_BUFFER' undeclared (first use this function)
scan.ll: In function `yy_buffer_state* current_buffer()':
scan.ll:898: error: invalid conversion from `int' to `yy_buffer_state*'
scan.ll: In function `void lexer_setMacroBodyMode()':
scan.ll:953: error: invalid conversion from `char*' to `int'
scan.ll: In function `bool getNextMacroParameter(char*, int)':
scan.ll:999: error: invalid conversion from `int' to `char*'
scan.ll:1021: error: invalid conversion from `int' to `char*'
make[2]: *** [scan.lo] Error 1
make[2]: Leaving directory `/home/mcuee/Desktop/build/gpsimcvs/cli'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mcuee/Desktop/build/gpsimcvs'
make: *** [all] Error 2



-----Original Message-----
From: Scott Dattalo 
Sent: Wednesday, July 20, 2005 9:39 PM

Xiaofan,

Since I'm not a Debian user I'd greatly appreciate any feed back from you
or others in your experiences with installing gpsim. Neil Turton has
posted this to the gpsim development list:

http://sourceforge.net/mailarchive/forum.php?thread_id=7726144&forum_id=1032
1

I haven't incorporated his patches yet, but intend to do so shortly.

Scott

--------------------------------------
From: Neil Turton
Build experience & patch.  
2005-07-13 14:45

 Hi Scott,
 
 Many thanks for writing gpsim.  It looks like it"s going to be useful
 for me.
 
 I"d like to share my experiences of building gpsim.  I"m building on
 Debian/testing (AKA the "etch" pre-release).  I had to modify the
 build instructions in the INSTALL file a little.  This is what I did.
 
  cvs -q -z6 -d ####@####.#### co .
  patch -p0 <../gpsim.diffs
  aclocal-1.9
  autoheader2.50 
  libtoolize
  automake-1.9 -a
  autoconf2.50 
  ./configure --prefix=`pwd`/install --enable-gtk1
  make
  make install
 
 The INSTALL file is missing a couple of steps, but the instructions on
 the "gpsim CVS" page seem to match mine.  They"re in a slightly
 different order, but I guess that"s OK.
 
 I hit a couple of problems trying to use GTK+-1.2 (Debian doesn"t have
 the latest GTK+extra, so GTK+-2 didn"t work).  The simulator rate list
 uses a widget from GTK+-2 and the status bar sets the width of a text
 entry to a given number of characters.  I guess GTK+-1 isn"t used
 much.
 
 I also hit a couple of problems with the version of flex I"m using
 (2.5.31).  The first is that it doesn"t define YY_PROTO.  The second
 is that YY_FLUSH_BUFFER is #undefed at the second %%.
 
 I"ve included the diff which I"m using.  It seems to work, but I"m a
 bit concerned about the status bar change.  What are your views on
 incorporating it into gpsim?
 
 Cheers, Neil.

Previous by date: 21 Jul 2005 01:01:33 +0100 Re: RE. basic frontend / sdcc, pbc.m8-i.net
Next by date: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Chen Xiao Fan
Previous in thread: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Scott Dattalo
Next in thread: 21 Jul 2005 01:01:33 +0100 Re: [gnupic] [gpsim] How to build gpsim for Debian, Chen Xiao Fan


Powered by ezmlm-browse 0.20.