From nobody@FreeBSD.org  Sun Jan 25 20:19:01 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4352A1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Jan 2009 20:19:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 315398FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Jan 2009 20:19:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0PKJ0h9064995
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 25 Jan 2009 20:19:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0PKJ0L9064994;
	Sun, 25 Jan 2009 20:19:00 GMT
	(envelope-from nobody)
Message-Id: <200901252019.n0PKJ0L9064994@www.freebsd.org>
Date: Sun, 25 Jan 2009 20:19:00 GMT
From: Randy Pratt <bsd-unix@embarqmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] x11/xmore build failure
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130986
>Category:       ports
>Synopsis:       [PATCH] x11/xmore build failure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-x11
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 25 20:20:01 UTC 2009
>Closed-Date:    Sun Jan 25 21:07:18 UTC 2009
>Last-Modified:  Thu Mar 26 23:50:04 UTC 2009
>Originator:     Randy Pratt
>Release:        FreeBSD-6.4
>Organization:
>Environment:
6.4-STABLE FreeBSD 6.4-STABLE #0: Wed Jan 14 08:00:33 EST 2009
>Description:
x11/xmore build failure during Xorg update:

===>  Building for xmore-1.0.1_1
make  all-am
cc  -O -pipe   -o xmore  xmore-xmore.o  -L/usr/local/lib -lXaw7 -lXmu -lXt -lX11 -lSM -lICE 
xmore-xmore.o(.text+0x43): In function `printshellDestroyXtProc':
: undefined reference to `XawPrintDialogClosePrinterConnection'
*** Error code 1

Stop in /usr/ports/x11/xmore/work/xmore-1.0.1.
*** Error code 1

Some web searching turned up:

  "XawPrintDialogClosePrinterConnection" is defined in printdialog.h,
  which is only included when USE_XPRINT is enabled. The xmore component
  is built explicitly with --disable-xprint.

I see no indication that it is built with the --disable-xprint.

>How-To-Repeat:
cd /usr/ports/x11/xmore && make install clean

I'm not sure why others have not seen this unless the "XPRINT" variable
has been set in their environment.  I'm using a low overhead window manager
(fluxbox) but I've not ran into this before.


>Fix:
I made a (clumsy) patch to get it to build locally but there's probably
a better way to do it in the Makefile.

Patch attached with submission follows:

--- xmore.c.orig	2009-01-25 09:44:52.000000000 -0500
+++ xmore.c	2009-01-25 09:45:39.000000000 -0500
@@ -147,14 +147,14 @@
     XtCallActionProc(w, "quit", NULL, NULL, 0);
 }
 
+#ifdef USE_XPRINT
+
 static void
 printshellDestroyXtProc(Widget w, XtPointer client_data, XtPointer callData)
 {
     XawPrintDialogClosePrinterConnection(printdialog, False);
 }
 
-#ifdef USE_XPRINT
-
 static void
 printOKXtProc(Widget w, XtPointer client_data, XtPointer callData)
 {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-x11 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Jan 25 20:20:11 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130986 
State-Changed-From-To: open->closed 
State-Changed-By: rnoland 
State-Changed-When: Sun Jan 25 21:07:17 UTC 2009 
State-Changed-Why:  
xmore builds fine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130986 

From: John Nielsen <john@jnielsen.net>
To: Robert Noland <rnoland@freebsd.org>, bug-followup@freebsd.org,
        bsd-unix@embarqmail.com
Cc:  
Subject: Re: ports/130986: [PATCH] x11/xmore build failure
Date: Tue, 24 Mar 2009 11:46:40 -0400

 I just ran in to the same build failure as the original submitter but on a 
 machine running -CURRENT. Since you (rnoland) couldn't reproduce the 
 issue and I've only seen it on one machine out of several I've been 
 updating lately I suspect the problem is likely a missing dependency. I 
 did recently do a pkg_cutleaves run on the machine now having the 
 problem, but not quite recently enough that I remember everything I 
 removed.
 
 Randy, do you recall uninstalling any ports prior to encountering this 
 issue or is your Xorg configuration otherwise customized?
 
 I played around with a Makefile solution and while I was able to 
 get --disable-xprint passed to the configure step it doesn't fix the 
 problem. However, if I do a "make configure" (with or without my patched 
 Makefile) then cd $WRKSRC then manually 
 run "./configure --disable-xprint", a subsequent "make install" from the 
 ports directory builds and installs just fine. So either my ports fu 
 isn't up to snuff or something odd is going on or both.
 
 JN
 

From: Randy Pratt <bsd-unix@embarqmail.com>
To: John Nielsen <john@jnielsen.net>
Cc: Robert Noland <rnoland@freebsd.org>, bug-followup@freebsd.org
Subject: Re: ports/130986: [PATCH] x11/xmore build failure
Date: Thu, 26 Mar 2009 19:26:11 -0400

 On Tue, 24 Mar 2009 11:46:40 -0400
 John Nielsen <john@jnielsen.net> wrote:
 
 > I just ran in to the same build failure as the original submitter but on a 
 > machine running -CURRENT. Since you (rnoland) couldn't reproduce the 
 > issue and I've only seen it on one machine out of several I've been 
 > updating lately I suspect the problem is likely a missing dependency. I 
 > did recently do a pkg_cutleaves run on the machine now having the 
 > problem, but not quite recently enough that I remember everything I 
 > removed.
 > 
 > Randy, do you recall uninstalling any ports prior to encountering this 
 > issue or is your Xorg configuration otherwise customized?
 
 Its been awhile, but my ports mix does change occasionally and its
 entirely possible that I could have removed something.  Up
 to that point I had been updating ports daily for about 3 years.  I use
 portmaster and regularly run the "--check-depends" option.  This
 should restore any missing dependencies required by the ports
 Makefile.  If there is a missing dependency in the Makefile, it appeared
 with the new xorg since xmore compiled fine with the older xorg.
 
 At the time, I gave up on updating to the latest xorg due to
 keyboard/mouse problems and just reverted my tree back to just before
 the xorg update (2009-01-23 09:58:10 UTC) and left it there.
 
 > I played around with a Makefile solution and while I was able to 
 > get --disable-xprint passed to the configure step it doesn't fix the 
 > problem. However, if I do a "make configure" (with or without my patched 
 > Makefile) then cd $WRKSRC then manually 
 > run "./configure --disable-xprint", a subsequent "make install" from the 
 > ports directory builds and installs just fine. So either my ports fu 
 > isn't up to snuff or something odd is going on or both.
 
 I may get some time when the weather gets hot to attempt the xorg update
 again but its a lot of compiling and a lot more if I have to revert the
 tree again.  This time will probably be a wipe-all-ports and reinstall
 since the ports tree has moved so much in the past couple of months
 that its not worth doing an upgrade path.
 
 Thanks for confirming that I'm not the only one who has seen this.
 
 Randy
>Unformatted:
