|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-17 12:59 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 21:00:01 2025 UTC |
Using the php rpm from RH7 and recomliling on RH6.x produces the following configure error checking whether to include GNU gettext support... yes checking for bindtextdomain in -lintl... no checking for bindtextdomain in -lc... no configure: error: Unable to find required gettext library Where gettext IS there. ./configure ... --with-db2 and --with-db3 ... is used, but db2 and db3 are not installed on the system earlier in configure output ... checking for db_create in -ldb... no checking for db_create in -ldb-3... no ... They are not found, But -l gets added the $LIBS After much testing this is a fix. --- aclocal.m4.pricegrabber Fri Dec 15 15:48:32 2000 +++ aclocal.m4 Fri Dec 15 15:47:56 2000 @@ -557,7 +557,7 @@ dnl AC_DEFUN(AC_ADD_LIBRARY,[ case "$1" in - c|c_r|pthread*) ;; + c|c_r|pthread*|'') ;; *) ifelse($3,,[ PHP_X_ADD_LIBRARY($1,$2,LIBS) What happens is the case statment will fall through if the tests are false. IT falls through with an empty $THIS_LIBS variable --from configure case "$THIS_LIBS" in c|c_r|pthread*) ;; *) LIBS="-l$THIS_LIBS $LIBS" ;; esac ---end from if LIBS=-lfoo -lbar when $THIS_LIBS is empty you end up with LIBS="-l -lfoo -lbar" the next compile test tries to use these libraries i.e. configure:16753: checking for bindtextdomain in -lc configure:16772: gcc -o conftest -O2 -march=i686 -fPIC -L/usr/lib conftest.c -lc -lttf -ljpeg -lgd -l -ldb -lgdbm -lresolv -lm -ldl -lcrypt -lnsl -lttf -lpng -ljpeg -lz -lresolv -L/usr/lib -ljpeg 1>&5 /usr/bin/ld: cannot open -l-ldb: No such file or directory -lgd -l -ldb -lgdbm ends up -lgd -l-ldb -lgdbm The solution is for the case statement to handle a NULL or empty case case ... c|c_r|pthread*|'') ;; This IMHO, is a nasty bug and took me several hours to find. p.s. I like getting my name in READMEs and CHANGELOGS :)