Subject: pkg/34795: mk/ doesn't seem to work (for xfig anyway)
To: None <,,>
From: None <kre@munnari.OZ.AU>
List: pkgsrc-bugs
Date: 10/12/2006 08:40:00
>Number:         34795
>Category:       pkg
>Synopsis:       mk/ doesn't seem to work (for xfig anyway)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 12 08:40:00 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15 (pkgsrc current as of about date of message)
	Prince of Songkla University
System: NetBSD 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 i386
Architecture: i386
Machine: i386
	As I understand it, the theory of mk/ is that
	one may set XAW_TYPE to select which variant of the Xaw library
	applications should use (the basic one, the 3d extensions, or the
	xpm extensions on top of that).

	In my /etc/mk.conf I have
		jade$ grep XAW /etc/mk.conf

	And when making xfig, I do see ...

=> Required installed package digest>=20010302: digest-20050731 found
=> Checksum SHA1 OK for xfig.3.2.5-alpha5.full.tar.gz
=> Checksum RMD160 OK for xfig.3.2.5-alpha5.full.tar.gz
work.jade -> /usr/obj/pkg/graphics/xfig/work.jade
===> Installing dependencies for xfig-3.2.5alpha5nb4
=> Required installed package xpkgwedge>=1.15: xpkgwedge-1.16 found
=> Required installed package x11-links>=0.25: x11-links-0.26 found
=> Required installed package transfig>=3.2.4: transfig-3.2.5alpha7nb2 found
=> Required installed package jpeg>=6bnb2: jpeg-6bnb3 found
=> Required installed package png>=1.2.9nb2: png-1.2.12 found
=> Required installed package Xaw3d>=1.5Enb1: Xaw3d-1.5Enb2 found

	The last (included) line there looks right.

	Yet, the compiled xfig doesn't look very 3d, which might
	not be surprising given ...

jade$ ldd work.jade/*/xfig
        -ljpeg.62 => /usr/pkg/lib/
        -lX11.6 => /usr/X11R6/lib/
        -lXext.6 => /usr/X11R6/lib/
        -lXpm.4 => /usr/X11R6/lib/
        -lz.0 => /usr/lib/
        -lm.0 => /usr/lib/
        -lm.0 => /usr/lib/
        -lpng12.0 => /usr/pkg/lib/
        -lXi.6 => /usr/X11R6/lib/
        -lICE.6 => /usr/X11R6/lib/
        -lSM.6 => /usr/X11R6/lib/
        -lXt.6 => /usr/X11R6/lib/
        -lXmu.6 => /usr/X11R6/lib/
        -lXaw.7 => /usr/X11R6/lib/
        -lc.12 => /usr/lib/

	Notice the penultimate line, if Xaw3d were being used,
	what should be there would be /usr/pkg/lib/

	And indeed, the link command for xfig just has -lXaw which
	cannot possibly find Xaw3d (of course, the intended use of Xaw3d
	was that the installed library be called libXaw.* and simply
	replace the standard X version, but that's not now pkgsrc
	installs it - which has the advantage that different applications
	can use different styles).

	If I relink (only) xfig with -lXaw3d instead of -lXaw then
	the 3d appearance "appears" (and what's more a bug I was looking
	for in xfig vanishes - which suggests either a Xaw problem, or
	an interaction/interface problem between xfig and modern Xaw
	libraries - but that's for another day - the Xaw3d version also
	dumps core when it shouldn't, which is more serious, but perhaps
	it should also have been compiled with different .h files).

	I haven't tested setting XAW_TYPE to xpm, but I doubt that would
	behave all that differently.

	As above - simply set XAW_TYPE=3d and try building xfig
	expect a (mostly) working xfig, bit not using the 3d library
	at all (though it does have a dependency registered upon it).

	Note that xfig (almost) expects to be built with the 3d version
	of Xaw (that might be what the developers atually use, from
	reading between the lines of the readme files and such), so it
	should all "just work".   It does link correctly, and much of
	it runs correctly when Xaw3d is used.