Subject: Re: Upgrading print/lilypond to 2.6.5
To: None <tech-pkg@NetBSD.org>
From: D'Arcy J.M. Cain <darcy@NetBSD.org>
List: tech-pkg
Date: 03/16/2006 09:13:04
On Fri, 24 Feb 2006 17:57:43 -0500
"D'Arcy J.M. Cain" <darcy@NetBSD.org> wrote:
> gmake[1]: *** No rule to make target `out/FlexLexer.h', needed by `out/lily-lexer.o'.  Stop.
> 
> It is there but not under "out".

In fact, the build system finds it fine.  It's just the Makefile that has the problem with it not being under "out" so I created the following patch:

$NetBSD$

--- lily/GNUmakefile.orig       2005-07-21 17:06:03.000000000 -0400
+++ lily/GNUmakefile
@@ -61,7 +61,7 @@ endif

 # force these: Make can't know these have to be generated in advance
 $(outdir)/lily-parser.o: $(outdir)/parser.hh
-$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
+$(outdir)/lily-lexer.o: $(outdir)/parser.hh
 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh

 ifneq ($(FLEXLEXER_PATH),)

This gets me past the last problem but now I get a C++ error.

In file included from /usr/obj/print/lilypond/work.i386/.buildlink/include/FlexLexer.h:47,
                 from out/lexer.cc:242:
/usr/include/g++/backward/iostream.h:36: error: `istream' is already declared
   in this scope
/usr/include/g++/backward/iostream.h:36: error: using declaration `istream'
   introduced ambiguous type `istream'
out/lexer.cc: In member function `virtual int Lily_lexer::yylex()':
out/lexer.cc:4273: error: cannot convert `std::istream*' to `istream*' in
   assignment
out/lexer.cc: In member function `void yyFlexLexer::yy_load_buffer_state()':
out/lexer.cc:4796: error: cannot convert `istream*' to `std::istream*' in
   assignment
out/lexer.cc: In member function `void
   yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
out/lexer.cc:4847: error: cannot convert `std::istream*' to `istream*' in
   assignment
/usr/include/g++/iostream: At top level:
out/lexer.cc:3268: warning: `int yy_start_stack_ptr' defined but not used
out/lexer.cc:3269: warning: `int yy_start_stack_depth' defined but not used
out/lexer.cc:3270: warning: `int*yy_start_stack' defined but not used
out/lexer.cc:3272: warning: `void yy_push_state(int)' declared `static' but
   never defined
out/lexer.cc:3275: warning: `void yy_pop_state()' declared `static' but never
   defined
out/lexer.cc:3278: warning: `int yy_top_state()' declared `static' but never
   defined
gmake[1]: *** [out/lexer.o] Error 1
rm out/lexer.cc
gmake[1]: Leaving directory `/usr/obj/print/lilypond/work.i386/lilypond-2.6.5/lily'
gmake: *** [all] Error 2
*** Error code 2

-- 
D'Arcy J.M. Cain <darcy@NetBSD.org>
http://www.NetBSD.org/