Bug 74158 - Compile break in kde-3.2/kdesdk-3.2.0/kbabel/common/libgettext
Summary: Compile break in kde-3.2/kdesdk-3.2.0/kbabel/common/libgettext
Status: RESOLVED DUPLICATE of bug 62895
Alias: None
Product: kbabel
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stanislav Visnovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-04 19:57 UTC by jgluckca
Modified: 2004-05-10 20:45 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jgluckca 2004-02-04 19:57:54 UTC
Version:           kdesdk-3.2.0 (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          ../gcc-3.2.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i386-slackware-linux --host=i386-slackware-linux
Thread model: posix
gcc version 3.2.2 bison (GNU Bison) 1.875
OS:          Linux

configured as:

./configure --prefix=/opt/kde-3.2

Errors:

flex -+ -opofiles.cc ./pofiles.ll
if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../..   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT pofiles.lo -MD -MP -MF ".deps/pofiles.Tpo" \
  -c -o pofiles.lo `test -f 'pofiles.cc' || echo './'`pofiles.cc; \
then mv -f ".deps/pofiles.Tpo" ".deps/pofiles.Plo"; \
else rm -f ".deps/pofiles.Tpo"; exit 1; \
fi
In file included from /usr/include/c++/3.2.2/backward/iostream.h:31,
                 from /usr/include/FlexLexer.h:47,
                 from pofiles.cc:241:
/usr/include/c++/3.2.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/include/FlexLexer.h:47,
                 from pofiles.cc:241:
/usr/include/c++/3.2.2/backward/iostream.h:36: using declaration `istream'
   introduced ambiguous type `istream'
pofiles.cc:401:5: warning: "YY_STACK_USED" is not defined
pofiles.cc: In member function `virtual int GettextBaseFlexLexer::yylex()':
pofiles.cc:683: cannot convert `std::istream*' to `istream*' in assignment
pofiles.cc: In member function `void
   GettextBaseFlexLexer::yy_load_buffer_state()':
pofiles.cc:1216: cannot convert `istream*' to `std::istream*' in assignment
pofiles.cc: In member function `void
   GettextBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
pofiles.cc:1267: cannot convert `std::istream*' to `istream*' in assignment
pofiles.cc:1458:5: warning: "YY_MAIN" is not defined
make[4]: *** [pofiles.lo] Error 1
make[4]: Leaving directory `/usr/src/kde/kde-3.2/kdesdk-3.2.0/kbabel/common/libgettext'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/kde/kde-3.2/kdesdk-3.2.0/kbabel/common'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/kde/kde-3.2/kdesdk-3.2.0/kbabel'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/kde/kde-3.2/kdesdk-3.2.0'
make: *** [all] Error 2
Comment 1 Ingo Wiarda 2004-02-04 21:22:31 UTC
I got the same error (Sys: Mandrake 9.1, Kenrel 2.6.1, gcc 3.2.2, KDE 3.2->Konstruct)

I installed flex 2.5.31 from http://lex.sourceforge.net/, and got new errors...

Making all in libgettext
make[6]: Entering directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0/kbabel/common/libgettext'
if /bin/sh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../..   -DQT_THREAD_SUPPORT -I/home/ingo/kde3.2/include -I/usr/X11R6/include -I/home/ingo/kde3.2/include -I/usr/X11R6/include -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -I/home/ingo/kde3.2/include -I/usr/X11R6/include -L/home/ingo/kde3.2/lib -L/usr/X11R6/lib -O2 -pipe -I/home/ingo/kde3.2/include -I/usr/X11R6/include -L/home/ingo/kde3.2/lib -L/usr/X11R6/lib -O2 -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT pofiles.lo -MD -MP -MF ".deps/pofiles.Tpo" \
  -c -o pofiles.lo `test -f 'pofiles.cc' || echo './'`pofiles.cc; \
then mv -f ".deps/pofiles.Tpo" ".deps/pofiles.Plo"; \
else rm -f ".deps/pofiles.Tpo"; exit 1; \
fi
pofiles.cc:401:5: warning: "YY_STACK_USED" is not defined
pofiles.cc: In member function `virtual int GettextBaseFlexLexer::yylex()':
pofiles.cc:519: `cin' undeclared (first use this function)
pofiles.cc:519: (Each undeclared identifier is reported only once for each function it appears in.)
... many more errors
/usr/local/include/FlexLexer.h:121: candidate is: virtual yy_buffer_state* GettextBaseFlexLexer::yy_create_buffer(std::istream*, int)
pofiles.cc: In member function `yy_buffer_state* GettextBaseFlexLexer::yy_create_buffer(istream*, int)':
pofiles.cc:1240: no matching function for call to `GettextBaseFlexLexer::yy_init_buffer(yy_buffer_state*&, istream*&)'
/usr/local/include/FlexLexer.h:140: candidates are: void GettextBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)
pofiles.cc: In member function `virtual void GettextBaseFlexLexer::yy_delete_buffer(yy_buffer_state*)':
pofiles.cc:1251: ISO C++ forbids comparison between pointer and integer
pofiles.cc:1252: invalid conversion from `yy_buffer_state*' to `int'
pofiles.cc: At global scope:
pofiles.cc:1264: prototype for `void GettextBaseFlexLexer::yy_init_buffer(yy_buffer_state*, istream*)' does not match any in class `GettextBaseFlexLexer'
/usr/local/include/FlexLexer.h:140: candidate is: void GettextBaseFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)
pofiles.cc: In member function `void GettextBaseFlexLexer::yy_flush_buffer(yy_buffer_state*)':
pofiles.cc:1293: ISO C++ forbids comparison between pointer and integer
pofiles.cc: In member function `virtual void GettextBaseFlexLexer::LexerError(const char*)':
pofiles.cc:1364: `cerr' undeclared (first use this function)
pofiles.cc:1458:5: warning: "YY_MAIN" is not defined
make[6]: *** [pofiles.lo] Error 1
make[6]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0/kbabel/common/libgettext'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0/kbabel/common'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0/kbabel'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk/work/kdesdk-3.2.0'
make[1]: *** [build-work/kdesdk-3.2.0/Makefile] Error 2
make[1]: Leaving directory `/home/ingo/download/kde32/konstruct/kde/kdesdk'
make: *** [dep-../../kde/kdesdk] Error 2

Comment 2 Ingo Wiarda 2004-02-05 00:09:02 UTC
It seems like deleting the kdesdk-dir & extracting it again[1] after installing the current flex-version (2.5.31) solved the problem. At least, konstruct is now happily compiling beyond kdesdk at the moment.

[1] Yes, there _is_ a better option mentioned in the konstruct Readme.
Comment 3 Stanislav Visnovsky 2004-02-05 08:20:42 UTC
make clean && make parser should help
Comment 4 jgluckca 2004-02-06 08:41:37 UTC
install flex 2.5.31

This fixed the problem for me but it seems others still have a problem

John
Comment 5 Stanislav Visnovsky 2004-03-04 18:07:26 UTC

*** This bug has been marked as a duplicate of 62895 ***
Comment 6 Matt Darcy 2004-05-10 20:45:04 UTC
I've upgraded to flex 2.5.4a and I'm still getting the 

ofiles.cc:1458:5: warning: "YY_MAIN" is not defined
make[2]: *** [pofiles.lo] Error 1


error.

Any more advice ??

Also I didn't see anything mentioned about this in the kbabel readme