[Xquartz-dev] libX11 compilation
Ben Byer
bbyer at apple.com
Sat Dec 1 19:12:46 PST 2007
On Dec 1, 2007, at 5:11 PM, Jeremy Huddleston wrote:
> Ben,
>
> How did you compile the libX11 that you have in your freedesktop.org
> webspace? I compiled my own version, and it works fine on my
> macbook, but when I try it on my powerbook G4 or my powermac G5, I
> get an error when trying to open the display:
>
> (16:51:44 Sat Dec 01 2007 jeremy at yuffie Power Macintosh)
> ~ $ xmodmap
> xmodmap: unable to open display '/tmp/launch-HMCPPG/:0'
>
> ---
>
> I compiled mine with:
> CFLAGS="${CFLAGS} -Wall -O2 -arch i386 -arch ppc -pipe -arch x86_64 -
> arch ppc64 -D__DARWIN__"
> and
> ./configure -prefix=/usr/X11 --mandir=/usr/X11/man --disable-
> dependency-tracking --disable-xf86bigfont --disable-static
Check out http://www.opensource.apple.com/darwinsource/10.5/X11libs-16/libX11/conf_flags
I think it's the --disable-xcb. Yes, this is stupid. I have a patch
to Xcb to support launchd:
--- libxcb-1.0/src/xcb_util.c~ 2006-11-21 20:20:15.000000000 -0800
+++ libxcb-1.0/src/xcb_util.c 2007-03-23 15:17:21.000000000 -0700
@@ -231,10 +231,15 @@
xcb_connection_t *c;
xcb_auth_info_t auth;
+ if(displayname && strlen(displayname)>11 && !strncmp(displayname,
"/tmp/launch", 11))
+ fd = _xcb_open_unix(displayname);
+ else {
if(!xcb_parse_display(displayname, &host, &display, screenp))
return (xcb_connection_t *) &error_connection;
fd = _xcb_open(host, display);
free(host);
+ }
+
if(fd == -1)
return (xcb_connection_t *) &error_connection;
@@ -254,10 +263,14 @@
int fd, display = 0;
char *host;
+ if(displayname && strlen(displayname>11) && !strncmp(displayname,
"/tmp/launch", 11))
+ fd = _xcb_open_unix(displayname);
+ else {
if(!xcb_parse_display(displayname, &host, &display, screenp))
return (xcb_connection_t *) &error_connection;
fd = _xcb_open(host, display);
free(host);
+ }
if(fd == -1)
return (xcb_connection_t *) &error_connection;
... theoretically that patch is applied to the libxcb that shipped
with Leopard, but I never got around to testing it.
--
Ben Byer
CoreOS / BSD Technology Group, XDarwin maintainer
More information about the Xquartz-dev
mailing list