flex 2.5.4a and gcc3.2 bad combo?

Japie japie at nospam.org
Tue Nov 12 10:19:02 PST 2002


On Sun, 10 Nov 2002 06:14:33 +0100, Jim Gifford wrote:

> Can you give a more specific example?? It may be a bison (in yacc mode)
> issue.

The same flex problem is with mailfilter, I tryed to compile it on my
fresh build lfs 4.0 server but bailded out with:

rcfile.cc: At global scope:
rcfile.cc:1482: use of `istream' is ambiguous
rcfile.cc:25:   first declared as `struct istream' here
/usr/include/c++/3.2/iosfwd:107:   also declared as `typedef struct 
   std::basic_istream<char, std::char_traits<char> > std::istream' here
rcfile.cc:1482: `istream' denotes an ambiguous type
rcfile.cc:25:   first type here
/usr/include/c++/3.2/iosfwd:58:   other type here
rcfile.cc:1482: `input_file' was not declared in this scope
rcfile.cc:1483: variable or field `yyrestart' declared void
rcfile.cc:1483: `int yyFlexLexer::yyrestart' is not a static member of `class 
   yyFlexLexer'
rcfile.cc:1483: syntax error before `{' token
rcfile.cc:1487: invalid use of member `yyFlexLexer::yy_current_buffer'
rcfile.cc:1487: `input_file' was not declared in this scope
rcfile.cc:1487: ISO C++ forbids declaration of `yy_init_buffer' with no type
rcfile.cc:1487: initializer list being treated as compound expression
rcfile.cc:1488: ISO C++ forbids declaration of `yy_load_buffer_state' with no 
   type
rcfile.cc:1489: parse error before `}' token
rcfile.cc: In member function `void yyFlexLexer::yy_load_buffer_state()':
rcfile.cc:1521: cannot convert `istream*' to `std::istream*' in assignment
rcfile.cc: At global scope:
rcfile.cc:1526: use of `istream' is ambiguous
rcfile.cc:25:   first declared as `struct istream' here
/usr/include/c++/3.2/iosfwd:107:   also declared as `typedef struct 
   std::basic_istream<char, std::char_traits<char> > std::istream' here
rcfile.cc:1526: `istream' denotes an ambiguous type
rcfile.cc:25:   first type here
/usr/include/c++/3.2/iosfwd:58:   other type here
rcfile.cc:1526: `file' was not declared in this scope
rcfile.cc:1526: parse error before `)' token
rcfile.cc:1527: prototype for `yy_buffer_state* 
   yyFlexLexer::yy_create_buffer(...)' does not match any in class `yyFlexLexer
   '
/usr/include/FlexLexer.h:121: candidate is: virtual yy_buffer_state* 
   yyFlexLexer::yy_create_buffer(std::istream*, int)
rcfile.cc: In member function `yy_buffer_state* 
   yyFlexLexer::yy_create_buffer(...)':
rcfile.cc:1534: `size' undeclared (first use this function)
rcfile.cc:1545: `file' undeclared (first use this function)
rcfile.cc: At global scope:
rcfile.cc:1566: type specifier omitted for parameter `istream'
rcfile.cc:1566: parse error before `*' token
rcfile.cc:1568: prototype for `void yyFlexLexer::yy_init_buffer(...)' does not 
   match any in class `yyFlexLexer'
/usr/include/FlexLexer.h:137: candidate is: void 
   yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)
rcfile.cc: In member function `void yyFlexLexer::yy_init_buffer(...)':
rcfile.cc:1569: `b' undeclared (first use this function)
make[2]: *** [rcfile.o] Error 1
make[2]: Leaving directory `/root/mailfilter-0.5.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/mailfilter-0.5.0'
make: *** [all-recursive-am] Error 2

These are only the last lines, but there all flex related.
The authour wrote me that it's a known problem, freebsd and debian have a
fix for it, but I tryed a patch from debian but that did not work.
-- 
Japie
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list