Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379545 - x11-base/xorg-server: add x11-proto/dri2proto x11-proto/resourceproto x11-proto/xineramaproto x11-proto/videoproto and x11-proto/scrnsaverproto in RDEPEND
Summary: x11-base/xorg-server: add x11-proto/dri2proto x11-proto/resourceproto x11-pro...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal with 3 votes (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 353169 444488 523270 (view as bug list)
Depends on:
Blocks: autodep 349638 463676 498590 514088 514328 514350 514518 515042 515044 515158 515478 515482 515908 516294 516296 516298 516622 549394 555284 595872 615384
  Show dependency tree
 
Reported: 2011-08-17 09:25 UTC by bay
Modified: 2018-04-27 17:55 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bay 2011-08-17 09:25:03 UTC
Package x11-base/xorg-server uses x11-proto/dri2proto x11-proto/xineramaproto and x11-proto/videoproto in runtime.

The file /usr/lib64/pkgconfig/xorg-server.pc from x11-base/xorg-server used by pkg-config util, when one launch it as:

pkg-config --cflags "xorg-server >= 1.5.99.901"

This is fragment of xorg-server.pc:
Name: xorg-server
Description: Modular X.Org X Server
Version: 1.10.3
Requires: pixman-1 pciaccess
Requires.private: xproto >= 7.0.17 randrproto >= 1.2.99.3 renderproto >= 0.11 xextproto >= 7.1.99 inputproto >= 1.9.99.902 kbproto >= 1.0.3 fontsproto videoproto dri2proto >= 2.3 xineramaproto
Cflags: -I${sdkdir} -fvisibility=hidden
Libs: -L${libdir}

We see here that it depends on x11-proto/dri2proto x11-proto/xineramaproto and x11-proto/videoproto. In other words, these packages are needed not only for building a package, but also for using it. 

For example if I do 
# emerge -C videoproto

And then I try to run: 
# pkg-config --cflags "xorg-server >= 1.5.99.901"
I got this:

# pkg-config --cflags "xorg-server >= 1.5.99.901"
Package videoproto was not found in the pkg-config search path.
Perhaps you should add the directory containing `videoproto.pc'
to the PKG_CONFIG_PATH environment variable
Package 'videoproto', required by 'xorg-server', not found

The pkg-config util commonly used in the process of configuring packages that depends on xorg-server package for example x11-drivers/xf86-input-mouse uses it.

So I think that these three packages should be added to xorg-server not only as build time dependencies, but as runtime dependencies also.

Steps to reproduce:
emerge -C videoproto
emerge xf86-input-mouse
Emerge will fail with "fatal error: xorg-server.h: No such file or directory" error because pkg-config util fails.
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-08-19 12:01:42 UTC
Probably related to bug 342393.
Comment 2 bay 2011-08-19 14:12:17 UTC
I used old version of mesa and catched its error too but now it seems to be fixed.

They've patched as(mesa-7.11.ebuild):

# not a runtime dependency of this package, but dependency of packages which
# depend on this package, bug #342393
EXTERNAL_DEPEND="
        >=x11-proto/dri2proto-2.2
        >=x11-proto/glproto-1.4.11
"
# keep correct libdrm and dri2proto dep
# keep blocks in rdepend for binpkg
RDEPEND="${EXTERNAL_DEPEND}
....
Comment 3 Matt Turner gentoo-dev 2011-08-26 02:08:18 UTC
*** Bug 353169 has been marked as a duplicate of this bug. ***
Comment 4 Matt Turner gentoo-dev 2011-08-26 02:09:44 UTC
I think that the protos should, sort of by definition, never be in RDEPEND. Packages like drivers that need them should simply specify them in DEPEND.
Comment 5 bay 2011-08-26 04:14:47 UTC
Yes, I am agree, but in this case it's need to do same with mesa and other packages.
Comment 6 Jonathan Callen (RETIRED) gentoo-dev 2011-08-27 03:01:11 UTC
The problem with requiring package "foo" to DEPEND on barproto is that that dependency might not always be in foo itself -- often, now, the dependency *solely* resides in the headers for *some* versions of libbar, not all.
Comment 7 Sebastian Luther (few) 2011-10-17 06:57:41 UTC
(In reply to comment #4)
> I think that the protos should, sort of by definition, never be in RDEPEND.

If files installed by a package are only useable when some other package is installed, then this is a RDEPEND.

> Packages like drivers that need them should simply specify them in DEPEND.

No, packages depend on those packages that provide the files they actually use.

You can blame PMS for not specifying a build-against dependency (IIRC there is even a bug for this), but this not going to change any time soon. By the currently existing definitions for the *DEPEND variables, this is an RDEPEND. Please get over it and add it.
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-11-24 01:20:11 UTC
*** Bug 444488 has been marked as a duplicate of this bug. ***
Comment 9 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-02-10 21:03:28 UTC
*** Bug 463676 has been marked as a duplicate of this bug. ***
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-07-07 17:18:26 UTC
Until a new dependency type gets added to a future EAPI in bug 392239, we could follow zmedico's suggestion from bug 342393 comment 23. A virtual/xorg-drivers-build which gets added to DEPEND by the eclass for x11-drivers/* and which RDEPENDS on the necessary x11-proto/*.
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2014-09-21 22:00:19 UTC
*** Bug 523270 has been marked as a duplicate of this bug. ***
Comment 12 Paweł Stankowski 2014-09-21 22:21:58 UTC
Why not add new use flag "pkg-config" that conditionally adds xorg-server.pc file and proto-* dependencies to RDEPEND list?

Other packages that use xorg-server.pc file could then add xorg-server[pkg-config] to their DEPEND list.
Comment 13 Paweł Stankowski 2014-10-05 21:33:33 UTC
Bump.

I think that we should not introduce new package as all headers that depends on x11-proto/* packages are installed by xorg-server package itself. New package xorg-server-build would introduce not standard approach and would generate a lot of questions and possibly bugs from lost users.

I still think that this bug should be fixed by adding new USE flag (maybe "headers", "dev" or "development" would be better name) that conditionally adds all *.h and xorg-server.pc file. With this use flag enabled, package should RDEPEND on all packages from the title. This new flag should be enabled by default for backward compatibility. Advantage of such USE flag is that with such approach it is not possible to emerge unusable files (and some headers and xorg-server.pc files are unusable w/o discussed dependencies).
Comment 14 Matt Turner gentoo-dev 2018-04-27 17:55:23 UTC
With x11-base/xorg-proto the need for this is almost entirely gone. Packages need to depend only on a single package that pulls in all the protocol headers. Marking as WONTFIX, since there's no need :)