Bug 104982 - Can't build RPM from source when using any other prefix than /usr
Can't build RPM from source when using any other prefix than /usr
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
: EasyFix, Patch
Depends On:
  Show dependency treegraph
Reported: 2003-09-24 07:16 EDT by Armijn Hemel
Modified: 2007-04-18 12:57 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-07 18:55:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch for RPM so it can be installed in different locations than /usr. (497 bytes, patch)
2003-09-24 07:19 EDT, Armijn Hemel
no flags Details | Diff

  None (edit)
Description Armijn Hemel 2003-09-24 07:16:05 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
I installed the RPM 4.2 source RPM on one of my machines (vanilla Red
Hat 9 install), unpacked the source, did a configure with a few options,
such as changing the prefix to /tmp or even leaving it out, so it
defaults to /usr/local and building Python bindings.

The compile barfs because it can't find Python.h, due to an error in Makefile.am
in the python directory.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. unpack RPM tarball
2. configure it with --with-python=2.2 and a prefix different than /usr
3. make

Actual Results:  The compile barfed.

Expected Results:  The compile should have succeeded.

Additional info:

rpmmodule.c:260: warning: implicit declaration of function
`PyString_FromString'rpmmodule.c:267: warning: implicit declaration of
function `PyCObject_FromVoidPtr'
make[3]: *** [rpmmodule.lo] Error 1
make[3]: Leaving directory `/root/rpm-4.2/python'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/rpm-4.2/python'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/rpm-4.2'
make: *** [all] Error 2
Comment 1 Armijn Hemel 2003-09-24 07:19:42 EDT
Created attachment 94670 [details]
Patch for RPM so it can be installed in different locations than /usr.

This patch adds a little line of Python code to "python/Makefile.am" to correct
the include path for the "Python.h" header file which is now being searched in
$(prefix)/include/python$(version), and so it fails if you want to install it
anywhere else than in /usr. Using a line of Python to fix this is not much of
an issue:

- the line above already contains some Python code
- Python is already a dependency for creating Python bindings.
Comment 2 Jeff Johnson 2005-02-07 18:55:52 EST
rpm-4.4.1-0.18 is known to build on Mac OS X with
--prefix=/opt/local, should work anywhere.

Note You need to log in before you can comment on or make changes to this bug.