Subject: pkg/28510: X apps cannot find app-defaults due to xpkgwedge
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <chuck@ece.cmu.edu>
List: pkgsrc-bugs
Date: 12/02/2004 04:15:00
>Number:         28510
>Category:       pkg
>Synopsis:       X apps cannot find app-defaults due to xpkgwedge
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 02 04:15:00 +0000 2004
>Originator:     Chuck Cranor
>Release:        NetBSD 2.0
>Organization:
Carnegie Mellon University
>Environment:
		NetBSD 2.0, current pkgsrc (as of Tue Nov 30 2004)
>Description:

	earlier this year xpkgwedge was made the default.   this moved
	the installation of app-default files from /usr/X11R6/lib to 
	/usr/pkg/lib, but our src/x11 lib Xt still looks for the files
	only in /usr/X11R6/lib.

	the xpkgwedge documentation suggests forcing everyone to set
	XAPPLRESDIR in the environment in order for applications to 
	function properly.   [not that many people will see the 
	xpkgwedge documentation as it flashes by on the screen 
	un-noticed.  in fact, since pkgsrc installs xpkgwedge by 
	default, most users will be unaware it is even there...]

	there was some discussion of this on tech-pkg:
	  http://mail-index.netbsd.org/tech-pkg/2004/04/16/0041.html
	  http://mail-index.netbsd.org/tech-pkg/2004/04/17/0003.html
	  http://mail-index.netbsd.org/tech-pkg/2004/04/20/0015.html
	but nothing was done about it.
	
	in the NetBSD environment setting XAPPLRESDIR is kind of silly,
	since we compile our own X and we can easily configure it to
	look in pkgsrc as well as X11 lib.   at a minimum we should
	address this.   in the non-NetBSD using a non-pkgsrc compiled 
	X environment an improved solution is not as clear.   i would
	prefer that non-NetBSD environments using xpkgwedge be set to
	use a pkgsrc compiled X11R6 with a revised XFILESEARCHPATHDEFAULT
	set.


>How-To-Repeat:

	try compiling and running an app that needs its defaults, for
	example, audio/xmmix.

	i also noticed that games/craft is broken due to xpkgwedge too
	(it doesn't even run with XAPPLRESDIR set, it dies with:
	1, FILE, file '/usr/X11R6/share/craft/hcraft/men10.cmap' not existing
	error message.)

>Fix:
	for NetBSD, edit src/x11/lib/Xt/Makefile, add pkg lib to the 
	XFILESEARCHPATHDEFAULT line which currently reads:

CPPFLAGS.Intrinsic.c=   -DXFILESEARCHPATHDEFAULT=\"${X11LIBDIR}/%L/%T/%N%C%S:${X11LIBDIR}/%l/%T/%N%C%S:${X11LIBDIR}/%T/%N%C%S:${X11LIBDIR}/%L/%T/%N%S:${X11LIBDIR}/%l/%T/%N%S:${X11LIBDIR}/%T/%N%S\"