Description of problem:
The libev-devel package installs the libev header files to /usr/include/libev/*.h, but gcc checks in /usr/include/*.h by default.
Steps to reproduce:
1. yum instll libev-devel (I got libev-devel-4.03-3.el6.x86_64 , but the i686 package looks identical).
2. Attempt to compile a program referencing <ev.h>
Setting C_INCLUDE_PATH=/usr/include/libev allowed me to build the desired application.
I checked the debian equivalent of this package (e.g. http://packages.debian.org/sid/ia64/libev-dev/filelist ) and it seems that the header files are placed directly into /usr/include, which is why I assumed that the EPEL package should be laid out similarly. If that's not the case, please just let me know and I'll update my understanding. Thanks!
Yes, that's a known problem with our package. :(
It's not just EL6, but all Fedora branches actually.
Grab a cup of your favourite beverage, here's the whole story...
Upstream libev ships a event.h header file, which provides some compatibility with libevent.
Both libevent and libev try to install their header as /usr/include/event.h
When libev was introduced in Fedora, the original package maintainer (I took over this package long after) didn't want to have a file conflict between libev-devel and libevent-devel (which was already in Fedora), so he moved the libev headers into /usr/include/libev.
To make it easier for users of the library to find the headers, he created a pkg-config file, which he added to the libev-devel package.
These 2 changes only exist in Fedora: upstream didn't accept them, and other distributions preferred following upstream's decision.
So we could decide to drop our downstream changes, which means:
1. moving the headers back to /usr/include
2. adding to libev-devel a "Conflicts: libevent-devel"
3. change our pkg-config file to point to the new location of the headers
Point 2 is not great though, for developers who work on some apps linking against libev, and others linking against libevent.
We could do it the Debian way and have the conflicting event.h header in a libev-libevent-devel subpackage, so that only this one conflicts with libevent-devel.
But then, that breaks all packages which use the event.h header at build-time: they need to BuildRequires: libev-libevent-devel instead of libev-devel.
It also breaks third-party software which isn't in Fedora/EPEL, so we'd at least need to announce it properly, and we could properly only make the change in Rawhide, not in EPEL.
Finally, about point 3 above, we could drop the pkg-config file entirely, except that will break some packages which have been downstream-patched in Fedora (!) to use the pkg-config file shipped only in our libev package. That would also probably be a change we can make in Rawhide only, not in EPEL.
So, to sum it all up:
- this is a bug I know about, which affects all Fedora branches, but that I can probably only fix in Rawhide, and which would take some coordination with other packages
- for your immediate needs in EPEL 6, use the pkg-config file to build your software (yes, I understand it means your software will build differently in Fedora/EPEL and other distributions. I'm sorry about that :( )
I forgot to mention it here, but this bug is now fixed in Rawhide.
Unfortunately, due to the invasive nature of the change, it is not something I can push to other Fedora branches, including EPEL.
As mentioned in my last comment, for EPEL you will have to either use the pkgconfig file, or hardcode the path to the headers. :(