Summary: | Some of libxcb's .pc files don't list all dependencies as "Requires:" | ||
---|---|---|---|
Product: | XCB | Reporter: | Török Edwin <edwin+bugs> |
Component: | Library | Assignee: | xcb mailing list dummy <xcb> |
Status: | RESOLVED FIXED | QA Contact: | xcb mailing list dummy <xcb> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.10 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Török Edwin
2014-02-08 22:40:09 UTC
You need the xcb randr.h, not the Xlib randr.h. That should be in a libxcb-randr development package. On debian, that's libxcb-randr0-dev. The configure should really check for xcb-randr, too then. (In reply to comment #2) > The configure should really check for xcb-randr, too then. (In reply to comment #1) > You need the xcb randr.h, not the Xlib randr.h. That should be in a > libxcb-randr development package. On debian, that's libxcb-randr0-dev. Indeed, installing that package allowed me to build with DRI3, a configure check would be nice. (In reply to comment #1) > You need the xcb randr.h, not the Xlib randr.h. That should be in a > libxcb-randr development package. On debian, that's libxcb-randr0-dev. This dependency should be reflected in xcb-present.pc. There are more dependencies than just "present needs randr" that are missing. The following hack greps each XML extension description for <import> tags and checks if the corresponding .pc.in file contains the correct dependency (And yes, the code generator turns <import> into an include in the public header so these dependencies do exist): $ for xml in ../proto/src/*xml ; do ext=$(basename --suffix=.xml $xml) ; grep '<import' $xml | sed -e 's/<[^>]*>\|[\t ]*//g' | grep -v xproto | while read dep ; do grep -q "xcb-$dep" xcb-$ext.pc.in || echo " $ext depends on $dep, but xcb-$ext.pc.in doesn't list this!" ; done ; done present depends on randr, but xcb-present.pc.in doesn't list this! present depends on xfixes, but xcb-present.pc.in doesn't list this! present depends on sync, but xcb-present.pc.in doesn't list this! randr depends on render, but xcb-randr.pc.in doesn't list this! xinput depends on xfixes, but xcb-xinput.pc.in doesn't list this! I guess the best way to fix this would be to have the generation of the .pc.in files somehow be wired up to the code generator so that these kind of things are done automatically. Sadly the .pc.in files are needed by ./configure and thus cannot be easily generated from make... Alternatively, "make check" could be extended to do something like the above, but in a less hackish way. (In reply to comment #5) > There are more dependencies than just "present needs randr" that are missing. > > The following hack greps each XML extension description for <import> tags > and checks if the corresponding .pc.in file contains the correct dependency > (And yes, the code generator turns <import> into an include in the public > header so these dependencies do exist): > > $ for xml in ../proto/src/*xml ; do ext=$(basename --suffix=.xml $xml) ; > grep '<import' $xml | sed -e 's/<[^>]*>\|[\t ]*//g' | grep -v xproto | while > read dep ; do grep -q "xcb-$dep" xcb-$ext.pc.in || echo " $ext depends on > $dep, but xcb-$ext.pc.in doesn't list this!" ; done ; done > present depends on randr, but xcb-present.pc.in doesn't list this! > present depends on xfixes, but xcb-present.pc.in doesn't list this! > present depends on sync, but xcb-present.pc.in doesn't list this! > randr depends on render, but xcb-randr.pc.in doesn't list this! > xinput depends on xfixes, but xcb-xinput.pc.in doesn't list this! > > I guess the best way to fix this would be to have the generation of the > .pc.in files somehow be wired up to the code generator so that these kind of > things are done automatically. Sadly the .pc.in files are needed by > ./configure and thus cannot be easily generated from make... > > Alternatively, "make check" could be extended to do something like the > above, but in a less hackish way. What about having a generate-pkg-config.py.in script, which gets the necessary @paths@ and @variables@ filled in via configure, and then runs to generate .pc files directly? I've posted a pair of patches to the xcb list which validate the dependencies in the .pc files against the constructed header files and then a second patch which uses that information to add missing dependencies. The validation will happen whenever someone does 'make check', which is part of 'make distcheck', a standard part of the X.org release process, so with these two patches in place, we shouldn't have this particular problem in the future. (In reply to comment #5) > I guess the best way to fix this would be to have the generation of the > .pc.in files somehow be wired up to the code generator so that these kind of > things are done automatically. Sadly the .pc.in files are needed by > ./configure and thus cannot be easily generated from make... The .pc.in files aren't strictly needed by configure, we'd just been using configure to do the simple substitutions needed in them instead of writing a Makefile rule. If we've got more complex work to do, removing them from configure and moving their generation to something run out of the Makefile instead should be simple. This reminds me that X randrproto package depends on renderproto but the .pc does not list it. No one got impacted as randrproto does not need renderproto to compile, there are only header files. Pardon my ignorance, but could it be just as simple for the XCB project to edit the xcb-randr.pc.in file to add xcb-render in the Requires? And so on... I am assuming that the dependencies are static and do not depend on generated code. Looks to me that randr will always depend on render. The X proto packages should be fixed anyway for completeness and accuracy. I can help with that. (In reply to comment #9) > Pardon my ignorance, but could it be just as simple for the XCB project to > edit the xcb-randr.pc.in file to add xcb-render in the Requires? And so > on... I am assuming that the dependencies are static and do not depend on > generated code. Looks to me that randr will always depend on render. > the dependency declaration lives in the xml files which live in xcb-proto. those xml files are not static. having to duplicate those declarations in the .pc files when they could just be inferred from the xml sucks. commit e2813e1cde893f384fa620ff3c13493beebabe0c Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 12 14:15:46 2014 -0800 Update .pc file Requires lines to express full dependencies Some xcb libraries depend on others; make these dependencies explicit in the .pc files that are installed. This change was generated automatically by running 'check-pc-requires -fix' |
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.