lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solving flex-errors: Lilypond 1.7.2 compiled with gcc-3.2!


From: Heikki Johannes Junes
Subject: Solving flex-errors: Lilypond 1.7.2 compiled with gcc-3.2!
Date: Tue, 8 Oct 2002 00:10:22 +0300 (EET DST)

I used Mandrake 9.0, gcc 3.2, and updated to guile-1.6.0 as lily-config
1.6 was required.

Proceed compiling LilyPond 1.7.2 with the usual procedure. Once "make all"
fails to compile "lily/out/lexer.cc" you have to edit that file.

The error here is that "lily/out/lexer.cc" produced from file
"lily/lexer.ll" contains old syntax which is not recognized by gcc 3.2.
The type of errors were found by J.Anders (see
http://mail.gnu.org/pipermail/lilypond-user/2002-September/002555.html):

> lexer.ll:227: `cerr' undeclared (first use this function)
> lexer.ll:227: (Each undeclared identifier is reported only once for each
>     function it appears in.)

Here is the patch which helped me to fix the problem. It adds "std::"
before "cerr". "FLEX_STD" has been defined for that purpose. The patch
below applies to five lines only. There was one line in "lexer.cc", where
the syntax was correct already and from which the idea was developed.

--- lexer.old.cc        2002-10-07 23:32:33.000000000 +0300
+++ lexer.cc    2002-10-07 23:31:56.000000000 +0300
@@ -2965,16 +2965,16 @@
                if ( yy_flex_debug )
                        {
                        if ( yy_act == 0 )
-                               cerr << "--scanner backing up\n";
+                               FLEX_STD cerr << "--scanner backing up\n";
                        else if ( yy_act < 67 )
-                               cerr << "--accepting rule at line " << 
yy_rule_linenum[yy_act] <<
+                               FLEX_STD cerr << "--accepting rule at line " << 
yy_rule_linenum[yy_act] <<
                                         "(\"" << yytext << "\")\n";
                        else if ( yy_act == 67 )
-                               cerr << "--accepting default rule (\"" << 
yytext << "\")\n";
+                               FLEX_STD cerr << "--accepting default rule (\"" 
<< yytext << "\")\n";
                        else if ( yy_act == 68 )
-                               cerr << "--(end of buffer or a NUL)\n";
+                               FLEX_STD cerr << "--(end of buffer or a NUL)\n";
                        else
-                               cerr << "--EOF (start condition " << YY_START 
<< ")\n";
+                               FLEX_STD cerr << "--EOF (start condition " << 
YY_START << ")\n";
                        }

                switch ( yy_act )
----

The following did not cause any difference to error messages:
-  updating flex-2.5.4 to flex-2.5.21
-  updating autoconf-2.53 to autoconf-2.54 (needed by flex-cvs-snapshot,
   the compiling of which failed).

So, I will use now gcc-3.2. I hope that this helps also somebody else.
Enjoy!

      Heikki Junes





reply via email to

[Prev in Thread] Current Thread [Next in Thread]