NetBSD Problem Report #38084

From yx@bres.ixn.net.ua  Fri Feb 22 20:01:03 2008
Return-Path: <yx@bres.ixn.net.ua>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id D43FE63BD79
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 22 Feb 2008 20:01:02 +0000 (UTC)
Message-Id: <200802222000.m1MK0v4Y005444@bres.x.ua>
Date: Fri, 22 Feb 2008 20:00:57 GMT
From: Yakovetsky Vladimir <yx@x.ua>
Reply-To: yx@x.ua
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: devel/flex 2.5.34 broken
X-Send-Pr-Version: 3.113.1
X-GNATS-Notify:

>Number:         38084
>Category:       pkg
>Synopsis:       devel/flex 2.5.34 broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    tnn
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 22 20:05:00 +0000 2008
>Closed-Date:    Sat Feb 23 19:45:20 +0000 2008
>Last-Modified:  Sat Feb 23 19:45:20 +0000 2008
>Originator:     Yakovetsky Vladimir
>Release:        
>Organization:

>Environment:
System: Linux bres 2.6.21.5 #1 SMP Fri Jul 6 09:48:19 GMT 2007 i686 GNU/Linux

>Description:
	for example - broken net/libpcap build with flex 2.5.34

>How-To-Repeat:
	os without flex in base system:
	- build and install flex 2.5.34
	- (re)build and (re)install net/libpcap
	- try to build net/tcpdump for example


% uname -s
Linux

% cd /usr/pkgsrc/devel/flex && bmake update
...

% which flex; flex --version
/usr/pkg/bin/flex
flex 2.5.34

% cd /usr/pkgsrc/net/libpcap && bmake replace
...

% cd /usr/pkgsrc/net/tcpdump && bmake
...
checking for local pcap library... not found
checking for main in -lpcap... no
configure: error: see the INSTALL doc for more info
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/net/tcpdump


	lines from tcpdump config.log:
configure:9102: checking for main in -lpcap
configure:9126: gcc -o conftest -O2 -march=native -mfpmath=sse -msse -finline-functions -fomit-frame-pointer -ffast-math -I/usr/pkg/include -I/usr/pkg/include -L/usr/pkg/lib -Wl,-R/usr/pkg/lib conftest.c -lpcap   >&5
/usr/obj/net/tcpdump/work/.buildlink/lib/libpcap.so: undefined reference to `lex_init'
/usr/obj/net/tcpdump/work/.buildlink/lib/libpcap.so: undefined reference to `pcap_lex'
/usr/obj/net/tcpdump/work/.buildlink/lib/libpcap.so: undefined reference to `lex_cleanup'
collect2: ld returned 1 exit status
configure:9132: $? = 1


fyi:	lines from libpcap build.log:
--- scanner.c ---
flex -Ppcap_ -t ./scanner.l > $$.scanner.c; mv $$.scanner.c scanner.c
./scanner.l:84: bad character: %
./scanner.l:84: unknown error processing section 1
./scanner.l:84: unknown error processing section 1
./scanner.l:84: bad character: 1
./scanner.l:84: bad character: 8
./scanner.l:84: bad character: 4
./scanner.l:84: bad character: 0
./scanner.l:84: bad character: 0
./scanner.l:85: bad character: %
./scanner.l:85: unknown error processing section 1
./scanner.l:85: bad character: 2
./scanner.l:85: bad character: 1
./scanner.l:85: bad character: 5
./scanner.l:85: bad character: 0
./scanner.l:85: bad character: 0
./scanner.l:86: bad character: %
./scanner.l:86: unknown error processing section 1
./scanner.l:86: bad character: 7
./scanner.l:86: bad character: 6
./scanner.l:86: bad character: 0
./scanner.l:86: bad character: 0
./scanner.l:87: bad character: %
./scanner.l:87: unknown error processing section 1
./scanner.l:87: bad character: 4
./scanner.l:87: bad character: 5
./scanner.l:87: bad character: 5
./scanner.l:87: bad character: 0
./scanner.l:88: bad character: %
./scanner.l:88: unknown error processing section 1
./scanner.l:88: bad character: 2
./scanner.l:88: bad character: 7
./scanner.l:88: bad character: 6
./scanner.l:88: bad character: 0
./scanner.l:88: bad character: 0
./scanner.l:89: bad character: %
./scanner.l:89: unknown error processing section 1
./scanner.l:89: bad character: 2
./scanner.l:89: bad character: 0
./scanner.l:89: bad character: 0
./scanner.l:89: bad character: 0


>Fix:
	workaround: use previous devel/flex version (2.5.33 for ex.)

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tnn
Responsible-Changed-By: tnn@narn.netbsd.org
Responsible-Changed-When: Fri, 22 Feb 2008 21:27:14 +0000
Responsible-Changed-Why:
mine


From: Tobias Nygren <tnn@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38084 CVS commit: pkgsrc/devel/flex
Date: Fri, 22 Feb 2008 22:13:33 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tnn
 Date:		Fri Feb 22 22:13:33 UTC 2008

 Modified Files:
 	pkgsrc/devel/flex: Makefile distinfo
 Added Files:
 	pkgsrc/devel/flex/patches: patch-ac

 Log Message:
 - add a patch from debian that fixes a parser bug
 - do a "two stage" bootstrap: build flex, then regenerate the scanner and
   rebuild flex.
 - This should fix PR pkg/38084
 - bump PKGREVISION.


 To generate a diff of this commit:
 cvs rdiff -r1.27 -r1.28 pkgsrc/devel/flex/Makefile
 cvs rdiff -r1.8 -r1.9 pkgsrc/devel/flex/distinfo
 cvs rdiff -r0 -r1.1 pkgsrc/devel/flex/patches/patch-ac

 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: tnn@narn.netbsd.org
State-Changed-When: Fri, 22 Feb 2008 22:16:56 +0000
State-Changed-Why:
Please check if flex-2.5.34nb1 fixes your problems.


From: Yakovetsky Vladimir <yx@x.ua>
To: gnats-bugs@NetBSD.org
Cc: tnn@NetBSD.org, pkgsrc-bugs@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: pkg/38084 (devel/flex 2.5.34 broken)
Date: Sat, 23 Feb 2008 19:59:14 +0200

 On Fri, Feb 22, 2008 at 10:16:57PM +0000, tnn@NetBSD.org wrote:
 > Synopsis: devel/flex 2.5.34 broken
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: tnn@narn.netbsd.org
 > State-Changed-When: Fri, 22 Feb 2008 22:16:56 +0000
 > State-Changed-Why:
 > Please check if flex-2.5.34nb1 fixes your problems.
 > 
   yes, thanks.

 -- 
 Yakovetsky Vladimir

State-Changed-From-To: feedback->closed
State-Changed-By: tnn@NetBSD.org
State-Changed-When: Sat, 23 Feb 2008 19:45:20 +0000
State-Changed-Why:
Confirmed fixed. Thanks for the PR.


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