Bug 69942 - kbabel compilation failure in kdesdk-3.1.94
Summary: kbabel compilation failure in kdesdk-3.1.94
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: 2003-12-09 18:48 UTC by marcin
Modified: 2003-12-13 13:48 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 marcin 2003-12-09 18:48:07 UTC
Version:            (using KDE KDE 3.1.94)
Installed from:    Compiled From Sources
Compiler:          gcc.3.3.1 
OS:          Linux

This happens while trying to compile kdesdk-3.1.94. This happens both with and without --enable-final.

In file included from /usr/include/c++/3.3.1/backward/iostream.h:31,
                 from /usr/local/include/FlexLexer.h:47,
                 from pofiles.cc:241:
/usr/include/c++/3.3.1/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/local/include/FlexLexer.h:47,
                 from pofiles.cc:241:
/usr/include/c++/3.3.1/backward/iostream.h:36: error: `istream' is already
   declared in this scope
/usr/include/c++/3.3.1/backward/iostream.h:36: error: 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: error: cannot convert `std::istream*' to `istream*' in
   assignment
pofiles.cc: In member function `void
   GettextBaseFlexLexer::yy_load_buffer_state()':
pofiles.cc:1216: error: 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: error: cannot convert `std::istream*' to `istream*' in
   assignment
pofiles.cc:1458:5: warning: "YY_MAIN" is not defined
make[2]: *** [pofiles.lo] Error 1
make[2]: Leaving directory `/usr/src/kdesdk-3.1.94/kbabel/common/libgettext'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/kdesdk-3.1.94/kbabel/common'
make: *** [all-recursive] Error 1
Comment 1 Thiago Macieira 2003-12-10 00:18:58 UTC
If you upgrade your GNU flex, does it work? This problem is caused by GNU flex being incompatible with the stricter C++ requirements of your g++ 3.2 or up.

Can you also verify if pofiles.cc was already present in your packages or if it was generated? (or both?)
Comment 2 marcin 2003-12-10 10:58:02 UTC
My flex version is 2.5.4 (and I can't find newer one). 
pofiles.cc is generated.
Comment 3 Dura 2003-12-12 14:43:34 UTC
Using this patch on flex 2.5.4a : http://lfs.crash404.com/patches/downloads/flex/flex-2.5.4a-redhat-fixes.patch
make kbabel compile with gcc 3.3.x.
Comment 4 marcin 2003-12-12 15:49:48 UTC
Confirm, no errors anymore. Maybe you should include generated pofiles.cc in source distribution since most people won't have this patch applied?
Comment 5 Stanislav Visnovsky 2003-12-12 20:57:55 UTC
No, if you've updated gcc, you should consider to update flex as well. It does
not make sense if you have a new gcc and old flex, which generates invalid code
for you gcc.

*** This bug has been marked as a duplicate of 62895 ***
Comment 6 marcin 2003-12-12 21:04:35 UTC
The problem is that the newest version of flex is 2.5.4a from 1997 (ftp://ftp.gnu.org/pub/gnu/non-gnu/flex, correct me if there is newer version available). And believe me, there are people who simple don't use packages or even don't use any specific distribution (consider LFS).
Comment 7 Stanislav Visnovsky 2003-12-12 21:15:54 UTC
Yes, you are right that 2.54a is the latest "stable" flex. And I do believe 
there are people that don't use distros.

Simply, I cannot add a file, that will compile with all flex versions. That's the problem!
Comment 8 marcin 2003-12-12 21:24:20 UTC
What about adding a test to configure or even a notice in README and including this patch (or its url)? I think it could be fine solution ...
Comment 9 Thiago Macieira 2003-12-13 00:15:32 UTC
If you have faulty programs installed, it's not our fault. This problem has also appeared several times here in the bug tracking system, so people can find it if they don't simply file reports away without checking for duplicates.

As for the generated file, it's KDE policy that they be included in the tarballs and CVS. That means this pofiles.cc should be in CVS.

That is, I hope flex 2.5.4a generates files that old g++ versions can compile as well as new ones.
Comment 10 marcin 2003-12-13 13:48:35 UTC
It doesn't and that's the whole problem. It works only if you patch flex with this redhat patch.