This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Still seeking a Cygwin/X maintainer


Yaakov (Cygwin Ports) wrote:
In case someone else with the Ports' X11R7 is actually interested in
helping to figure this out:


1) rm -f /usr/lib/libXfont.*; 2) build and install a static libXfont (.cygport attached); 3) build xorg-server-1.3.0.0 (.cygport and patch attached). The build will stop during Xprint, but XWin will have already been built. Try launching the resulting XWin, run xdpyinfo, and no extensions are available.


I really need another set of eyes to figure out what I'm missing. If anyone can figure out what's wrong with XWin, I'll be happy to look into it further.

I'd also quite like to see this working, so I took a look at this


Attached is an updated patch & cygport

* Your problem with no extensions built into the server was because
mi/miinintext.c is pulled into hw/xwin to be built, so only has HAVE_XWIN_CONFIG_H
defined, hence it was not aware that any extensions are enabled.  Fix this
and the other 2 files which are built in a similar way.  Now they are actually
pulled in we also need to fix the link line so the libs for the extensions are
linked with

* Update for the change to damage-based shadow, registering the screen bitmap as the
shadow framebuffer, so that changes actually get drawn on the display.

* Update automake files to compile and link the windows resource file

* Define XFree86Server during the build
(This is necessary to get the right visuals, otherwise they crash GLX)

* Fix the lies in the ./configure --help text about branding configuration
options, and use the proper option names in the .cygport file

* Align the extensions enabled with those in the 6.8.99 cygwin package
(minus LBX as it's been removed, plus XINERAMA,XACE as they won't turn off!)

This builds an X server which "works for me(TM)"


I had a couple of problems, but when I updated cygwin DLL from 1.5.25, to the most recent snapshot (2008-09-15) to get debug symbols, they seem to stop happening :S I'm not sure what to make of that...

* "_XSERVTransSocketUNIXAccept: accept() failed", occasionally seen when
a new client tries to connect
* -multiwindow mode seems to deadlock randomly

Other problems

* GLX seems a bit flaky, e.g. crashes if you run glxgears, then occlude and
reveal that with a native windows window, but that doesn't seem to be a
regression against 6.8.99

* You might need to patch render.h to include <X11/X.h> to build

inherit xorg

MESA_VERSION=6.5.2
SRC_URI+=" mirror://sourceforge/mesa3d/MesaLib-${MESA_VERSION}.tar.bz2"

DIFF_EXCLUDES="include"

FONTPATH="/usr/share/fonts"

#CFLAGS="-O0 -g3"
#--enable-debug \
#--disable-xinerama \ # doesn't seem to work for some reason....

src_compile() {
	cd ${S}
	cygautoreconf

	cd ${B}
	cygconf \
		--disable-static \
		--disable-builddocs \
		--disable-composite \
		--disable-dmx \
		--disable-fontcache \
		--disable-install-libxf86config \
		--disable-install-setuid \
		--disable-xf86dga \
		--disable-xf86misc \
		--disable-xf86vidmode \
		--disable-dpms \
		--disable-screensaver \
		--disable-xv \
		--disable-xorgcfg \
		--disable-xprint \
		--enable-appgroup \
		--with-fontdir=${FONTPATH} \
		--with-log-dir=/tmp \
		--with-mesa-source=${S}/../Mesa-${MESA_VERSION} \
		--with-os-name='Cygwin' \
		--with-os-vendor='Cygwin' \
		--with-builder-addr='cygwin-xfree@cygwin.com' \
		--with-vendor-name='Cygwin/X' \
		--with-vendor-name-short='Cygwin/X' \
		--with-vendor-web='http://x.cygwin.com/'

	cygmake
}

src_install() {
	cd ${B}
	cyginstall sdkdir=/usr/include/xorg

	# The SDK is only used for building Xorg drivers (which aren't
	# applicable to XWin), so we remove it to avoid confusion
	rm -fr ${D}/usr/include ${D}/usr/lib/pkgconfig ${D}/usr/share/aclocal

	dosym XWin.exe /usr/bin/X

	newdoc ${S}/hw/xwin/_usr_X11R6_lib_X11_system.XWinrc sample.XWinrc
}
--- origsrc/xorg-server-1.3.0.0/GL/glx/indirect_dispatch_swap.c	2007-03-05 18:38:58.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/indirect_dispatch_swap.c	2008-09-19 16:59:09.765625000 +0100
@@ -28,7 +28,7 @@
 #include <X11/Xmd.h>
 #include <GL/gl.h>
 #include <GL/glxproto.h>
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #include <byteswap.h>
 #elif defined(__OpenBSD__)
 #include <sys/endian.h>
--- origsrc/xorg-server-1.3.0.0/GL/glx/indirect_program.c	2007-03-05 18:38:58.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/indirect_program.c	2008-09-19 16:59:09.765625000 +0100
@@ -46,7 +46,7 @@
 #include "dispatch.h"
 #include "glapioffsets.h"
 
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #include <byteswap.h>
 #elif defined(__OpenBSD__)
 #include <sys/endian.h>
--- origsrc/xorg-server-1.3.0.0/GL/glx/indirect_reqsize.c	2007-01-30 06:03:18.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/indirect_reqsize.c	2008-09-19 16:59:09.765625000 +0100
@@ -31,7 +31,7 @@
 #include "indirect_size.h"
 #include "indirect_reqsize.h"
 
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #  include <byteswap.h>
 #  define SWAP_32(v)  do { (v) = bswap_32(v); } while(0)
 #else
--- origsrc/xorg-server-1.3.0.0/GL/glx/indirect_texture_compression.c	2007-03-05 18:38:58.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/indirect_texture_compression.c	2008-09-19 16:59:09.765625000 +0100
@@ -39,7 +39,7 @@
 #include "glthread.h"
 #include "dispatch.h"
 
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #include <byteswap.h>
 #elif defined(__OpenBSD__)
 #include <sys/endian.h>
--- origsrc/xorg-server-1.3.0.0/GL/glx/indirect_util.c	2007-01-30 06:03:18.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/indirect_util.c	2008-09-19 16:59:09.765625000 +0100
@@ -28,7 +28,7 @@
 #include <X11/Xmd.h>
 #include <GL/gl.h>
 #include <GL/glxproto.h>
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #include <byteswap.h>
 #elif defined(__OpenBSD__)
 #include <sys/endian.h>
--- origsrc/xorg-server-1.3.0.0/GL/glx/swap_interval.c	2007-03-05 18:38:58.000000000 +0000
+++ src/xorg-server-1.3.0.0/GL/glx/swap_interval.c	2008-09-19 16:59:09.765625000 +0100
@@ -40,7 +40,7 @@
 #include "dispatch.h"
 #include "glapioffsets.h"
 
-#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
+#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) || defined(__CYGWIN__)
 #include <byteswap.h>
 #elif defined(__OpenBSD__)
 #include <sys/endian.h>
--- origsrc/xorg-server-1.3.0.0/Xi/stubs.c	2006-11-16 18:01:22.000000000 +0000
+++ src/xorg-server-1.3.0.0/Xi/stubs.c	2008-09-23 21:36:09.093750000 +0100
@@ -59,6 +59,10 @@
 #include <dix-config.h>
 #endif
 
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "inputstr.h"
--- origsrc/xorg-server-1.3.0.0/configure.ac	2007-04-20 02:23:40.000000000 +0100
+++ src/xorg-server-1.3.0.0/configure.ac	2008-09-24 18:16:57.187500000 +0100
@@ -319,11 +319,11 @@
 AC_ARG_WITH(int10,           AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]),
 				[INT10="$withval"],
 				[INT10="$DEFAULT_INT10"])
-AC_ARG_WITH(vendor-name,     AS_HELP_STRING([--with-vendor-string=VENDOR],
+AC_ARG_WITH(vendor-name,     AS_HELP_STRING([--with-vendor-name=VENDOR],
 				  [Vendor string reported by the server]),
 			     	[ VENDOR_STRING="$withval" ],
 			     	[ VENDOR_STRING="$DEFAULT_VENDOR_NAME" ])
-AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-string-short=VENDOR],
+AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR],
 				  [Short version of vendor string reported by the server]),
 			     	[ VENDOR_STRING_SHORT="$withval" ],
 			     	[ VENDOR_STRING_SHORT="$DEFAULT_VENDOR_NAME_SHORT" ])
@@ -1426,13 +1426,14 @@
 		mingw*) XWIN="yes" ;;
 		*) XWIN="no" ;;
 	esac
-	XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
+	XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XI_LIB $RANDR_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XPSTUBS_LIB $OS_LIB $LBX_LIB"
 	AC_SUBST([XWIN_LIBS])
 fi
 AC_MSG_RESULT([$XWIN])
 
 if test "x$XWIN" = xyes; then
 	XWIN_SERVER_NAME=XWin
+	AC_CHECK_TOOL(WINDRES, windres)
 	case $host_os in
 		cygwin*)
 			PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont])
--- origsrc/xorg-server-1.3.0.0/fb/fbcmap.c	2006-09-18 07:04:17.000000000 +0100
+++ src/xorg-server-1.3.0.0/fb/fbcmap.c	2008-09-23 21:36:41.906250000 +0100
@@ -32,6 +32,10 @@
 #include <dix-config.h>
 #endif
 
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#endif
+
 #include <X11/X.h>
 #include <X11/Xproto.h>
 #include "scrnintstr.h"
--- origsrc/xorg-server-1.3.0.0/hw/xfree86/common/xf86Build.h	2007-04-20 02:26:12.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xfree86/common/xf86Build.h	2008-09-24 15:05:36.718750000 +0100
@@ -1 +1 @@
-#define BUILD_DATE 20070419
+#define BUILD_DATE 20080924
--- origsrc/xorg-server-1.3.0.0/hw/xwin/InitInput.c	2006-11-16 18:01:26.000000000 +0000
+++ src/xorg-server-1.3.0.0/hw/xwin/InitInput.c	2008-09-19 16:59:09.765625000 +0100
@@ -31,9 +31,6 @@
 #include <xwin-config.h>
 #endif
 #include "win.h"
-#ifdef XWIN_CLIPBOARD
-# include "../../Xext/xf86miscproc.h"
-#endif
 #include "dixstruct.h"
 
 
--- origsrc/xorg-server-1.3.0.0/hw/xwin/Makefile.am	2006-11-16 18:01:26.000000000 +0000
+++ src/xorg-server-1.3.0.0/hw/xwin/Makefile.am	2008-09-24 18:17:55.968750000 +0100
@@ -121,6 +121,8 @@
 	winpriv.h \
 	winresource.h \
 	winwindow.h \
+	XWin.rc \
+	$(top_srcdir)/Xi/stubs.c \
 	$(top_srcdir)/mi/miinitext.c \
 	$(top_srcdir)/fb/fbcmap.c \
 	$(SRCS_CLIPBOARD) \
@@ -149,9 +151,13 @@
 XWin_LDADD = $(XORG_CORE_LIBS) \
 	     $(top_builddir)/fb/libfb.la \
              $(XWIN_LIBS) \
-             $(XWINMODULES_LIBS)
+             $(XWINMODULES_LIBS) \
+             XWin.o
+
+.rc.o:
+	$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -DPROJECT_NAME=\"$(VENDOR_STRING_SHORT)\"
 
-XWin_LDFLAGS = -mwindows -static
+XWin_LDFLAGS = -lgdi32
 
 winprefsyacc.h: winprefsyacc.c
 winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h
@@ -162,6 +168,7 @@
 AM_YFLAGS = -d
 AM_LFLAGS = -i
 AM_CFLAGS = -DHAVE_XWIN_CONFIG_H \
+            -DXFree86Server \
             $(XWINMODULES_CFLAGS)
 
 dist_man1_MANS = XWin.man XWinrc.man
Files origsrc/xorg-server-1.3.0.0/hw/xwin/XWin.res and src/xorg-server-1.3.0.0/hw/xwin/XWin.res differ
--- origsrc/xorg-server-1.3.0.0/hw/xwin/win.h	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/win.h	2008-09-23 17:04:03.968750000 +0100
@@ -314,6 +314,7 @@
 
 typedef Bool (*winFinishCreateWindowsWindowProcPtr)(WindowPtr pWin);
 
+typedef Bool (*winCreateScreenResourcesProc)(ScreenPtr);
 
 /* Typedef for DIX wrapper functions */
 typedef int (*winDispatchProcPtr) (ClientPtr);
@@ -564,6 +565,8 @@
   winCreatePrimarySurfaceProcPtr	pwinCreatePrimarySurface;
   winReleasePrimarySurfaceProcPtr	pwinReleasePrimarySurface;
 
+  winCreateScreenResourcesProc       pwinCreateScreenResources;
+
 #ifdef XWIN_MULTIWINDOW
   /* Window Procedures for MultiWindow mode */
   winFinishCreateWindowsWindowProcPtr	pwinFinishCreateWindowsWindow;
--- origsrc/xorg-server-1.3.0.0/hw/xwin/winmultiwindowwm.c	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/winmultiwindowwm.c	2008-09-24 18:19:22.140625000 +0100
@@ -52,14 +52,7 @@
 #include <X11/cursorfont.h>
 
 /* Windows headers */
-#ifdef __CYGWIN__
-/* Fixups to prevent collisions between Windows and X headers */
-#define ATOM DWORD
-
-#include <windows.h>
-#else
-#include <Xwindows.h>
-#endif
+#include <X11/Xwindows.h>
 
 /* Local headers */
 #include "objbase.h"
--- origsrc/xorg-server-1.3.0.0/hw/xwin/winscrinit.c	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/winscrinit.c	2008-09-23 22:15:05.921875000 +0100
@@ -248,6 +248,25 @@
   return TRUE;
 }
 
+Bool
+winCreateScreenResources(ScreenPtr pScreen)
+{
+  winScreenPriv(pScreen);
+  Bool result;
+
+  result = pScreenPriv->pwinCreateScreenResources(pScreen);
+
+  /* Now the screen bitmap has been wrapped in a pixmap,
+     add that to the Shadow framebuffer */
+  if (!shadowAdd(pScreen, pScreen->devPrivate,
+		 pScreenPriv->pwinShadowUpdate, NULL, 0, 0))
+    {
+      ErrorF ("winCreateScreenResources - shadowAdd () failed\n");
+      return FALSE;
+    }
+
+  return result;
+}
 
 /* See Porting Layer Definition - p. 20 */
 Bool
@@ -438,15 +457,14 @@
       )
     {
 #if CYGDEBUG
-      winDebug ("winFinishScreenInitFB - Calling shadowInit ()\n");
+      winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n");
 #endif
-      if (!shadowInit (pScreen,
-		       pScreenPriv->pwinShadowUpdate,
-		       NULL))
-	{
-	  ErrorF ("winFinishScreenInitFB - shadowInit () failed\n");
-	  return FALSE;
-	}
+      shadowSetup(pScreen);
+
+      /* Wrap CreateScreenResources so we can add the screen pixmap
+         to the Shadow framebuffer after it's been created */
+      pScreenPriv->pwinCreateScreenResources = pScreen->CreateScreenResources;
+      pScreen->CreateScreenResources = winCreateScreenResources;
     }
 
 #ifdef XWIN_MULTIWINDOWEXTWM
--- origsrc/xorg-server-1.3.0.0/hw/xwin/winshaddd.c	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/winshaddd.c	2008-09-23 18:37:49.968750000 +0100
@@ -508,7 +508,7 @@
 {
   winScreenPriv(pScreen);
   winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
-  RegionPtr		damage = &pBuf->damage;
+  RegionPtr		damage = shadowDamage(pBuf);
   HRESULT		ddrval = DD_OK;
   RECT			rcDest, rcSrc;
   POINT			ptOrigin;
--- origsrc/xorg-server-1.3.0.0/hw/xwin/winshadddnl.c	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/winshadddnl.c	2008-09-23 21:47:14.796875000 +0100
@@ -584,7 +584,7 @@
 {
   winScreenPriv(pScreen);
   winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
-  RegionPtr		damage = &pBuf->damage;
+  RegionPtr		damage = shadowDamage(pBuf);
   HRESULT		ddrval = DD_OK;
   RECT			rcDest, rcSrc;
   POINT			ptOrigin;
--- origsrc/xorg-server-1.3.0.0/hw/xwin/winshadgdi.c	2006-09-18 07:04:18.000000000 +0100
+++ src/xorg-server-1.3.0.0/hw/xwin/winshadgdi.c	2008-09-23 18:38:02.296875000 +0100
@@ -498,7 +498,7 @@
 {
   winScreenPriv(pScreen);
   winScreenInfo		*pScreenInfo = pScreenPriv->pScreenInfo;
-  RegionPtr		damage = &pBuf->damage;
+  RegionPtr		damage = shadowDamage(pBuf);
   DWORD			dwBox = REGION_NUM_RECTS (damage);
   BoxPtr		pBox = REGION_RECTS (damage);
   int			x, y, w, h;
--- origsrc/xorg-server-1.3.0.0/mi/miinitext.c	2006-11-16 18:01:26.000000000 +0000
+++ src/xorg-server-1.3.0.0/mi/miinitext.c	2008-09-23 21:47:46.625000000 +0100
@@ -79,6 +79,11 @@
 #undef XF86VIDMODE
 #endif
 
+#ifdef HAVE_XWIN_CONFIG_H
+#include <xwin-config.h>
+#undef XFreeXDGA
+#endif
+
 #include "misc.h"
 #include "extension.h"
 #include "micmap.h"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]