ports/68194: xdiskusage is broken, workaround found

Nate Eldredge nge+freebsd at cs.hmc.edu
Tue Jun 22 09:00:45 UTC 2004

>Number:         68194
>Category:       ports
>Synopsis:       xdiskusage is broken, workaround found
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 22 09:00:33 GMT 2004
>Originator:     Nate Eldredge
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
System: FreeBSD mercury.lan 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #0: Sat Apr 24 12:48:27 PDT 2004 nate at mercury.lan:/medium/obj/medium/src/sys/MERCURY i386


xdiskusage has been broken for some time.  It hangs when you start it,
unless you pipe du output into it.  As such it has been marked IGNORE,
and recently given an expiration date.

I've just been looking into this.  It currently looks like a bug in
fltk.  xdiskusage hangs at one point when it tries to read from a pipe
(it gets piped input from df and/or du).  I have reduced the program
to nothing but this (no fltk calls) and it still hangs.  However, if
you don't link it with fltk it works.  So presumably fltk does
something offensive when its shared library loads, though what it
would be I don't know.  It may have something to do with threads.

As a workaround, however, linking with -static also fixes it.  I don't
know why; I guess this suppresses the troublesome load behavior of
fltk.  But this gives us a way to get xdiskusage working again: simply
add -static to the link command.

I'm going to keep investigating this and hopefully fix or at least
report the fltk bug.

Hopefully this will earn xdiskusage a stay of execution, it's a very
useful program.

--- Makefile.foo	Tue Jun 22 00:57:08 2004
+++ Makefile	Tue Jun 22 00:44:14 2004
@@ -2,7 +2,7 @@
 # Date created:				2000-09-23
 # Whom:					Trevor Johnson
-# $FreeBSD: /repoman/r/pcvs/ports/x11-fm/xdiskusage/Makefile,v 1.17 2004/06/21 21:27:45 kris Exp $
+# $FreeBSD: ports/x11-fm/xdiskusage/Makefile,v 1.16 2004/03/03 04:43:38 trevor Exp $
 PORTNAME=	xdiskusage
@@ -12,9 +12,7 @@
 MASTER_SITES=	http://xdiskusage.sourceforge.net/
-IGNORE=		only works with 'du' output, e.g. du | xdiskusage -
+#IGNORE=		only works with 'du' output, e.g. du | xdiskusage -
 MAINTAINER=	trevor at FreeBSD.org
 COMMENT=	Show where disk space is taken up
@@ -31,7 +29,7 @@
 	${CXX} ${CXXFLAGS} -L${X11BASE}/lib -o \
 		${WRKSRC}/xdiskusage ${WRKSRC}/panels.o \
-		${WRKSRC}/xdiskusage.o -lfltk -lm -lXext -lX11
+		${WRKSRC}/xdiskusage.o -lfltk -lm -lXext -lX11 -static
 	${INSTALL_PROGRAM} ${WRKSRC}/xdiskusage ${PREFIX}/bin


More information about the freebsd-ports-bugs mailing list