Bug 9611

Summary: rpm-devel header files possibly need fixing
Product: [Retired] Red Hat Linux Reporter: lars
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: lars
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-21 11:03:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lars 2000-02-20 21:16:09 UTC
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.

Comment 1 Jeff Johnson 2000-02-21 11:03:59 UTC
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...