[Xcb] xcb with BSD make and on DragonFly

Jeremy C. Reed reed at reedmedia.net
Tue Mar 7 21:53:21 PST 2006


I have built modular Xorg a few times on DragonFly using native "make". (I 
have not committed all the changes yet though to support DragonFly but the 
non-gmake works fine.)

I need to have latest libX11, so I retrieved it. And it needed xcb. (Thank 
you for your detailed wiki it was very useful -- the modular Xorg wiki 
needs same git info!)

I installed xcb-proto. Then started on xcb.

1) Will released versions of xcb source require it? (I haven't looked yet, 
but didn't see discussion on wiki or INSTALL.)

2) Now xcb's Makefile generated via automake 1.9.6 and Autoconf 2.59.
complains with the native make:

Making all in src
"Makefile", line 746: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1

The line is:

vpath %.xml $(XCBPROTO_XCBINCLUDEDIR) $(XCBPROTO_XCBINCLUDEDIR)/extensions

Also NetBSD's make doesn't like it either.

As a workaround, I used gmake. Please consider allowing the native BSD 
make to work as it appears to do for rest of Xorg.

(I haven't used vpath before myself, so I have no suggestion yet.)

3) Building fails with:

 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -pedantic -Wpointer-arith 
-Wstrict-prototypes -Wmissing-declarations -Wnested-externs -g 
-I/home/reed/xorg/include -I/home/reed/xorg/include -MT xcb_util.lo -MD 
-MP -MF .deps/xcb_util.Tpo -c xcb_util.c  -fPIC -DPIC -o .libs/xcb_util.o
In file included from /usr/include/sys/select.h:41,
                 from xcb_util.c:29:
/usr/include/sys/event.h:54: error: syntax error before "uintptr_t"
/usr/include/sys/event.h:56: error: syntax error before "u_short"
In file included from xcb_util.c:29:
/usr/include/sys/select.h:49: error: syntax error before "pid_t"
In file included from xcb_util.c:30:
/usr/include/sys/socket.h:206: error: `int64_t' undeclared here (not in a 
function)
...

So I used:

--- a/xcb/src/xcb_util.c
+++ b/xcb/src/xcb_util.c
@@ -26,6 +26,7 @@
 /* Utility functions implementable using only public APIs. */
 
 #include <assert.h>
+#include <sys/types.h>
 #include <sys/select.h>
 #include <sys/socket.h>
 #include <sys/un.h>

4) Next build problem:

 gcc -DHAVE_CONFIG_H -I. -I. -I. -Wall -pedantic -Wpointer-arith 
-Wstrict-protot
ypes -Wmissing-declarations -Wnested-externs -g -I/home/reed/xorg/include 
-I/hom
e/reed/xorg/include -MT xproto.lo -MD -MP -MF .deps/xproto.Tpo -c xproto.c  
-fPI
C -DPIC -o .libs/xproto.o
In file included from /usr/include/sys/uio.h:41,
                 from xcb.h:32,
                 from xcbext.h:31,
                 from xproto.c:7:
/usr/include/sys/malloc.h:118: error: syntax error before "__int64_t"
/usr/include/sys/malloc.h:120: error: syntax error before "__uint32_t"
/usr/include/sys/malloc.h:122: error: syntax error before "__uint16_t"
/usr/include/sys/malloc.h:167: error: syntax error before "__int16_t"
In file included from xcb.h:32,
                 from xcbext.h:31,
                 from xproto.c:7:
/usr/include/sys/uio.h:49: error: syntax error before "size_t"

So I did:

--- a/xcb/src/xcb.h
+++ b/xcb/src/xcb.h
@@ -27,6 +27,7 @@
 
 #ifndef __XCB_H
 #define __XCB_H
+#include <sys/types.h>
 #include <X11/Xmd.h>
 #include <X11/X.h>
 #include <sys/uio.h>


Then the build completed and installed.

5) There were various warnings, such as:

xcb_util.c: In function `XCBOpen':
xcb_util.c:101: warning: `XCBOpenTCP' is deprecated (declared at 
xcb.h:156)
xcb_util.c:109: warning: `XCBOpenUnix' is deprecated (declared at 
xcb.h:157)
xcb_util.c: In function `XCBConnect':
xcb_util.c:157: warning: `XCBOpen' is deprecated (declared at 
xcb_util.c:94)
xcb_util.c:162: warning: `XCBGetAuthInfo' is deprecated (declared at 
xcb.h:115)
xcb_util.c: In function `XCBConnectToDisplayWithAuthInfo':
xcb_util.c:176: warning: `XCBOpen' is deprecated (declared at 
xcb_util.c:94)
...

xproto.c: In function `XCBCreateWindow':
xproto.c:66: warning: assignment from incompatible pointer type
xproto.c: In function `XCBChangeWindowAttributes':
xproto.c:98: warning: assignment from incompatible pointer type
xproto.c: In function `XCBGetWindowAttributes':
xproto.c:127: warning: assignment from incompatible pointer type
...
extensions/xvmc.c:452: warning: assignment from incompatible pointer type
extensions/xvmc.c: In function `XCBXvMCListSubpictureTypes':
extensions/xvmc.c:479: warning: assignment from incompatible pointer type
...

(I didn't look at this in source.)

6) libX11 built fine for me now. And now back to building rest of Xorg 
again (using build.sh's -r lib/Xext).

The modular xorg wiki needs to be updated about the parts that need to be 
retrieved via git and their dependencies like xcb and xcb-proto. And also 
build.sh needs to be fixed for this also.

Please consider committing the two patches above (or similar).

Thank you for maintaining xcb and thank you for your good work on the X11 
system!


 Jeremy C. Reed

echo 'I7 at 87944:;6<754372=9=?48812=7043:>' | tr '0-@' 'wutrofn mlkige.ca'


More information about the Xcb mailing list