Bug 133573

Summary: Cross compiling - configure failes on RPM 4.3.2-2
Product: [Fedora] Fedora Reporter: Mark Hatle <mhatle>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-29 16:19:46 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:
Attachments:
Description Flags
Patch to fix the MYPATH for crosscompilation. none

Description Mark Hatle 2004-09-24 21:04:14 UTC
When cross compiling RPM 4.3.2-2, some mysterious failures occur.

Errors similar to below occur:

checking libelf.h usability... no
checking libelf.h presence... yes
configure: WARNING: libelf.h: present but cannot be compiled
configure: WARNING: libelf.h:     check for missing prerequisite headers?
configure: WARNING: libelf.h: see the Autoconf documentation
configure: WARNING: libelf.h:     section "Present But Cannot Be Compiled"
configure: WARNING: libelf.h: proceeding with the preprocessor's result
configure: WARNING: libelf.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ---------------------------------- ##
configure: WARNING:     ## Report this to rpm-list ##
configure: WARNING:     ## ---------------------------------- ##

Comment 1 Mark Hatle 2004-09-24 21:05:57 UTC
The problem was tracked down to a configure.ac statement:

dnl
dnl use defaults if cross-compiling, otherwise use the default path.
dnl
if test "$cross_compiling" = "yes"; then
    MYPATH=""
else
#   
MYPATH="/bin:/usr/bin:/usr/local/bin:$PATH:/sbin:/usr/sbin:/usr/local/sbin:/opt/gnu/bin"
    MYPATH=$PATH
fi

If you change 'MYPATH=""' to 'MYPATH=":"' the problem goes away, and
the desired behavior (according to the comment) occurs.

Comment 2 Chris Larson 2005-01-29 15:51:17 UTC
Created attachment 110382 [details]
Patch to fix the MYPATH for crosscompilation.

Comment 3 Jeff Johnson 2005-01-29 16:19:46 UTC
Checked in on HEAD and rpm-4_{4,3,2} branches. Thanks for the patch.

Should be in rpm-4.4.1-0.13 and later when built.