ID: 42299 Updated by: [EMAIL PROTECTED] Reported By: volkmar dot glauche at uniklinik-freiburg dot de Status: Feedback Bug Type: Compile Failure Operating System: Gentoo Linux PHP Version: 5.2CVS-2007-08-05 New Comment:
I committed a fix for the --disable-rpath in CVS now. No runpath switch will be used when --disable-rpath is used, anywhere. Previous Comments: ------------------------------------------------------------------------ [2007-08-20 13:58:43] [EMAIL PROTECTED] Provide the shortest possible configure line which causes this problem. ------------------------------------------------------------------------ [2007-08-20 12:47:03] volkmar dot glauche at uniklinik-freiburg dot de This does not seem to work... Attached a snippet from config.log: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.61. Invocation command line was $ ./configure --prefix=/usr/lib/php5 --host=i686-pc-linux-gnu --mandir=/usr/lib/php5/man --infodir=/usr/lib/php5/info --sysconfdir=/etc --cache-file=./config.cache --enable-cli --disable-cgi --with-config-file-path=/etc/php/cli-php5 --with-config-file-scan-dir=/etc/php/cli-php5/ext-active --without-pear --enable-bcmath=shared --with-bz2=shared --enable-calendar=shared --with-curl=shared --with-curlwrappers --enable-dbase=shared --enable-exif=shared --without-fbsql --with-fdftk=shared,/opt/fdftk-6.0 --disable-filter --enable-ftp=shared --with-gettext=shared --with-gmp=shared --disable-hash --disable-json --with-kerberos=/usr --enable-mbstring=shared --with-mcrypt=shared --with-mhash=shared --without-msql --without-mssql --with-ncurses=shared --with-openssl --with-openssl-dir=/usr --enable-pcntl=shared --disable-pdo --without-pgsql --with-pspell=shared --with-recode=shared --disable-reflection --disable-shmop --without-snmp --enable-soap=shared --enable-sockets=shared --without-sybase --without-sybase-ct --enable-sysvmsg=shared --enable-sysvsem=shared --enable-sysvshm=shared --with-tidy=shared --disable-wddx --disable-xmlreader --disable-xmlwriter --with-xmlrpc=shared --with-xsl=shared --disable-zip --with-zlib=shared --disable-debug --enable-dba=shared --without-cdb --with-db4 --with-flatfile --with-gdbm --with-inifile --without-qdbm --with-freetype-dir=/usr --with-t1lib=/usr --disable-gd-jis-conv --with-jpeg-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr/X11R6 --with-gd --with-interbase=/usr --with-ldap=shared --without-ldap-sasl --without-mysqli --without-readline --with-libedit --without-mm --with-sqlite=/usr --enable-sqlite-utf8 --disable-rpath ... snip configure:4519: checking if compiler supports -Wl,-rpath, configure:4548: i686-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=pentium4 conftest.c -Wl,-rpath,/usr/lib >&5 configure:4554: $? = 0 configure:4573: result: yes ... snip (just one of many occurrences of -Wl,-rpath in config.log) configure:105936: i686-pc-linux-gnu-gcc -o conftest -I/usr/include -O2 -pipe -march=pentium4 -L/usr/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib conftest.c -ledit -lncurses -lfbclient -lt1 -lfreetype -lX11 -lXpm -lpng -lz -ljpeg -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lgssapi -lkrb5 -lcom_err -lssl -lcrypto -ldl -lxml2 -lz -lm >&5 conftest.c: In function 'main': conftest.c:370: warning: incompatible implicit declaration of built-in function 'exit' configure:105939: $? = 0 configure:105945: ./conftest ./conftest: error while loading shared libraries: /usr/X11R6/lib/libedit.so: invalid ELF header configure:105948: $? = 127 configure: program exited with status 127 ------------------------------------------------------------------------ [2007-08-20 10:03:30] [EMAIL PROTECTED] So disable it: [EMAIL PROTECTED] php-5.2]$ ./configure --help |grep rpath --disable-rpath Disable passing additional runtime library ------------------------------------------------------------------------ [2007-08-20 09:48:38] vapier at gentoo dot org instead of going into pointless distro bashing, why dont you actually review the issue ... this is not a Gentoo specific problem nor are there any "Gentoo hacks" in place here. the problem is that the php script incorrectly throws -rpath's into binaries without checking to see if they are actually needed. it starts with the -lXpm check coming from ext/gd/config.m4 but quickly filters down into PHP_ADD_LIBRARY_WITH_PATH in the acinclude.m4. that function should really test to see if the -L and/or -rpath is needed in the first place: (1) see if the requested -llib works (2) see if the requested -llib + -Lpath works (3) see if the requested -llib + -Lpath + -Wl,-rpath,path works ------------------------------------------------------------------------ [2007-08-16 10:28:25] [EMAIL PROTECTED] Using proper configure line and not defining any LDFLAGS/CFLAGS when not necessary works just fine. And only -Wl, rpath stuff is in configure to check whether compiler supports it or not. For me configure works just fine under Fedora. If Gentoo chooses to do some hacks of their own, that is none of our business. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/42299 -- Edit this bug report at http://bugs.php.net/?id=42299&edit=1