public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Problem trying to build Cygwin X server from source
@ 2013-10-19 19:54 Mark Lillibridge
  2013-10-20 20:28 ` Jon TURNEY
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Lillibridge @ 2013-10-19 19:54 UTC (permalink / raw)
  To: cygwin-xfree


    This is xserver-cygwin-1.14.3-1, the latest as of several weeks ago.

    The part that is failing (make done in
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx):

echo :/usr/share/opengl/api
:/usr/share/opengl/api
  GEN      generated_gl_wrappers.c
Using registry  /usr/share/opengl/api/gl.xml
Generating  generated_gl_wrappers.c
/usr/share/opengl/api/reg.py:31: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if (str):
  GEN      generated_wgl_wrappers.c
Using registry  /usr/share/opengl/api/wgl.xml
Generating  generated_wgl_wrappers.c
/usr/share/opengl/api/reg.py:31: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
  if (str):
make  all-am
make[1]: Entering directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx'
  CC       winpriv.lo
winpriv.c: In function 'winCreateWindowsWindowHierarchy':
winpriv.c:23:14: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'WindowPtr' [-Wformat]
winpriv.c:23:14: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'XID' [-Wformat]
winpriv.c: In function 'winGetWindowInfo':
winpriv.c:54:5: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'XID' [-Wformat]
  CC       glwrap.lo
In file included from glwrap.c:120:0:
generated_gl_wrappers.c: In function 'glMultiDrawElementsBaseVertexWrapper':
generated_gl_wrappers.c:3363:3: warning: passing argument 4 of 'proc' discards 'const' qualifier from pointer target type [enabled by default]
generated_gl_wrappers.c:3363:3: note: expected 'const GLvoid **' but argument is of type 'const GLvoid * const*'
generated_gl_wrappers.c: In function 'glMultiDrawElementsEXTWrapper':
generated_gl_wrappers.c:7699:3: warning: passing argument 4 of 'proc' discards 'const' qualifier from pointer target type [enabled by default]
generated_gl_wrappers.c:7699:3: note: expected 'const GLvoid **' but argument is of type 'const GLvoid * const*'
generated_gl_wrappers.c: In function 'glTransformFeedbackVaryingsEXTWrapper':
generated_gl_wrappers.c:8077:3: warning: passing argument 3 of 'proc' discards 'const' qualifier from pointer target type [enabled by default]
generated_gl_wrappers.c:8077:3: note: expected 'const GLchar **' but argument is of type 'const GLchar * const*'
generated_gl_wrappers.c: In function 'glWinSetupDispatchTable':
generated_gl_wrappers.c:10250:2: warning: #warning No wrapper for glEGLImageTargetRenderbufferStorageOES ! [-Wcpp]
generated_gl_wrappers.c:10251:2: warning: #warning No wrapper for glEGLImageTargetTexture2DOES ! [-Wcpp]
  CC       indirect.lo
  CC       wgl_ext_api.lo
In file included from wgl_ext_api.c:72:0:
generated_wgl_wrappers.c:79:1: error: unknown type name 'PFNWGLDXSETRESOURCESHAREHANDLENVPROC'
generated_wgl_wrappers.c:79:1: warning: initialization makes integer from pointer without a cast [enabled by default]
generated_wgl_wrappers.c:80:1: error: unknown type name 'PFNWGLDXOPENDEVICENVPROC'
generated_wgl_wrappers.c:80:1: warning: initialization makes integer from pointer without a cast [enabled by default]
generated_wgl_wrappers.c:81:1: error: unknown type name 'PFNWGLDXCLOSEDEVICENVPROC'
generated_wgl_wrappers.c:81:1: warning: initialization makes integer from pointer without a cast [enabled by default]
...

    Any suggestions?  The online documentation is seriously out of date,
predating the use of cygport.

- Thanks,
  Mark

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-19 19:54 Problem trying to build Cygwin X server from source Mark Lillibridge
@ 2013-10-20 20:28 ` Jon TURNEY
  2013-10-20 22:58   ` Mark Lillibridge
  0 siblings, 1 reply; 7+ messages in thread
From: Jon TURNEY @ 2013-10-20 20:28 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: mdl

On 19/10/2013 20:54, Mark Lillibridge wrote:
> 
>     This is xserver-cygwin-1.14.3-1, the latest as of several weeks ago.
> 
>     The part that is failing (make done in
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx):
> 
>   CC       wgl_ext_api.lo
> In file included from wgl_ext_api.c:72:0:
> generated_wgl_wrappers.c:79:1: error: unknown type name 'PFNWGLDXSETRESOURCESHAREHANDLENVPROC'
> generated_wgl_wrappers.c:79:1: warning: initialization makes integer from pointer without a cast [enabled by default]
> generated_wgl_wrappers.c:80:1: error: unknown type name 'PFNWGLDXOPENDEVICENVPROC'
> generated_wgl_wrappers.c:80:1: warning: initialization makes integer from pointer without a cast [enabled by default]
> generated_wgl_wrappers.c:81:1: error: unknown type name 'PFNWGLDXCLOSEDEVICENVPROC'
> generated_wgl_wrappers.c:81:1: warning: initialization makes integer from pointer without a cast [enabled by default]
> ...

I think this is error is due to the khronos-opengl-registry package being more
recent than the wglext.h provided by w32api-headers.

I think the easiest way to work around this is to update wglext.h from
http://www.opengl.org/registry/api/GL/wglext.h

>     Any suggestions?  The online documentation is seriously out of date,
> predating the use of cygport.

Which documentation, specifically?

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-20 20:28 ` Jon TURNEY
@ 2013-10-20 22:58   ` Mark Lillibridge
  2013-10-21 13:02     ` Jon TURNEY
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Lillibridge @ 2013-10-20 22:58 UTC (permalink / raw)
  To: cygwin-xfree


Jon TURNEY <jon.turney@dronecode.org.uk> writes:

>  On 19/10/2013 20:54, Mark Lillibridge wrote:
>  > 
>  >     This is xserver-cygwin-1.14.3-1, the latest as of several weeks ago.
>  > 
>  >     The part that is failing (make done in
>  > /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx):
>  > 
>  >   CC       wgl_ext_api.lo
>  > In file included from wgl_ext_api.c:72:0:
>  > generated_wgl_wrappers.c:79:1: error: unknown type name 'PFNWGLDXSETRESOURCESHAREHANDLENVPROC'
>  > generated_wgl_wrappers.c:79:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>  > generated_wgl_wrappers.c:80:1: error: unknown type name 'PFNWGLDXOPENDEVICENVPROC'
>  > generated_wgl_wrappers.c:80:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>  > generated_wgl_wrappers.c:81:1: error: unknown type name 'PFNWGLDXCLOSEDEVICENVPROC'
>  > generated_wgl_wrappers.c:81:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>  > ...
>  
>  I think this is error is due to the khronos-opengl-registry package being more
>  recent than the wglext.h provided by w32api-headers.
>  
>  I think the easiest way to work around this is to update wglext.h from
>  http://www.opengl.org/registry/api/GL/wglext.h

Hmmm.  Which occurrence should I replace?

    mdl [103]# find /usr -name wglext.h -print
    /usr/i686-w64-mingw32/sys-root/mingw/include/GL/wglext.h
    /usr/include/GL/wglext.h
    /usr/include/w32api/GL/wglext.h
    /usr/x86_64-w64-mingw32/sys-root/mingw/include/GL/wglext.h
    
    mdl [112]# grep wglext *
    wgl_ext_api.c:#include <GL/wglext.h>
    wgl_ext_api.h:#include <GL/wglext.h>
    
    mdl [118]# grep usr/include *
    Makefile:DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  
    Makefile:DIX_CFLAGS = -DHAVE_DIX_CONFIG_H $(CWARNFLAGS) -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/pixman-1 -I/usr/include/freetype2   -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/Xext -I$(top_srcdir)/composite -I$(top_srcdir)/damageext -I$(top_srcdir)/xfixes -I$(top_srcdir)/Xi -I$(top_srcdir)/mi -I$(top_srcdir)/miext/sync -I$(top_srcdir)/miext/shadow  -I$(top_srcdir)/miext/damage -I$(top_srcdir)/render -I$(top_srcdir)/randr -I$(top_srcdir)/fb -I$(top_srcdir)/dbe
    Makefile:PIXMAN_CFLAGS = -I/usr/include/pixman-1  
    Makefile:XSERVERCFLAGS_CFLAGS = -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/pixman-1 -I/usr/include/freetype2  
    Makefile:XSERVERLIBS_CFLAGS = -I/usr/include/pixman-1 -I/usr/include/freetype2  
    Makefile:oldincludedir = /usr/include
    
    mdl [119]# grep mingw/include *

I'm guessing from the above that it's this one:

    /usr/include/GL/wglext.h

    I replaced that one and the code in
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx
now compiles.  Unfortunately, code now fails elsewhere:

cd /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin
make

gives:
...
make[2]: Leaving directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/winclipboard'
Making all in .
make[2]: Entering directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin'
  CC       InitInput.o
  CC       InitOutput.o
InitOutput.c: In function ‘ddxGiveUp’:
InitOutput.c:240:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
InitOutput.c: In function ‘winCheckMntOpt’:
InitOutput.c:284:16: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
  CC       winallpriv.o
  CC       winauth.o
In file included from /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/winsock2.h:56:0,
                 from /usr/include/X11/Xwinsock.h:55,
                 from /usr/include/X11/Xpoll.h:163,
                 from ../../os/osdep.h:85,
                 from winauth.c:39:
/usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets" [-Wcpp]
In file included from /usr/include/X11/Xwinsock.h:55:0,
                 from /usr/include/X11/Xpoll.h:163,
                 from ../../os/osdep.h:85,
                 from winauth.c:39:
/usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/winsock2.h:995:34: error: conflicting types for ‘select’
In file included from /usr/include/cygwin/sys_time.h:13:0,
                 from /usr/include/sys/time.h:61,
                 from /usr/include/sys/_default_fcntl.h:186,
                 from /usr/include/sys/fcntl.h:3,
                 from /usr/include/fcntl.h:14,
                 from /usr/include/X11/Xos.h:88,
                 from win.h:152,
                 from winauth.c:35:
/usr/include/sys/select.h:31:5: note: previous declaration of ‘select’ was here
In file included from /usr/include/X11/Xwinsock.h:55:0,
                 from /usr/include/X11/Xpoll.h:163,
                 from ../../os/osdep.h:85,
                 from winauth.c:39:
/usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/winsock2.h:1004:34: error: conflicting types for ‘gethostname’
In file included from /usr/include/unistd.h:4:0,
                 from /usr/include/X11/Xos.h:89,
                 from win.h:152,
                 from winauth.c:35:
/usr/include/sys/unistd.h:238:6: note: previous declaration of ‘gethostname’ was here
winauth.c: In function ‘winGenerateAuthorization’:
winauth.c:132:38: warning: passing argument 2 of ‘GenerateAuthorization’ discards ‘const’ qualifier from pointer target type [enabled by default]
winauth.c:108:1: note: expected ‘char *’ but argument is of type ‘const char *’
winauth.c: In function ‘winSetAuthorization’:
winauth.c:189:23: warning: passing argument 1 of ‘XSetAuthorization’ discards ‘const’ qualifier from pointer target type [enabled by default]
winauth.c:42:13: note: expected ‘char *’ but argument is of type ‘const char *’
Makefile:966: recipe for target `winauth.o' failed
make[2]: *** [winauth.o] Error 1
make[2]: Leaving directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin'
Makefile:1082: recipe for target `all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin'
Makefile:805: recipe for target `all' failed
make: *** [all] Error 2



>  >     Any suggestions?  The online documentation is seriously out of date,
>  > predating the use of cygport.
>  
>  Which documentation, specifically?

    Hmmm.  You didn't just update the documentation on me did you?  The
versions Google is giving me now are up-to-date.

Page 9 of http://x.cygwin.com/docs/cg/cygwin-x-cg.pdf says:

    Tip: Use setup -q -Ppackagename,packagename,etc. to quickly install
    the required packages.

Darn if I could make this work no matter what I tried.  Really, you
should just give the actual code here so people can cut-and-paste.
Ideally, you should also specify how to get the needed packages via the
setup GUI.

- Mark

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-20 22:58   ` Mark Lillibridge
@ 2013-10-21 13:02     ` Jon TURNEY
  2013-10-27  0:27       ` Mark Lillibridge
  0 siblings, 1 reply; 7+ messages in thread
From: Jon TURNEY @ 2013-10-21 13:02 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: mdl

[-- Attachment #1: Type: text/plain, Size: 6515 bytes --]

On 20/10/2013 23:57, Mark Lillibridge wrote:
> Jon TURNEY writes:
>>  On 19/10/2013 20:54, Mark Lillibridge wrote:
>>  > 
>>  >     This is xserver-cygwin-1.14.3-1, the latest as of several weeks ago.
>>  > 
>>  >     The part that is failing (make done in
>>  > /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx):
>>  > 
>>  >   CC       wgl_ext_api.lo
>>  > In file included from wgl_ext_api.c:72:0:
>>  > generated_wgl_wrappers.c:79:1: error: unknown type name 'PFNWGLDXSETRESOURCESHAREHANDLENVPROC'
>>  > generated_wgl_wrappers.c:79:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>>  > generated_wgl_wrappers.c:80:1: error: unknown type name 'PFNWGLDXOPENDEVICENVPROC'
>>  > generated_wgl_wrappers.c:80:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>>  > generated_wgl_wrappers.c:81:1: error: unknown type name 'PFNWGLDXCLOSEDEVICENVPROC'
>>  > generated_wgl_wrappers.c:81:1: warning: initialization makes integer from pointer without a cast [enabled by default]
>>  > ...
>>  
>>  I think this is error is due to the khronos-opengl-registry package being more
>>  recent than the wglext.h provided by w32api-headers.
>>  
>>  I think the easiest way to work around this is to update wglext.h from
>>  http://www.opengl.org/registry/api/GL/wglext.h
> 
> Hmmm.  Which occurrence should I replace?
> 
>     mdl [103]# find /usr -name wglext.h -print
>     /usr/i686-w64-mingw32/sys-root/mingw/include/GL/wglext.h
>     /usr/include/GL/wglext.h
>     /usr/include/w32api/GL/wglext.h
>     /usr/x86_64-w64-mingw32/sys-root/mingw/include/GL/wglext.h
>     
>     mdl [112]# grep wglext *
>     wgl_ext_api.c:#include <GL/wglext.h>
>     wgl_ext_api.h:#include <GL/wglext.h>
>     
>     mdl [118]# grep usr/include *
>     Makefile:DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  
>     Makefile:DIX_CFLAGS = -DHAVE_DIX_CONFIG_H $(CWARNFLAGS) -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/pixman-1 -I/usr/include/freetype2   -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/Xext -I$(top_srcdir)/composite -I$(top_srcdir)/damageext -I$(top_srcdir)/xfixes -I$(top_srcdir)/Xi -I$(top_srcdir)/mi -I$(top_srcdir)/miext/sync -I$(top_srcdir)/miext/shadow  -I$(top_srcdir)/miext/damage -I$(top_srcdir)/render -I$(top_srcdir)/randr -I$(top_srcdir)/fb -I$(top_srcdir)/dbe
>     Makefile:PIXMAN_CFLAGS = -I/usr/include/pixman-1  
>     Makefile:XSERVERCFLAGS_CFLAGS = -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/pixman-1 -I/usr/include/freetype2  
>     Makefile:XSERVERLIBS_CFLAGS = -I/usr/include/pixman-1 -I/usr/include/freetype2  
>     Makefile:oldincludedir = /usr/include
>     
>     mdl [119]# grep mingw/include *
> 
> I'm guessing from the above that it's this one:
> 
>     /usr/include/GL/wglext.h

Yes, I guess that's first in the include search path.

Since w32api now provides a that header, we should probably stop providing it
in libGL-devel.

>     I replaced that one and the code in
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/glx
> now compiles.  Unfortunately, code now fails elsewhere:
> 
> cd /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin
> make
> 
> gives:
> ...
> make[2]: Leaving directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin/winclipboard'
> Making all in .
> make[2]: Entering directory `/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/hw/xwin'
>   CC       InitInput.o
>   CC       InitOutput.o
> InitOutput.c: In function ‘ddxGiveUp’:
> InitOutput.c:240:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
> InitOutput.c: In function ‘winCheckMntOpt’:
> InitOutput.c:284:16: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual]
>   CC       winallpriv.o
>   CC       winauth.o
> In file included from /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/winsock2.h:56:0,
>                  from /usr/include/X11/Xwinsock.h:55,
>                  from /usr/include/X11/Xpoll.h:163,
>                  from ../../os/osdep.h:85,
>                  from winauth.c:39:
> /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/psdk_inc/_fd_types.h:100:2: warning: #warning "fd_set and associated macros have been defined in sys/types.      This can cause runtime problems with W32 sockets" [-Wcpp]
> In file included from /usr/include/X11/Xwinsock.h:55:0,
>                  from /usr/include/X11/Xpoll.h:163,
>                  from ../../os/osdep.h:85,
>                  from winauth.c:39:
> /usr/lib/gcc/i686-pc-cygwin/4.7.3/../../../../include/w32api/winsock2.h:995:34: error: conflicting types for ‘select’
> In file included from /usr/include/cygwin/sys_time.h:13:0,
>                  from /usr/include/sys/time.h:61,
>                  from /usr/include/sys/_default_fcntl.h:186,
>                  from /usr/include/sys/fcntl.h:3,
>                  from /usr/include/fcntl.h:14,
>                  from /usr/include/X11/Xos.h:88,
>                  from win.h:152,
>                  from winauth.c:35:

You will need to apply the attached change to /usr/include/Xpoll.h to fix
xserver compilation with w32api-headers >= 3.0.0-1, which adds a new WIN32
define somewhere, which breaks this test.

>>  >     Any suggestions?  The online documentation is seriously out of date,
>>  > predating the use of cygport.
>>  
>>  Which documentation, specifically?
> 
>     Hmmm.  You didn't just update the documentation on me did you?  The
> versions Google is giving me now are up-to-date.
> 
> Page 9 of http://x.cygwin.com/docs/cg/cygwin-x-cg.pdf says:
> 
>     Tip: Use setup -q -Ppackagename,packagename,etc. to quickly install
>     the required packages.
> 
> Darn if I could make this work no matter what I tried.  Really, you
> should just give the actual code here so people can cut-and-paste.
> Ideally, you should also specify how to get the needed packages via the
> setup GUI.

It's not really the function of that document to tell people how to install
packages on cygwin.

I don't really want to put the package list there twice and have to keep both
copies updated.

If you're doing the package installation manually, you just find them (perhaps
using the search function), and select them for installation.

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

[-- Attachment #2: 0001-Fix-WIN32-check.patch --]
[-- Type: text/plain, Size: 863 bytes --]

From 5c0c8f0a903a69313bb44b561be592e6db2c6c38 Mon Sep 17 00:00:00 2001
From: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Fri, 27 Sep 2013 14:41:57 +0100
Subject: [PATCH proto/x11proto] Fix WIN32 check

Even if WIN32 is defined (because we have included windows.h somewhere), we want
to use the UNIX-like select() interface on Cygwin

This seems to be needed to compile xorg-server with MinGW-w64 w32api-headers
3.0.0, which add a new WIN32 define somewhere.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 Xpoll.h.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Xpoll.h.in b/Xpoll.h.in
index 8275658..0a05424 100644
--- a/Xpoll.h.in
+++ b/Xpoll.h.in
@@ -50,7 +50,7 @@ from The Open Group.
 #ifndef _XPOLL_H_
 #define _XPOLL_H_
 
-#ifndef WIN32
+#if !defined(WIN32) || defined(__CYGWIN__)
 
 #ifndef USE_POLL
 
-- 
1.8.3.4


[-- Attachment #3: Type: text/plain, Size: 223 bytes --]

--
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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-21 13:02     ` Jon TURNEY
@ 2013-10-27  0:27       ` Mark Lillibridge
  2013-10-28 14:48         ` Jon TURNEY
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Lillibridge @ 2013-10-27  0:27 UTC (permalink / raw)
  To: cygwin-xfree


Jon TURNEY <jon.turney@dronecode.org.uk> writes:

> You will need to apply the attached change to /usr/include/Xpoll.h to fix
> xserver compilation with w32api-headers >= 3.0.0-1, which adds a new WIN32
> define somewhere, which breaks this test.

    It's /usr/include/X11/Xpoll.h on my system.  That patch indeed makes
the compilation proceed further.  It's now stuck at:

  CCLD     XWin.exe
../../glx/.libs/libglx.a(glxcmds.o): In function `FlushContext':
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:221: undefined reference to `__emutls_v._glapi_tls_Dispatch'
../../glx/.libs/libglx.a(glxcmds.o): In function `DoMakeCurrent':
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:623: undefined reference to `__emutls_v._glapi_tls_Dispatch'
../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_WaitGL':
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:806: undefined reference to `__emutls_v._glapi_tls_Dispatch'
../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_CopyContext':
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:904: undefined reference to `__emutls_v._glapi_tls_Dispatch'
../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_SwapBuffers':
/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:1647: undefined reference to `__emutls_v._glapi_tls_Dispatch'
../../glx/.libs/libglx.a(glxcmds.o):/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:1851: more undefined references to `__emutls_v._glapi_tls_Dispatch' follow
collect2: error: ld returned 1 exit status
Makefile:890: recipe for target `XWin.exe' failed



> >     Tip: Use setup -q -Ppackagename,packagename,etc. to quickly install
> >     the required packages.
> > 
> > Darn if I could make this work no matter what I tried.  Really, you
> > should just give the actual code here so people can cut-and-paste.
> > Ideally, you should also specify how to get the needed packages via the
> > setup GUI.
> 
> It's not really the function of that document to tell people how to install
> packages on cygwin.
> 
> I don't really want to put the package list there twice and have to keep both
> copies updated.
> 
> If you're doing the package installation manually, you just find them (perhaps
> using the search function), and select them for installation.

    I found that tip useless as in I couldn't make any form of "setup -q
-Pfoo" install a package.  As for the GUI, I believe I just set:

      * X11, editors, shells, net: install
      * X11->xorg-server: source
      * devel: install  [need for cygport]
      * Python: install [for lxml for X server compiling]

This is *way* easier than trying to find the dozens of packages by name
and trying to figure out what to check to get them.

- Mark

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-27  0:27       ` Mark Lillibridge
@ 2013-10-28 14:48         ` Jon TURNEY
  2013-11-02 17:48           ` Mark Lillibridge
  0 siblings, 1 reply; 7+ messages in thread
From: Jon TURNEY @ 2013-10-28 14:48 UTC (permalink / raw)
  To: cygwin-xfree; +Cc: mdl

On 27/10/2013 01:26, Mark Lillibridge wrote:
> Jon TURNEY writes:
> 
>> You will need to apply the attached change to /usr/include/Xpoll.h to fix
>> xserver compilation with w32api-headers >= 3.0.0-1, which adds a new WIN32
>> define somewhere, which breaks this test.
> 
>     It's /usr/include/X11/Xpoll.h on my system.  That patch indeed makes
> the compilation proceed further.  It's now stuck at:

Sorry, my mistake.

>   CCLD     XWin.exe
> ../../glx/.libs/libglx.a(glxcmds.o): In function `FlushContext':
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:221: undefined reference to `__emutls_v._glapi_tls_Dispatch'
> ../../glx/.libs/libglx.a(glxcmds.o): In function `DoMakeCurrent':
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:623: undefined reference to `__emutls_v._glapi_tls_Dispatch'
> ../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_WaitGL':
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:806: undefined reference to `__emutls_v._glapi_tls_Dispatch'
> ../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_CopyContext':
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:904: undefined reference to `__emutls_v._glapi_tls_Dispatch'
> ../../glx/.libs/libglx.a(glxcmds.o): In function `_glXDisp_SwapBuffers':
> /usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:1647: undefined reference to `__emutls_v._glapi_tls_Dispatch'
> ../../glx/.libs/libglx.a(glxcmds.o):/usr/src/xorg-server-1.14.3-1/src/xserver-cygwin-1.14.3-1/glx/glxcmds.c:1851: more undefined references to `__emutls_v._glapi_tls_Dispatch' follow
> collect2: error: ld returned 1 exit status
> Makefile:890: recipe for target `XWin.exe' failed

This looks like [1], a mis-match in TLS-ness between XWin and libglapi.

If you are building using the .cygport file it should have ./configure'ed with
--disable-glx-tls?

[1] http://www.cygwin.com/ml/cygwin-xfree/2011-10/msg00065.html

-- 
Jon TURNEY
Volunteer Cygwin/X X Server maintainer

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Problem trying to build Cygwin X server from source
  2013-10-28 14:48         ` Jon TURNEY
@ 2013-11-02 17:48           ` Mark Lillibridge
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Lillibridge @ 2013-11-02 17:48 UTC (permalink / raw)
  To: cygwin-xfree


Jon TURNEY <jon.turney@dronecode.org.uk> writes:

>  This looks like [1], a mis-match in TLS-ness between XWin and libglapi.
>  
>  If you are building using the .cygport file it should have ./configure'ed with
>  --disable-glx-tls?
>  
>  [1] http://www.cygwin.com/ml/cygwin-xfree/2011-10/msg00065.html

    Ah!  I had indeed screwed up the configuration -- I was manually
building in src using autogen.sh rather than in build and thus had lost
the configuration set up by cygport.  When I blew everything away and
did the cygport stuff again,

    cd /usr/src/
    cygport xorg-server.cygport prep
    cd /usr/src/
    cygport xorg-server.cygport compile

things built fine.  Thank you for all your help!  (To be clear, this
didn't work before the 2 patches you had me make.)

- Mark

--
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/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-11-02 17:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-19 19:54 Problem trying to build Cygwin X server from source Mark Lillibridge
2013-10-20 20:28 ` Jon TURNEY
2013-10-20 22:58   ` Mark Lillibridge
2013-10-21 13:02     ` Jon TURNEY
2013-10-27  0:27       ` Mark Lillibridge
2013-10-28 14:48         ` Jon TURNEY
2013-11-02 17:48           ` Mark Lillibridge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).