Bug #17702 Updated: -rpath is not used correctly, causing configure failure

From: Date: Wed, 03 Jul 2002 00:55:24 +0000
Subject: Bug #17702 Updated: -rpath is not used correctly, causing configure failure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12900@lists.php.net to get a copy of this message
 ID:               17702
 Updated by:       sniper@php.net
 Reported By:      long@kestrel.cc.ukans.edu
-Status:           Bogus
+Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: Tru64 4.0F PK3
 PHP Version:      4.2.1


Previous Comments:
------------------------------------------------------------------------

[2002-07-02 20:55:08] sniper@php.net

Please try this snapshot:

http://snaps.php.net/php4-latest.tar.gz

------------------------------------------------------------------------

[2002-06-11 11:42:45] long@kestrel.cc.ukans.edu

Well, all I wanted to do was reopen bug #8844
(http://bugs.php.net/bug.php?id=8844) but since I have an empty
password on that bug it won't accept it so I can't login to that bug. 
So go read that bug and I'll just paste in what I was going to add to
it:

I'm back.  I'm finally sick and tired enough of PHP 4.2.1 not compiling
correctly out of the box that I did some digging.  I beg to differ that
this is not a PHP bug as the autoconf macros that cause this problem
are in acinclude.m4 (i.e. written by PHP developers).  This problem can
be corrected, but probably only correctly by someone who more fully
understands the PHP build process.  At the end of this note is a patch
I used that causes the -rpath to be setup correctly for my particular
environment.  I'm not claiming in any sense that this patch is
absolutely correct for anyone else using Tru64 and the Compaq C
compiler but it worked for me.  Perhaps it can be used by an autoconf
guru among the PHP developers to correctly set -rpath.

P.S: I don't know why the previous comments on this bug attribute the
comment to me that this bug might as well be closed and offered some
other wrapper workarounds as I did not say that.  (In fact I never
wanted this bug closed :-)

*** acinclude.m4	Thu Jun  6 11:42:35 2002
--- ../acinclude.m4.orig	Wed Jun  5 12:34:38 2002
***************
*** 707,725 ****
        $2="-R$1 -L$1 [$]$2"
      else
        AC_PHP_ONCE(LIBPATH, $ai_p, [
! 	os=uname -sr 2>/dev/null
! 	case $os in
! 	  "OSF1 V4.0")
! 	    case $CC in
! 	      cc) test -z "$LDFLAGS" && test -n "$ld_runpath_switch"
&&
LDFLAGS="$ld_runpath_switch";
! 		  test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS$ai_p:"; 
! 		  LDFLAGS="-L$ai_p $LDFLAGS";;
! 	       *) test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS
$ld_runpath_switch$ai_p"; 
! 		  LDFLAGS="$LDFLAGS -L$ai_p";;
! 	    esac;;
! 	   *) test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS
$ld_runpath_switch$ai_p"; 
! 	      LDFLAGS="$LDFLAGS -L$ai_p";;
! 	esac
          PHP_RPATHS="$PHP_RPATHS $ai_p"
        ])
      fi
--- 707,714 ----
        $2="-R$1 -L$1 [$]$2"
      else
        AC_PHP_ONCE(LIBPATH, $ai_p, [
!         test -n "$ld_runpath_switch" && LDFLAGS="$LDFLAGS
$ld_runpath_switch$ai_p"
!         LDFLAGS="$LDFLAGS -L$ai_p"
          PHP_RPATHS="$PHP_RPATHS $ai_p"
        ])
      fi
***************
*** 735,760 ****
    if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS";
then
      OLD_RPATHS="$PHP_RPATHS"
      unset PHP_RPATHS
-     os=uname -sr 2>/dev/null
-     case $os in
-       "OSF1 V4.0")
-         case $CC in
-           cc) NATIVE_RPATHS="$ld_runpath_switch";;
-           *) ;;
-         esac;;
-       *) ;;
-     esac
      for i in $OLD_RPATHS; do
        PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
        PHP_RPATHS="$PHP_RPATHS -R $i"
!       case $os in
!         "OSF1 V4.0")
!           case $CC in
!             cc) NATIVE_RPATHS="$NATIVE_RPATHS:$i";;
!             *) NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i";;
!           esac;;
!         *) NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i";;
!       esac
      done
    fi
  ])
--- 724,733 ----
    if test "$PHP_RPATH" = "yes" && test -n "$PHP_RPATHS";
then
      OLD_RPATHS="$PHP_RPATHS"
      unset PHP_RPATHS
      for i in $OLD_RPATHS; do
        PHP_LDFLAGS="$PHP_LDFLAGS -L$i"
        PHP_RPATHS="$PHP_RPATHS -R $i"
!       NATIVE_RPATHS="$NATIVE_RPATHS $ld_runpath_switch$i"
      done
    fi
  ])

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=17702&edit=1



Thread (10 messages)

« previous php.bugs (#12900) next »