|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-06-11 11:42 UTC] long at kestrel dot cc dot ukans dot 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 ]) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 07:00:02 2025 UTC |
Still not quite right, here's a part of the output from: env LD='/usr/bin/ld -taso' CFLAGS=-taso CC=cc CXX=cxx ./configure --with-openssl --enable-bcmath --with-ndbm --with-dbm --enable-dbase --enable-filepro --enable-ftp --with-gd --with-ttf --with-java=/usr/opt/java130 --with-ldap=/usr/local/ldap --with-mysql --with-oci8 --with-oracle --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-wddx --enable-dba=shared --enable-calendar --enable-exif --enable-discard-path --enable-dbx --enable-ctype --with-hyperwave --enable-mailparse --enable-mbstring --enable-mbstr-enc-trans --enable-memory-limit checking whether pwrite works without custom declaration... 10346:./conftest: /sbin/loader: Fatal Error: cannot map libldapssl30.so no Here's the corresponding portion of config.log: configure:61711: checking whether pwrite works without custom declaration configure:61724: cc -c -taso conftest.c 1>&5 cc: Error: configure, line 61720: In the initializer for func, "pwrite" is not declared. (undeclared) size_t (*func)() = pwrite -------------------^ configure: failed program was: #line 61717 "configure" #include "confdefs.h" #include <unistd.h> int main() { size_t (*func)() = pwrite ; return 0; } configure:61749: cc -o conftest -taso -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha/classic -L/usr/opt/java130/./jre/lib/alpha/classic -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha/native_threads -L/usr/opt/java130/./jre/lib/alpha/native_threads -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha -L/usr/opt/java130/./jre/lib/alpha -Wl,-rpath,/usr/local/ldap/lib -L/usr/local/ldap/lib -Wl,-rpath,/home/oracle/u01/app/oracle/product/8.0.5/lib -L/home/oracle/u01/app/oracle/product/8.0.5/lib conftest.c -lclntsh -lpsa -lcore4 -lnlsrtl3 -lm -laio -lrt -lmld -lexc -lclntsh -lpsa -lcore4 -lnlsrtl3 -lm -laio -lrt -lmld -lexc -lldapssl30 -ljava -lgd -lttf -lssl -lcrypto -lresolv -lm -lresolv 1>&5 configure: failed program was: #line 61740 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> main() { return !(pwrite(open("conftest_out", O_WRONLY|O_CREAT, 0600), "Ok", 2, 0) == 2); } configure:61774: cc -o conftest -taso -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha/classic -L/usr/opt/java130/./jre/lib/alpha/classic -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha/native_threads -L/usr/opt/java130/./jre/lib/alpha/native_threads -Wl,-rpath,/usr/opt/java130/./jre/lib/alpha -L/usr/opt/java130/./jre/lib/alpha -Wl,-rpath,/usr/local/ldap/lib -L/usr/local/ldap/lib -Wl,-rpath,/home/oracle/u01/app/oracle/product/8.0.5/lib -L/home/oracle/u01/app/oracle/product/8.0.5/lib conftest.c -lclntsh -lpsa -lcore4 -lnlsrtl3 -lm -laio -lrt -lmld -lexc -lclntsh -lpsa -lcore4 -lnlsrtl3 -lm -laio -lrt -lmld -lexc -lldapssl30 -ljava -lgd -lttf -lssl -lcrypto -lresolv -lm -lresolv 1>&5 cc: Error: configure, line 61769: Ill-formed parameter type list. (parmtyplist) ssize_t pwrite(int, void *, size_t, off64_t); --------------------------------------------^ configure: failed program was: #line 61763 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> ssize_t pwrite(int, void *, size_t, off64_t); main() { return !(pwrite(open("conftest_out", O_WRONLY|O_CREAT, 0600), "Ok", 2, 0) == 2); } Once again, the problem is that the compaq C compiler cannot handle multiple -Wl,-rpath components like configure is trying to use.When I configure as: env CFLAGS="-std1 -taso" CC=cc CXX=cxx ./configure --with-openssl --enable-bcmath --with-ndbm --with-dbm --enable-dbase --enable-filepro --enable-ftp --with-gd --with-ttf --with-java=/usr/opt/java130 --with-mysql --with-oci8 --with-oracle --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-wddx --enable-dba=shared --enable-calendar --enable-exif --enable-discard-path --enable-dbx --enable-ctype --with-hyperwave --enable-mailparse --enable-mbstring --enable-mbstr-enc-trans --enable-memory-limit --with-ldap=/usr/local/ldap Then in my config.log I get: configure:65780: checking for standard DES crypt configure:65806: cc -o conftest -std1 -taso -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/opt/java130/jre/lib/alpha/classic -L/usr/opt/java130/jre/lib/alpha/classic -Wl,-rpath,/usr/opt/java130/jre/lib/alpha/native_threads -L/usr/opt/java130/jre/lib/alpha/native_threads -Wl,-rpath,/usr/opt/java130/jre/lib/alpha -L/usr/opt/java130/jre/lib/alpha -Wl,-rpath,/usr/local/ldap/lib -L/usr/local/ldap/lib -Wl,-rpath,/home/oracle/u01/app/oracle/product/8.0.5/lib -L/home/oracle/u01/app/oracle/product/8.0.5/lib conftest.c -lclntsh -lpsa -lcore4 -lnlsrtl3 -lclntsh -lpsa -lcore4 -lnlsrtl3 -lldapssl30 -ljava -lgd -lttf -lssl -lcrypto -lm -lexc -lmld -lrt -laio -lm -lexc -lmld -lrt -laio -lm 1>&5 configure: failed program was: #line 65791 "configure" #include "confdefs.h" #if HAVE_CRYPT_H #include <crypt.h> #endif main() { #if HAVE_CRYPT exit (strcmp((char *)crypt("rasmuslerdorf","rl"),"rl.3StKT.4T8M")); #else exit(0); #endif } and the output to the screen is: checking for standard DES crypt... 30302:./conftest: /sbin/loader: Fatal Error: cannot map libldapssl30.so no It is failing because the Compaq C compiler does not like having separate -Wl,-rpath components. It wants all the rpaths combined into a single unit, e.g.: -Wl,-rpath,/usr/local/ssl/lib,/usr/local/lib,-rpath,/usr/opt/java130/jre/lib/alpha/classic,/usr/opt/java130/jre/lib/alpha/native_threads,/usr/opt/java130/jre/lib/alpha,/usr/local/ldap/lib,/home/oracle/u01/app/oracle/product/8.0.5/lib