Subject: pkg/32915: net/ns fails to link
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <kre@munnari.OZ.AU>
List: pkgsrc-bugs
Date: 02/23/2006 17:30:01
>Number:         32915
>Category:       pkg
>Synopsis:       net/ns fails to link
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 23 17:30:00 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15 (pkgsrc current as of a few hours ago)
>Organization:
	Prince of SOngkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 kre@jade.coe.psu.ac.th:/usr/obj/current/kernels/JADE_ASUS i386
	Using pkg_comp with libkver and NetBSD 3.0 (release) sets.
Architecture: i386
Machine: i386
>Description:
	net/ns uses Tk, and thus obviously requires the (some) X11 libraries.
	There don't appear to be X11 libraries on the link line

>How-To-Repeat:
	cd ..../pkgsrc/net/ns
	make

	Expect to see something like ...

c++ -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib -o ns  common/tclAppInit.o  tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o  common/scheduler.o common/object.o common/packet.o  common/ip.o routing/route.o common/connector.o common/ttl.o  trace/trace.o trace/trace-ip.o  classifier/classifier.o classifier/classifier-addr.o  classifier/classifier-hash.o
	[ LOTS of .o file names deleted ]
		diffusion3/filters/rmst/rmst.o  diffusion3/filters/rmst/rmst_filter.o gen/version.o gen/ns_tcl.o gen/ptypes.o  common/win32.o -L/usr/pkg/lib -ltclcl -L/usr/pkg/lib -lotcl -L/usr/pkg/lib -ltk84 -L/usr/pkg/lib -ltcl84  -lintl -L/usr/local/lib -lpcap  -lm -lm -lpthread -lm
/pkg_comp/obj/pkgsrc/net/ns/default/.buildlink/lib/libtk84.so: undefined reference to `XSetInputFocus'
/pkg_comp/obj/pkgsrc/net/ns/default/.buildlink/lib/libtk84.so: undefined reference to `XFreePixmap'
/pkg_comp/obj/pkgsrc/net/ns/default/.buildlink/lib/libtk84.so: undefined reference to `XCreateGlyphCursor'
[lots more link errors of a similar nature]

	Notice there is no -lX* type stuff there at all (but -ltk84 is there)
	I don't think I have anything in mk.conf that could possibly be
	related.    This system (including inside the pkg_comp arena)
	is using standard NetBSD (base) X11 (of NetBSD 3.0 vintage)
	installed in /usr/X11R6 which it is expected (ie: not using a
	pkgsrc version of X).

>Fix:
	Cause X11 to be included ...