Subject: pkg/22130: maybe should enable flex package on NetBSD if using gcc-3
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rearnsha@buzzard.freeserve.co.uk>
List: netbsd-bugs
Date: 07/13/2003 19:43:03
>Number:         22130
>Category:       pkg
>Synopsis:       maybe should enable flex package on NetBSD if using gcc-3
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 13 19:20:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        NetBSD 1.6U
>Organization:
ARM
	
>Environment:
	
	
System: NetBSD osprey.buzzard.freeserve.co.uk 1.6U NetBSD 1.6U (OSPREY) #89: Wed Jun 25 22:06:37 BST 2003 rearnsha@osprey.buzzard.freeserve.co.uk:/work/build/src/sys/arch/cats/compile/OSPREY cats
Architecture: arm
Machine: cats
>Description:
	The flex package is disabled for NetBSD because flex is included in
	the base system.  However, flex can generate lexers that are C++
	classes (option -+), and when it does the code generated:
	1) Includes a header that isn't visibile in the gcc-3 package search
	path (Flexlexer.h is in /usr/include/g++, which is specific to our
	in-tree compiler)
	2) Doesn't compile even if copied somewhere where that gcc-3 will 
	search.

	There are one or two simple patches to the include file and another
	to the skeleton files that would make the code gcc-3 clean.
	
>How-To-Repeat:
	Try to build devel/umbrello on a machine that's using gcc-3 for
	building packages.
	
>Fix:
	
	The main problem is that in gcc-3 istream is no-longer a class, so
	the flex skeleton file is in error to declare it that way instead of
	pulling in <iostream>.  There may be other namespace problems, but I'm
	not enough of a c++ programmer to be sure.
>Release-Note:
>Audit-Trail:
>Unformatted: