NetBSD Problem Report #42509

From kre@munnari.OZ.AU  Wed Dec 23 17:38:54 2009
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 3D5B763C3A9
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 23 Dec 2009 17:38:54 +0000 (UTC)
Message-Id: <200912231737.nBNHbX3R006735@jade.coe.psu.ac.th>
Date: Thu, 24 Dec 2009 00:37:33 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: lang/intercal wants to refer to yylineno which no longer exists
X-Send-Pr-Version: 3.95

>Number:         42509
>Category:       pkg
>Synopsis:       lang/intercal wants to refer to yylineno which no longer exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dillo
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 23 17:40:00 +0000 2009
>Closed-Date:    Sun Jan 03 09:55:20 +0000 2010
>Last-Modified:  Sun Jan 03 09:55:20 +0000 2010
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386   (pkgsrc current of 2009-12-22)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
	Linking lang/intercal fails with (many) references to yylineno
	(undefined symbol).

>How-To-Repeat:
	I use pkg_comp with NetBSD 4.0 release sets installed, and
	X11_TYPE=modular (no x* sets).   I doubt any of that is relevant.

	Building (attempting to build) lang/intercal results in ...

===> Building for intercal-0.24
/usr/bin/yacc -d -d ick.y
mv y.tab.c ick.c
cc -O2 -DICKINCLUDEDIR=\"/usr/pkg/include/intercal-0.24\" -DICKLIBDIR=\"/usr/pkg/share/intercal-0.24\" -DYYDEBUG -D_POSIX_SOURCE -DUSG  -c ick.c
/usr/bin/lex  lexer.l
mv lex.yy.c lexer.c
cc -O2 -DICKINCLUDEDIR=\"/usr/pkg/include/intercal-0.24\" -DICKLIBDIR=\"/usr/pkg/share/intercal-0.24\" -DYYDEBUG -D_POSIX_SOURCE -DUSG  -c lexer.c
  [....]
cc -O2 -DICKINCLUDEDIR=\"/usr/pkg/include/intercal-0.24\" -DICKLIBDIR=\"/usr/pkg/share/intercal-0.24\" -DYYDEBUG -D_POSIX_SOURCE -DUSG  -c perpetrate.c
cc perpetrate.o ick.o lexer.o feh.o lose.o fiddle.o -Wl,-R/usr/pkg/lib -o ick
perpetrate.o: In function `abend':
perpetrate.c:(.text+0xa): undefined reference to `yylineno'
perpetrate.o: In function `main':
perpetrate.c:(.text+0x813): undefined reference to `yylineno'
perpetrate.c:(.text+0xaae): undefined reference to `yylineno'
perpetrate.c:(.text+0xd06): undefined reference to `yylineno'
ick.o: In function `yyparse':
ick.c:(.text+0x395): undefined reference to `yylineno'
ick.o:ick.c:(.text+0xa59): more undefined references to `yylineno' follow
*** Error code 1

Stop.
make: stopped in /pkg_comp/obj/pkgsrc/lang/intercal/4x/intercal-0.24
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/lang/intercal

>Fix:
	??   Would yylineno return if bison replaced yacc?
	Or is there some other way to get it back?  Or is this
	some simpler problem (missing include in perpetrate.c or something) ??

>Release-Note:

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org
Cc: 
Subject: Re: pkg/42509: lang/intercal wants to refer to yylineno which no longer exists
Date: Wed, 23 Dec 2009 14:43:22 -0500

 On Dec 23,  5:40pm, kre@munnari.OZ.AU (kre@munnari.OZ.AU) wrote:
 -- Subject: pkg/42509: lang/intercal wants to refer to yylineno which no long

 | 	Linking lang/intercal fails with (many) references to yylineno
 | 	(undefined symbol).

 Add %option yylineno to the lex file?

 christos

From: Robert Elz <kre@munnari.OZ.AU>
To: christos@zoulas.com (Christos Zoulas)
Cc: gnats-bugs@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/42509: lang/intercal wants to refer to yylineno which no longer exists
Date: Thu, 24 Dec 2009 03:32:48 +0700

     Date:        Wed, 23 Dec 2009 14:43:22 -0500
     From:        christos@zoulas.com (Christos Zoulas)
     Message-ID:  <20091223194322.C4E365654F@rebar.astron.com>

   | Add %option yylineno to the lex file?

 Thanks for the hint, that seemed simple enough (though I never found in
 the lex (flex) documentation any hint just where in the input sequence all
 the %option stuff it talks about should get put...) that I thought I should
 take a look at that and make a patch.

 But it turns out to be the exact opposite of what is wanted, intercal
 is (mostly) assuming it is using flex, which doesn't manage yylineno,
 and is handling it all for itself (I guess it uses that name for compatibility
 with other lex parsers, for the rest of the code).

 The problem turns out to be that patches/patch-ad "undoes" this
 assumption (essentially removes the declaration of yylineno and assumes
 that lex will provide it) - simply deleting patches/patch-ad fixed the
 problem for me.

 I assume though that someone needs that patch (which systems that pkgsrc
 runs on don't use a flex based lex?) - and that some more elegant solution
 than simply deleting the patch will be needed.

 kre

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
	pkgsrc-bugs@netbsd.org, kre@munnari.OZ.AU
Cc: 
Subject: Re: pkg/42509: lang/intercal wants to refer to yylineno which no longer exists
Date: Wed, 23 Dec 2009 17:08:13 -0500

 On Dec 23,  8:35pm, kre@munnari.OZ.AU (Robert Elz) wrote:
 -- Subject: Re: pkg/42509: lang/intercal wants to refer to yylineno which no 

 |    | Add %option yylineno to the lex file?
 |  
 |  Thanks for the hint, that seemed simple enough (though I never found in
 |  the lex (flex) documentation any hint just where in the input sequence all
 |  the %option stuff it talks about should get put...) that I thought I should
 |  take a look at that and make a patch.
 |  
 |  But it turns out to be the exact opposite of what is wanted, intercal
 |  is (mostly) assuming it is using flex, which doesn't manage yylineno,
 |  and is handling it all for itself (I guess it uses that name for compatibility
 |  with other lex parsers, for the rest of the code).
 |  
 |  The problem turns out to be that patches/patch-ad "undoes" this
 |  assumption (essentially removes the declaration of yylineno and assumes
 |  that lex will provide it) - simply deleting patches/patch-ad fixed the
 |  problem for me.
 |  
 |  I assume though that someone needs that patch (which systems that pkgsrc
 |  runs on don't use a flex based lex?) - and that some more elegant solution
 |  than simply deleting the patch will be needed.

 Perhaps the portable solution is to rename the variable, since the program
 wants to manage it itself.

 christos

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42509: lang/intercal wants to refer to yylineno which no longer exists
Date: Thu, 24 Dec 2009 06:59:59 +0700

     Date:        Wed, 23 Dec 2009 22:10:06 +0000 (UTC)
     From:        christos@zoulas.com (Christos Zoulas)
     Message-ID:  <20091223221006.2AEA663C3A9@www.NetBSD.org>

   |  Perhaps the portable solution is to rename the variable, since the program
   |  wants to manage it itself.

 Perhaps, but I'll leave that for someone else to sort out now.

 kre

Responsible-Changed-From-To: pkg-manager->dillo
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 24 Dec 2009 11:15:56 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/42509 CVS commit: pkgsrc/lang/intercal
Date: Sat, 2 Jan 2010 12:49:43 +0000

 Module Name:	pkgsrc
 Committed By:	drochner
 Date:		Sat Jan  2 12:49:43 UTC 2010

 Modified Files:
 	pkgsrc/lang/intercal: Makefile

 Log Message:
 "flex" apparently changed its behavior wrt "yylineno": If invoked
 w/o "-l", yylinelo still gets defined in recent versions, but not
 in the version which comes with NetBSD-4.
 So require "flex" for the build and always use the "-l" flag, so we'll
 hopefully get deterministic behavior.
 Should fix PR pkg/42509 by Robert Elz.


 To generate a diff of this commit:
 cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/intercal/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Sat, 02 Jan 2010 12:50:48 +0000
State-Changed-Why:
does it work now?


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42509 (lang/intercal wants to refer to yylineno which no
	longer exists)
Date: Sun, 3 Jan 2010 04:26:28 +0000

 On Sat, Jan 02, 2010 at 12:50:50PM +0000, drochner@NetBSD.org wrote:
  > State-Changed-From-To: open->feedback
  > State-Changed-By: drochner@NetBSD.org
  > State-Changed-When: Sat, 02 Jan 2010 12:50:48 +0000
  > State-Changed-Why:
  > does it work now?

 Does for me on -5, and it didn't before, FWIW.
 -- 
 David A. Holland
 dholland@netbsd.org

From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/42509 (lang/intercal wants to refer to yylineno which no longer exists)
Date: Sun, 03 Jan 2010 13:44:26 +0700

     Date:        Sat,  2 Jan 2010 12:50:50 +0000 (UTC)
     From:        drochner@NetBSD.org
     Message-ID:  <20100102125050.A018163B844@www.NetBSD.org>

   | does it work now?

 Sorry, been on plane(s) ... but yes, that works for me now too.

 Thanks,

 kre

State-Changed-From-To: feedback->closed
State-Changed-By: drochner@NetBSD.org
State-Changed-When: Sun, 03 Jan 2010 09:55:20 +0000
State-Changed-Why:
submitter confirmed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.