Bug 21773

Summary: configure script for xcb-utils requires libxcb > 1.2, which doesn't exist
Product: XCB Reporter: Bob Ham <rah>
Component: UtilsAssignee: xcb mailing list dummy <xcb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch to implement fix
Patch to add dependency on xcb-proto
Patch for libxcb to store xcb-proto version
Patch to add check for version of xcb-proto that libxcb was compiled against

Description Bob Ham 2009-05-16 18:38:58 UTC
The latest version of xcb in git is 1.2; perhaps the check

PKG_CHECK_MODULES(XCB, xcb > 1.2)

should be

PKG_CHECK_MODULES(XCB, xcb >= 1.2)

?
Comment 1 Bob Ham 2009-05-17 05:31:56 UTC
Created attachment 25930 [details] [review]
Patch to implement fix
Comment 2 Julien Danjou 2009-05-17 12:01:05 UTC
Except the patch is wrong, since it really requires > 1.2 to be OK with library version bump IIRC.
Comment 3 Bob Ham 2009-05-17 12:52:50 UTC
I'm not sure what you mean by "library version bump".  Are you confusing library versions and package version?  The package version of libxcb in git master is 1.2.

I've compiled xcb-utils against this libxcb version 1.2 (and am currently using it through iceweasel to write this comment) so the requirement of libxcb > 1.2 appears to be false.
Comment 4 Julien Danjou 2009-05-18 01:29:51 UTC
I'm not confusing anything, but my answer was not the right one.

We need libxcb > 1.2 because xcb > 1.2 will depends on xproto >= 1.5. And with xproto >= 1.5, the protocol description of GetProperty replies has changed, therefore if you use libxcb <= 1.2 / xproto <= 1.4 some values returned by xcb-icccm (from xcb-util) will be wrong).
Comment 5 Bob Ham 2009-05-18 01:43:22 UTC
Created attachment 25956 [details] [review]
Patch to add dependency on xcb-proto
Comment 6 Julien Danjou 2009-05-18 01:47:57 UTC
This is not right. Having xcb-proto >= 1.5 on your system does not guarantee that the code generated and compiled inside libxcb was done with xcb-proto 1.5:

- install xcb-proto 1.4
- build libxcb 1.2
- install xcb-proto 1.5
- build xcb-util with your patch will work, but the code will fail because libxcb has been generated with xcb-proto 1.4.
Comment 7 Bob Ham 2009-05-18 01:53:17 UTC
In that case, using PKG_CHECK_MODULES isn't enough.  The configure script needs to check which version of xcb-proto libxcb was compiled against.
Comment 8 Julien Danjou 2009-05-18 01:56:20 UTC
We can't so that's why we require libxcb > 1.2 which will require xcb-proto >= 1.5 to compile. So we are sure that it's correct. Or I miss something and provide me an example where it can fail please.
Comment 9 Bob Ham 2009-05-18 02:08:57 UTC
(In reply to comment #8)

> We can't

Why not?

> so that's why we require libxcb > 1.2 which will require xcb-proto >=
> 1.5 to compile. So we are sure that it's correct. Or I miss something and
> provide me an example where it can fail please.

This is the output of trying to configure xcb-util from git master with jhbuild, which is an example where it fails:


checking for XCB... configure: error: Package requirements (xcb > 1.2) were not met:

Requested 'xcb > 1.2' but version of XCB is 1.2

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_CFLAGS
and XCB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

make: *** [config.status] Error 1
*** error during stage build of xcb-util: ########## Error running make   *** [56/65]
Comment 10 Julien Danjou 2009-05-18 02:12:01 UTC
(In reply to comment #9)
> Why not?

Tell me how then. :-)

> > so that's why we require libxcb > 1.2 which will require xcb-proto >=
> > 1.5 to compile. So we are sure that it's correct. Or I miss something and
> > provide me an example where it can fail please.
> 
> This is the output of trying to configure xcb-util from git master with
> jhbuild, which is an example where it fails:

I know it fails to build *right now*. We just need to bump the version of libxcb in git, which I did not do for now because I'm not sure we will release 1.3 directly or go with 1.2.x.
Comment 11 Bob Ham 2009-05-18 03:25:29 UTC
Created attachment 25958 [details] [review]
Patch for libxcb to store xcb-proto version
Comment 12 Bob Ham 2009-05-18 03:26:34 UTC
Created attachment 25959 [details] [review]
Patch to add check for version of xcb-proto that libxcb was compiled against
Comment 13 Bob Ham 2009-05-18 03:28:32 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Why not?
> 
> Tell me how then. :-)

See attached patches.


> > > so that's why we require libxcb > 1.2 which will require xcb-proto >=
> > > 1.5 to compile. So we are sure that it's correct. Or I miss something and
> > > provide me an example where it can fail please.
> > 
> > This is the output of trying to configure xcb-util from git master with
> > jhbuild, which is an example where it fails:
> 
> I know it fails to build *right now*. We just need to bump the version of
> libxcb in git, which I did not do for now because I'm not sure we will release
> 1.3 directly or go with 1.2.x.

Could you possibly update libxcb in git with a 1.2.x version temporarily, so that xcb-util isn't broken?  (Or apply the aforementioned patches?)
Comment 14 Bart Massey 2009-05-21 23:35:58 UTC
Julien, as usual, thanks hugely for running our release process.  It is greatly appreciated.  Bob, thanks much for the bug report and your persistence with it, and especially for providing the nice-looking autoconf patches.

It would be really nice if top of tree was buildable again right now.  I see three obvious resolutions:

  * Temporarily change the > to >= .  Yes, it's arguably the wrong thing, but it's the easiest.

  * Bump the version number of libxcb to 1.2.1.  We can always bump it again later if it wants to be 1.3.

  * Adopt Bob's patches and let them drive things from here on out.

I have a preference for the third, but I freely admit that I may not understand the full implications.  At any rate, I'm fine with whichever one Julien wants to go with.

Again, thanks to all.
Comment 15 Julien Danjou 2009-05-25 03:24:12 UTC
I've pushed both patches. Thanks Bob.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.