Bug#525716: FTBFS with GCC 4.4: missing #include

2009-04-27 Thread Stefan Potyra
clone 525716 -1
reassign -1 flex
retitle -1 flex: produces c++ code with missing include cstdio
thanks

Hi,

Am Sunday 26 April 2009 20:27:35 schrieb Martin Michlmayr:
 Package: fauhdlc
 Version: 20090309-1
 User: debian-...@lists.debian.org
 Usertags: ftbfs-gcc-4.4
 Tags: patch

 Your package fails to build with GCC 4.4, which has cleaned up some more
 C++ headers.  You always have to #include headers directly and cannot
 rely for things to be included indirectly.

 You can reproduce this problem with gcc-snapshot from unstable or
 gcc-4.4 from experimental.

  Automatic build of fauhdlc_20090309-1 on em64t by sbuild/amd64 0.53

 ...

  make[3]: Entering directory
  `/build/tbm/fauhdlc-20090309/frontend/newparser' g++ -Wall -Wextra
  -Wendif-labels -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
  -Wwrite-strings -Wstrict-aliasing -Wsign-compare -Wconversion
  -Wwrite-strings -Wno-unused-parameter -Wold-style-cast -Werror
  -DPACKAGE_NAME=\fauhdlc\ -DPACKAGE_TARNAME=\fauhdlc\
  -DPACKAGE_VERSION=\20090309\ -DPACKAGE_STRING=\fauhdlc\ 20090309\
  -DPACKAGE_BUGREPORT=\\ -DPACKAGE=\fauhdlc\ -DVERSION=\20090309\
  -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
  -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
  -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
  -DHAVE_GC_GC_CPP_H=1 -I.  -I ../.. -I.  -Wno-conversion
  -Wno-old-style-cast -Wno-parentheses -g -O2 -MT
  libnewparser_a-FAUhdlScanner.o -MD -MP -MF
  .deps/libnewparser_a-FAUhdlScanner.Tpo -c -o
  libnewparser_a-FAUhdlScanner.o `test -f 'FAUhdlScanner.cpp' || echo
  './'`FAUhdlScanner.cpp FAUhdlScanner.cpp: In member function 'int
  yyFlexLexer::yyinput()': FAUhdlScanner.cpp:3907: error: 'EOF' was not
  declared in this scope make[3]: *** [libnewparser_a-FAUhdlScanner.o]
  Error 1
  make[3]: Leaving directory
  `/build/tbm/fauhdlc-20090309/frontend/newparser' make[2]: *** [all] Error
  2

  /* ParserDriver.hpp needs to be included before the scanner header */
 --- frontend/newparser/FAUhdlScanner.l~   2009-04-26 17:59:54.0 
 +
 +++ frontend/newparser/FAUhdlScanner.l2009-04-26 17:59:55.0 
 +
 @@ -44,6 +44,7 @@
  %x FORMAL_SCANNER

  %top{
 +#include stdio.h
  #include string
  #include stdexcept
  /* ParserDriver.hpp needs to be included before the scanner header */

thanks for the patch, just applied this as a workaround to upstream svn.
Imo the real bug seems to originate in the c++ code generated from flex, which 
uses EOF (the .l file doesn't) but doesn't issue the necessaring include, 
hence cloning the bug to flex.

Cheers,
 Stefan.


signature.asc
Description: This is a digitally signed message part.


Bug#525716: FTBFS with GCC 4.4: missing #include

2009-04-26 Thread Martin Michlmayr
Package: fauhdlc
Version: 20090309-1
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-4.4
Tags: patch

Your package fails to build with GCC 4.4, which has cleaned up some more
C++ headers.  You always have to #include headers directly and cannot
rely for things to be included indirectly.

You can reproduce this problem with gcc-snapshot from unstable or
gcc-4.4 from experimental.

 Automatic build of fauhdlc_20090309-1 on em64t by sbuild/amd64 0.53
...
 make[3]: Entering directory `/build/tbm/fauhdlc-20090309/frontend/newparser'
 g++ -Wall -Wextra -Wendif-labels -Wshadow -Wpointer-arith -Wcast-qual 
 -Wcast-align -Wwrite-strings -Wstrict-aliasing -Wsign-compare -Wconversion 
 -Wwrite-strings -Wno-unused-parameter -Wold-style-cast -Werror 
 -DPACKAGE_NAME=\fauhdlc\ -DPACKAGE_TARNAME=\fauhdlc\ 
 -DPACKAGE_VERSION=\20090309\ -DPACKAGE_STRING=\fauhdlc\ 20090309\ 
 -DPACKAGE_BUGREPORT=\\ -DPACKAGE=\fauhdlc\ -DVERSION=\20090309\ 
 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 
 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GC_GC_CPP_H=1 -I.  -I ../.. -I.  
 -Wno-conversion -Wno-old-style-cast -Wno-parentheses -g -O2 -MT 
 libnewparser_a-FAUhdlScanner.o -MD -MP -MF 
 .deps/libnewparser_a-FAUhdlScanner.Tpo -c -o libnewparser_a-FAUhdlScanner.o 
 `test -f 'FAUhdlScanner.cpp' || echo './'`FAUhdlScanner.cpp
 FAUhdlScanner.cpp: In member function 'int yyFlexLexer::yyinput()':
 FAUhdlScanner.cpp:3907: error: 'EOF' was not declared in this scope
 make[3]: *** [libnewparser_a-FAUhdlScanner.o] Error 1
 make[3]: Leaving directory `/build/tbm/fauhdlc-20090309/frontend/newparser'
 make[2]: *** [all] Error 2

 /* ParserDriver.hpp needs to be included before the scanner header */
--- frontend/newparser/FAUhdlScanner.l~ 2009-04-26 17:59:54.0 +
+++ frontend/newparser/FAUhdlScanner.l  2009-04-26 17:59:55.0 +
@@ -44,6 +44,7 @@
 %x FORMAL_SCANNER 
 
 %top{
+#include stdio.h
 #include string
 #include stdexcept
 /* ParserDriver.hpp needs to be included before the scanner header */

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org