Subject: bin/6384: libpcap broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <fb@enteract.com>
List: netbsd-bugs
Date: 10/31/1998 11:51:20
>Number:         6384
>Category:       bin
>Synopsis:       libpcap broken by changes to yacc targets in bsd.sys.mk
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 31 10:05:00 1998
>Last-Modified:
>Originator:     Frederick Bruckman
>Organization:

>Release:        Oct 30, 1998
>Environment:
System: NetBSD fb.sa.enteract.com 1.3H NetBSD 1.3H (FB) #135: Fri Oct 30 11:40:15 CST 1998
fredb@fb.sa.enteract.com:/usr/src/sys/arch/mac68k/compile/FB mac68k


>Description:
	libpcap built against Friday's sup is not usable. Example:

#pppd call enteract
/usr/libexec/ld.so: Undefined symbol "_pcap_lval" in pppd:/usr/lib/libpcap.so.0.0

moreover, pppd fails to link staticly:

#LDSTATIC=-static make
cc  -static -o pppd auth.o cbcp.o ccp.o chap.o chap_ms.o demand.o fsm.o ipcp.o ipxcp.o lcp.o magic.o main.o options.o sy
s-bsd.o upap.o -lpcap -lcrypt -lutil
gencode.o: Undefined symbol `_pcap_parse' referenced from text segment
grammar.o: Undefined symbol `_yylex' referenced from text segment
grammar.o: Undefined symbol `_yylex' referenced from text segment
scanner.o: Undefined symbol `_pcap_lval' referenced from text segment
scanner.o: Undefined symbol `_pcap_lval' referenced from text segment
scanner.o: Undefined symbol `_pcap_lval' referenced from text segment
scanner.o: Undefined symbol `_pcap_lval' referenced from text segment
*** Error code 1

Stop.
>How-To-Repeat:
	Build the world against October 30's sup. Try to run pppd.
>Fix:
	The following seems to work.

	eeprom might need similar magic; it appears to have the only other Makefile 
	in the tree that sets YFLAGS in this way... 

--- ./src/lib/libpcap/Makefile.orig	Thu Apr  9 06:08:59 1998
+++ ./src/lib/libpcap/Makefile	Sat Oct 31 10:43:26 1998
@@ -10,7 +10,7 @@
 CPPFLAGS+=-DHAVE_ETHER_HOSTTON=1 -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1
 CFPPLAGS+=-DLBL_ALIGN=1
 LFLAGS+=-olex.yy.c -Ppcap_
-YFLAGS+=-ppcap_
+YACCPREFIX=pcap_
 YHEADER=1
 
 SRCS=	scanner.l savefile.c pcap.c pcap-bpf.c optimize.c nametoaddr.c \

>Audit-Trail:
>Unformatted: