There is a problem with rpmlib.h, part of the rpm-devel rpm (exists in rpm-devel-3.0.3-2). rpmlib.h includes several other rpm header files like this: #include <rpmio.h> #include <dbindex.h> #include <header.h> Unfortunately, a program (such as rpmfind. which is where I ran into this problem) that includes rpmlib.h like this: #include <rpm/rpmlib.h> Will fail to compile, because the preprocessor will search for /usr/include/rpmio.h, etc., and will not find them. The best solution is probably to modify rpmlib.h so that it looks like this: #include <rpm/rpmio.h> #include <rpm/dbindex.h> #include <rpm/header.h> So that it no longer depends on client code to pass the -I/usr/include/rpm flag to the preprocessor.
Changing to <rpm/rpmio.h> would preven building rpm itself. A slightly better change is to use "rpmio.h", as that permits both building rpm and other applications without -I... flags. However, that breaks certain binding autogenerators (perl? I fergit). So the supported method of building is to use -I...