NetBSD Problem Report #20772
Received: (qmail 13125 invoked by uid 605); 17 Mar 2003 21:10:27 -0000
Message-Id: <25372-1047935427@rainier.reedmedia.net>
Date: Mon, 17 Mar 2003 13:10:27 -0800
From: reed@reedmedia.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: reed@reedmedia.net
To: gnats-bugs@gnats.netbsd.org
Subject: devel/flex needs a yacc to build
X-Send-Pr-Version: 3.95
>Number: 20772
>Category: pkg
>Synopsis: devel/flex needs a yacc to build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Mar 17 21:11:00 +0000 2003
>Closed-Date: Sun Oct 05 05:24:44 +0000 2003
>Last-Modified: Sun Oct 05 05:24:44 +0000 2003
>Originator:
>Release: NetBSD 1.6
>Organization:
http://bsd.reedmedia.net/
>Environment:
System: NetBSD rainier.reedmedia.net 1.6 NetBSD 1.6 (JCR-20020927) #3: Sat Sep 28 13:40:20 PDT 2002 reed@rainier.reedmedia.net:/usr/src/sys/arch/i386/compile/JCR-20020927 i386
Architecture: i386
Machine: i386
>Description:
pkgsrc/devel/flex configure script uses the predefined pkgsrc YACC setting
instead of autodetecting a yacc (or bison).
It will fail even if bison is installed, because the YACC is defined.
Defining YACC as bison doesn't work because it needs a -y switch.
>How-To-Repeat:
Move /usr/bin/yacc and attempt to build pkgsrc/devel/flex
>Fix:
Here is a fix and the patch-aa is also below.
Note that this gets rid of the PLATFORM restrictions (because
it should work and it doesn't matter if a system has it installed in different
places).
? devel/flex/README.html
? devel/flex/patches
Index: devel/flex/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/flex/Makefile,v
retrieving revision 1.6
diff -b -u -r1.6 Makefile
--- devel/flex/Makefile 2002/12/22 16:33:16 1.6
+++ devel/flex/Makefile 2003/03/17 21:04:18
@@ -5,13 +5,19 @@
MASTER_SITES= ${MASTER_SITE_GNU:=non-gnu/flex/}
MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://www.gnu.org/software/flex/
COMMENT= fast clone of lex(1), the lexical scanner generator
-ONLY_FOR_PLATFORM= SunOS-*-* # in NetBSD base system
-ONLY_FOR_PLATFORM+= Linux-*-*
-
GNU_CONFIGURE= YES
WRKSRC= ${WRKDIR}/flex-2.5.4
+
+.if !exists(/usr/bin/yacc)
+BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
+# XXX This doesn't set YACC because needs -y switch.
+# XXX A patch changes the configure script to not use YACC setting
+# XXX and it auto-detects correctly.
+#YACC= ${LOCALBASE}/bin/bison
+.endif
.include "../../mk/bsd.pkg.mk"
Index: devel/flex/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/flex/distinfo,v
retrieving revision 1.2
diff -b -u -r1.2 distinfo
--- devel/flex/distinfo 2001/04/21 00:44:17 1.2
+++ devel/flex/distinfo 2003/03/17 21:04:18
@@ -2,3 +2,4 @@
SHA1 (flex-2.5.4a.tar.gz) = 38a5e15c348d2ca7dce94d71de2b51484d23e2ef
Size (flex-2.5.4a.tar.gz) = 380995 bytes
+SHA1 (patch-aa) = 0408c715a36ef9224cecd84aa8c6267bd5d9349f
Then this is the patch-aa:
--- configure.orig Thu Apr 20 13:10:14 1995
+++ configure Mon Mar 17 12:55:42 2003
@@ -427,9 +427,6 @@
if eval "test \"`echo '${'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&4
else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
-else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
@@ -439,7 +436,6 @@
fi
done
IFS="$ac_save_ifs"
-fi
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
>Release-Note:
>Audit-Trail:
From: Jan Schaumann <jschauma@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/20772
Date: Mon, 2 Jun 2003 22:25:55 -0400
Why patch at all? Why not simply do
.if !exists(/usr/bin/yacc)
BUILD_DEPENDS+= bison-[0-9]*:../../devel/bison
YACC= ${PREFIX}/bin/bison -y
.endif
Or, even better, I think: why don't we set ${YACC} in
/usr/pkgsrc/mk/defs.<opsys>.mk ?
-Jan
--
Wenn ich tot bin, mir soll mal Einer mit Auferstehung oder so
kommen, ich hau ihm eine rein! (Anonym)
State-Changed-From-To: open->feedback
State-Changed-By: wiz
State-Changed-When: Sat Aug 23 22:55:45 UTC 2003
State-Changed-Why:
I committed Jan's patch (and the other parts of your patch).
Does this fix your problem?
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: pr/20772 CVS commit: pkgsrc/devel/flex
Date: Sat, 23 Aug 2003 22:55:35 +0000 (UTC)
Module Name: pkgsrc
Committed By: wiz
Date: Sat Aug 23 22:55:35 UTC 2003
Modified Files:
pkgsrc/devel/flex: Makefile
Log Message:
Add dependency on bison if there is no yacc; addresses PR 20772.
Add HOMEPAGE and remove ONLY_FOR_PLATFORMS (from the same PR).
To generate a diff of this commit:
cvs rdiff -r1.10 -r1.11 pkgsrc/devel/flex/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc: wiz@netbsd.org, <pkg-manager@netbsd.org>
Subject: Re: pkg/20772
Date: Mon, 25 Aug 2003 08:01:27 -0700 (PDT)
On 23 Aug 2003 wiz@netbsd.org wrote:
> Synopsis: devel/flex needs a yacc to build
>
> State-Changed-From-To: open->feedback
> State-Changed-By: wiz
> State-Changed-When: Sat Aug 23 22:55:45 UTC 2003
> State-Changed-Why:
> I committed Jan's patch (and the other parts of your patch).
> Does this fix your problem?
For some reason YACC is not being set.
$ ls -l /usr/bin/yacc
ls: /usr/bin/yacc: No such file or directory
$ bmake show-var VARNAME=YACC
yacc
(That's probably why I made the patch in the first place.)
The only thing I can see is that my /usr/share/mk/sys.mk sets YACC=yacc.
(But under NetBSD, it is YACC?=yacc.) My mk files are from
pkgsrc/devel/mk-files.
Thank you for adding the homepage.
Jeremy C. Reed
http://bsd.reedmedia.net/
From: "Jeremy C. Reed" <reed@reedmedia.net>
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Re: pkg/20772
Date: Mon, 25 Aug 2003 08:06:02 -0700 (PDT)
More information (related to why YACC is not set correctly):
http://mail-index.netbsd.org/tech-pkg/2002/12/02/0006.html
Jeremy C. Reed
From: Thomas Klausner <wiz@netbsd.org>
To: "Jeremy C. Reed" <reed@reedmedia.net>
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/20772
Date: Sun, 7 Sep 2003 01:28:28 +0200
On Mon, Aug 25, 2003 at 08:01:27AM -0700, Jeremy C. Reed wrote:
> On 23 Aug 2003 wiz@netbsd.org wrote:
>
> > Synopsis: devel/flex needs a yacc to build
> >
> > State-Changed-From-To: open->feedback
> > State-Changed-By: wiz
> > State-Changed-When: Sat Aug 23 22:55:45 UTC 2003
> > State-Changed-Why:
> > I committed Jan's patch (and the other parts of your patch).
> > Does this fix your problem?
>
> For some reason YACC is not being set.
> $ ls -l /usr/bin/yacc
> ls: /usr/bin/yacc: No such file or directory
> $ bmake show-var VARNAME=YACC
> yacc
>
> (That's probably why I made the patch in the first place.)
>
> The only thing I can see is that my /usr/share/mk/sys.mk sets YACC=yacc.
> (But under NetBSD, it is YACC?=yacc.) My mk files are from
> pkgsrc/devel/mk-files.
Does it help if bsd.prefs.mk is included before setting YACC?
> Thank you for adding the homepage.
You're welcome.
Thomas
State-Changed-From-To: feedback->closed
State-Changed-By: reed
State-Changed-When: Sun Oct 5 05:23:26 UTC 2003
State-Changed-Why:
This problem is fixed. My problem was that using the mk-files'
/usr/share/mk/sys.mk (old version). New version is fine.
nevertheless, pkgsrc shouldn't load that sys.mk over and over again.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.