[email protected] wrote on 03/27/2010 02:00:32 PM:

> From:
>
> Matthew Saltzman <[email protected]>
>
> To:
>
> "Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list"
> <[email protected]>
>
> Cc:
>
> [email protected]
>
> Date:
>
> 03/27/2010 02:07 PM
>
> Subject:
>
> Re: [rhelv5-list] Rebuilding latest PHP RPM fails.
>
> Sent by:
>
> [email protected]
>
> On Fri, 2010-03-26 at 16:57 -0500, [email protected] wrote:
> > >
> > > On Fri, 2010-03-26 at 17:26 +0000, Trevor Hemsley wrote:
> > >
> > >            Latest php on RHEL5 is php-5.1.6-24.el5_4.5.
> > >
> > >                 4.3.9 sounds like you are trying to rebuild the
> > > RHEL4 rpm on RHEL5 which
> > >                 is not, I suspect, what you really want.
> > >
> > >                 On 26/03/2010 17:08, Matthew Saltzman wrote:
> > >                 > I tired to rebuild the latest PHP RPM (php-4.3.
> > > 9-3.29.src.rpm) on an
> > >                 > up-to-date RHEL5 system.  (My plan is to build a
> > > modified version, but
> > >                 > this is the original RHEL RPM.)  The build runs
> > > for quite a while, but
> > >                 > eventually fails.  The last part of the console
> > > log is below.
> > >                 >
> > >
> > >
> > > Oops, you're all right.  This is a CentOS 4.8 system and the build is
> > > targeted at a RHEL 4 installation.  We have a mix and I just had a
brain
> > > freeze.
> > >
> > > The command was rpmbuild --rebuild.  Indeed, there is
> > > no /usr/lib/rpm/check-rpaths.  But I must take this to the RHEL4
list,
> > > unless someone here knows what's going on given this new information.
> > >
> >
> > Based on the contents of rpm-build according to RHN, that file doesn't
> > exist in RHEL4's rpm-build.  I'd check out the contents of the spec
file
> > contains a definition of that.  If not I'd start looking at your rpm
build
> > environment to see if its set somewhere.
>
> The spec file contains the following references to rpath:
>
>         $ grep rpath php.spec
>         Patch206: php-4.3.9-rpath.patch
>         %patch206 -p1 -b .rpath
>         --disable-rpath \
>
> The last reference is an argument in configure.  The patch file
> contains:
>
>         $ more php-4.3.9-rpath.patch
>         --- php-4.3.9/acinclude.m4.rpath
>         +++ php-4.3.9/acinclude.m4
>         @@ -831,7 +832,7 @@ dnl add a library to linkpath/runpath
>         dnl
>         AC_DEFUN([PHP_ADD_LIBPATH],[
>            case x$1 in
>         -  x/usr/lib|x/usr/lib64) ;;
>         +  x/usr/lib|x/usr/lib64|x/usr) ;;
>            *)
>              PHP_EXPAND_PATH($1, ai_p)
>              ifelse([$2],,[
>         @@ -839,6 +840,7 @@ AC_DEFUN([PHP_ADD_LIBPATH],[
>              ],[
>                if test "$ext_shared" = "yes"; then
>                  $2="$ld_runpath_switch$ai_p -L$ai_p [$]$2"
>         +        AC_MSG_NOTICE(added RPATH for $ai_p)
>                else
>                  _PHP_ADD_LIBPATH_GLOBAL([$ai_p])
>                fi
>
> Not sure what that tells me, though.
>
After reading up on rpath a bit more, I'm gonna say that that all looks
okay.  I could be wrong about the patch, but the disable-rpath seems right
based on the fedora docs.

See if you have this, I found the following on my fedora box (but not on my
rhel boxes):

[...@box ~]$ rpm --eval '%__arch_install_post'
/usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot

If its defined you might want to check you ~/.rpmmacros file, as that
shouldn't be part of RHEL.  Even on my fedora box, where I did find it, it
turned out this was defined in my .rpmmacros.  It looks like
rpmdev-setuptree placed it there.

If all else fails, a bit of googling found me this for clearing that out
(seems pretty obvious in context, but I don't like just assuming when
helping others do the work) the rpath call from inside the SPEC file.

# disable rpath checking
%define __arch_install_post /usr/lib/rpm/check-buildroot

If at the end of this you can not find the /usr/lib/rpm/check-rpaths file
for RHEL4, but the rpmdevtools package places this, maybe you should file a
bug?

-greg

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to