Subject: xsrc/27156: Missing XFree86 "shadow" module needed by vesa(4) driver
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 10/06/2004 00:59:03
>Number:         27156
>Category:       xsrc
>Synopsis:       Missing XFree86 "shadow" module needed by vesa(4) driver
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 05 23:00:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Joly
>Release:        NetBSD 2.99.9
>Organization:
Institut Pasteur
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 2.99.9 NetBSD 2.99.9 (LANFEUST) #0: Mon Oct 4 10:08:43 CEST 2004 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
I just wanted to try the XFree86 vesa(4) driver on my amd64 workstation,
and noticed that the server failed to launch claiming that it cannot find the
module:

(**) VESA(0): Using "Shadow Framebuffer"
(II) Loading sub module "shadow"
(II) LoadModule: "shadow"
(WW) Warning, couldn't open module shadow
(II) UnloadModule: "shadow"
(EE) VESA: Failed to load module "shadow" (module does not exist, 0)

This module is not currently built with src/x11 framework (but present if
made using xsrc).

For a temporary workaround, just set the "ShadowFB" option to "Off", and
the X server with the vesa driver will work.

Some other drivers may fail too (fbdev, neomagic, trident), but the
"ShadowFB" option is off by default.

>How-To-Repeat:
Start XFree86 server (built from src/x11) with vesa(4) driver.
>Fix:
I successfully built and installed the `libshadow.a' module on my
amd64 workstation with the following sets of patches.
But other platforms must have their xserver list updated too (i386, ...).

Index: x11/Xserver/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- x11/Xserver/Makefile	28 Mar 2004 14:24:38 -0000	1.12
+++ x11/Xserver/Makefile	4 Oct 2004 18:09:54 -0000
@@ -32,15 +32,19 @@
 SUBDIR.iplan=iplan2p4 iplan2p8
 .endif
 
+.if ${XSERVER_XFREE86} != "no"
+SUBDIR.miext=miext
+.else
+SUBDIR.miext=
+.endif
+
 SUBDIR=		include
 SUBDIR+=	.WAIT dix os mi printer Xext xkb xinput GL lbx dbe record
 SUBDIR+=	mfb randr render xtrap
 SUBDIR+=	${SUBDIR.cfb} ${SUBDIR.fb} ${SUBDIR.iplan} hw
-SUBDIR+=	${SUBDIR.xfont} ${SUBDIR.afb}
+SUBDIR+=	${SUBDIR.xfont} ${SUBDIR.miext} ${SUBDIR.afb}
 SUBDIR+=	.WAIT Xserver
 
-XTODO=	afb miext/shadow miext/layer
-
 .PATH:	${X11SRCDIR.xc}/programs/Xserver
 MAN=	Xserver.1
 
Index: x11/Xserver/miext/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/miext/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- x11/Xserver/miext/Makefile	22 Dec 2003 16:18:19 -0000	1.1
+++ x11/Xserver/miext/Makefile	4 Oct 2004 18:09:55 -0000
@@ -1,5 +1,7 @@
 #	$NetBSD: Makefile,v 1.1 2003/12/22 16:18:19 rtr Exp $
 
-SUBDIR=	layer shadow
+SUBDIR=	shadow
+
+XTODO=	layer
 
 .include <bsd.subdir.mk>
Index: x11/Xserver/miext/shadow/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/miext/shadow/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- x11/Xserver/miext/shadow/Makefile	7 Feb 2004 06:52:08 -0000	1.2
+++ x11/Xserver/miext/shadow/Makefile	4 Oct 2004 18:09:55 -0000
@@ -1,34 +1,9 @@
 #	$NetBSD: Makefile,v 1.2 2004/02/07 06:52:08 lukem Exp $
 
-XMODULEDIR=	${X11USRLIBDIR}/modules
-
 .include "../../Makefile.serverlib"
-
-LIB=	shadow
-.PATH:	${X11SRCDIR.xc}/programs/Xserver/miext/${LIB}
-
-SRCS=	shadow.c shalloc.c shplanar.c shplanar8.c shpacked.c shrotate.c \
-	shrot8pack_90.c shrot8pack_180.c shrot8pack_270.c shrot16pack_90.c \
-	shrot16pack_180.c shrot16pack_270.c shrot32pack_90.c \
-	shrot32pack_180.c shrot32pack_270.c
+.include "Makefile.shadow"
 
 .if defined(X11FLAGS.LOADABLE)
-SRCS+=	shmodule.c
+SUBDIR=	module
+.include <bsd.subdir.mk>
 .endif
-
-CPPFLAGS+=	-I${X11SRCDIR.xc}/programs/Xserver/miext/${LIB} \
-		-I${X11SRCDIR.xc}/programs/Xserver/mi \
-		-I${X11SRCDIR.xc}/programs/Xserver/fb \
-		-I${X11SRCDIR.xc}/programs/Xserver/include \
-		-I${DESTDIR}${X11INCDIR}/X11 \
-		-I${X11SRCDIR.xc}/include/fonts \
-		-I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/common \
-		-I${X11SRCDIR.xc}/programs/Xserver/render \
-		-I${DESTDIR}${X11INCDIR}/X11/extensions \
-		-I${XSERVERINCDIR}
-
-CPPFLAGS+=	${X11FLAGS.LOADABLE}
-
-.include <bsd.x11.mk>
-LIBDIR=	${XMODULEDIR}
-.include <bsd.lib.mk>
Index: distrib/sets/lists/xserver/md.amd64
===================================================================
RCS file: /cvsroot/src/distrib/sets/lists/xserver/md.amd64,v
retrieving revision 1.8
diff -u -r1.8 md.amd64
--- distrib/sets/lists/xserver/md.amd64	28 Mar 2004 07:27:21 -0000	1.8
+++ distrib/sets/lists/xserver/md.amd64	4 Oct 2004 18:09:56 -0000
@@ -176,6 +176,7 @@
 ./usr/X11R6/lib/modules/librac.a
 ./usr/X11R6/lib/modules/libramdac.a
 ./usr/X11R6/lib/modules/libscanpci.a
+./usr/X11R6/lib/modules/libshadow.a
 ./usr/X11R6/lib/modules/libshadowfb.a
 ./usr/X11R6/lib/modules/libvbe.a
 ./usr/X11R6/lib/modules/libvgahw.a

--- /dev/null	2004-10-04 19:46:33.000000000 +0200
+++ x11/Xserver/miext/shadow/Makefile.shadow	2004-10-04 18:37:20.000000000 +0200
@@ -0,0 +1,24 @@
+#	$NetBSD$
+
+LIB=	shadow
+.PATH:	${X11SRCDIR.xc}/programs/Xserver/miext/${LIB}
+
+SRCS+=	shadow.c shalloc.c shplanar.c shplanar8.c shpacked.c shrotate.c \
+	shrot8pack_90.c shrot8pack_180.c shrot8pack_270.c shrot16pack_90.c \
+	shrot16pack_180.c shrot16pack_270.c shrot32pack_90.c \
+	shrot32pack_180.c shrot32pack_270.c
+
+CPPFLAGS+=	-I${X11SRCDIR.xc}/programs/Xserver/miext/${LIB} \
+		-I${X11SRCDIR.xc}/programs/Xserver/mi \
+		-I${X11SRCDIR.xc}/programs/Xserver/fb \
+		-I${X11SRCDIR.xc}/programs/Xserver/include \
+		-I${DESTDIR}${X11INCDIR}/X11 \
+		-I${X11SRCDIR.xc}/include/fonts \
+		-I${X11SRCDIR.xc}/programs/Xserver/hw/xfree86/common \
+		-I${X11SRCDIR.xc}/programs/Xserver/render \
+		-I${DESTDIR}${X11INCDIR}/X11/extensions \
+		-I${XSERVERINCDIR}
+
+.include <bsd.x11.mk>
+LIBDIR=	${XMODULEDIR}
+.include <bsd.lib.mk>
--- /dev/null	2004-10-04 19:46:33.000000000 +0200
+++ x11/Xserver/miext/shadow/module/Makefile	2004-10-04 18:41:57.000000000 +0200
@@ -0,0 +1,8 @@
+#	$NetBSD$
+
+XMODULEDIR=	${X11ROOTDIR}/lib/modules
+
+SRCS=	shmodule.c
+
+.include "../../../Makefile.serverlib"
+.include "../Makefile.shadow"
>Release-Note:
>Audit-Trail:
>Unformatted: