From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Dec 19 13:00:23 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D67E106564A for ; Mon, 19 Dec 2011 13:00:23 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 27E5C8FC14 for ; Mon, 19 Dec 2011 13:00:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBJD0NmC016847 for ; Mon, 19 Dec 2011 13:00:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBJD0MRJ016845; Mon, 19 Dec 2011 13:00:22 GMT (envelope-from gnats) Resent-Date: Mon, 19 Dec 2011 13:00:22 GMT Resent-Message-Id: <201112191300.pBJD0MRJ016845@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, bob frazier Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A22351065670 for ; Mon, 19 Dec 2011 12:56:32 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 909788FC13 for ; Mon, 19 Dec 2011 12:56:32 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pBJCuWQH000967 for ; Mon, 19 Dec 2011 12:56:32 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pBJCuW9l000966; Mon, 19 Dec 2011 12:56:32 GMT (envelope-from nobody) Message-Id: <201112191256.pBJCuW9l000966@red.freebsd.org> Date: Mon, 19 Dec 2011 12:56:32 GMT From: bob frazier To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/163447: pulseaudio fails to build with latest x11 'xcb' ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 13:00:23 -0000 >Number: 163447 >Category: ports >Synopsis: pulseaudio fails to build with latest x11 'xcb' ports >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 19 13:00:22 UTC 2011 >Closed-Date: >Last-Modified: >Originator: bob frazier >Release: 7.4-STABLE >Organization: S.F.T. Inc. >Environment: FreeBSD BSDSilver.SFT.local 7.4-STABLE FreeBSD 7.4-STABLE #15: Thu Dec 15 19:14:22 PST 2011 root@BSDSilver.SFT.local:/usr/obj/usr/src/sys/GENERIC amd64 >Description: a recent update to x11/libxcb (and related ports) changes the API for xcb atom requests. web search reveals this is not unique to freebsd, either. The problem centers around the elimination of the 'xcb_atom_get' function and the renaming of an atom identifier 'STRING' to 'XCB_ENUM_STRING'. Patching the appropriate file appears to correct the build issues, and the changes are consistent with recommended methods for reading an atom as per documentation: http://xcb.freedesktop.org/tutorial/ however, thorough testing SHOULD be done before putting the patch into the port, and changes should be made to the code to reflect this new library (rather than simply patching it so that it works). marked serious+high priority due to LOTS OF GNOME PORTS DEPENDING ON THIS and the upcoming release of 9.0 (so you want to have a good ports tree for the new distro) >How-To-Repeat: attempt to build audio/pulseaudio using the latest ports collection (after upgrades to libxcb and related ports). Note build failure of src/pulsecore/x11prop.c >Fix: place attached patch file 'as-is' into audio/pulseaudio/files, clean (to force re-extract + re-patch), and 'make' Patch attached with submission follows: --- src/pulsecore/x11prop.c.orig 2010-11-25 16:45:23.000000000 -0800 +++ src/pulsecore/x11prop.c 2011-12-19 04:46:27.000000000 -0800 @@ -55,12 +55,32 @@ pa_assert(xcb); pa_assert(name); pa_assert(data); if ((xs = screen_of_display(xcb, screen))) { - a = xcb_atom_get(xcb, name); - xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); +/* a = xcb_atom_get(xcb, name); + xcb_atom_get no longer supported - this is from xcb.freedesktop.org/tutorial +*/ + xcb_intern_atom_cookie_t ak; + xcb_intern_atom_reply_t *ar; + + ak = xcb_intern_atom(xcb, 0, strlen(name), name); + ar = xcb_intern_atom_reply(xcb, ak, NULL); + if(ar) + { + a = ar->atom; + free(ar); + } + else + { + a = 0; // not sure if this is correct + } + +/* xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); + STRING no longer defined, equivalent definition is now in an enumeration +*/ + xcb_change_property(xcb, XCB_PROP_MODE_REPLACE, xs->root, a, XCB_ATOM_STRING, PA_XCB_FORMAT, (int) strlen(data), (const void*) data); } } void pa_x11_del_prop(xcb_connection_t *xcb, int screen, const char *name) { xcb_screen_t *xs; @@ -68,11 +88,29 @@ pa_assert(xcb); pa_assert(name); if ((xs = screen_of_display(xcb, screen))) { - a = xcb_atom_get(xcb, name); +/* a = xcb_atom_get(xcb, name); + xcb_atom_get no longer supported - this is from xcb.freedesktop.org/tutorial +*/ + xcb_intern_atom_cookie_t ak; + xcb_intern_atom_reply_t *ar; + + ak = xcb_intern_atom(xcb, 0, strlen(name), name); + ar = xcb_intern_atom_reply(xcb, ak, NULL); + + if(ar) + { + a = ar->atom; + free(ar); + } + else + { + a = 0; // not sure if this is correct + } + xcb_delete_property(xcb, xs->root, a); } } char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char *p, size_t l) { @@ -97,13 +135,34 @@ */ if (!xs && 0 != screen) xs = screen_of_display(xcb, 0); if (xs) { - a = xcb_atom_get(xcb, name); +/* a = xcb_atom_get(xcb, name); + xcb_atom_get no longer supported - this is from xcb.freedesktop.org/tutorial +*/ + xcb_intern_atom_cookie_t ak; + xcb_intern_atom_reply_t *ar; + + ak = xcb_intern_atom(xcb, 0, strlen(name), name); + ar = xcb_intern_atom_reply(xcb, ak, NULL); + + if(ar) + { + a = ar->atom; + free(ar); + } + else + { + a = 0; // not sure if this is correct + } + +/* req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1)); + STRING no longer defined, equivalent definition is now in an enumeration +*/ + req = xcb_get_property(xcb, 0, xs->root, a, XCB_ATOM_STRING, 0, (uint32_t)(l-1)); - req = xcb_get_property(xcb, 0, xs->root, a, STRING, 0, (uint32_t)(l-1)); prop = xcb_get_property_reply(xcb, req, NULL); if (!prop) goto finish; >Release-Note: >Audit-Trail: >Unformatted: