From: dan dot scott at ca dot ibm dot com Operating system: Red Hat Enterprise Linux 4.0 PHP version: 5CVS-2005-04-09 (dev) PHP Bug Type: ODBC related Bug description: config.m4 change breaks --with-ibm-db2 configure option
Description: ------------ Revision 1.70 breaks Unified ODBC compile against IBM DB2 on Linux (RHEL 4.0) if user has not sourced their DB2 environment. Reproduce code: --------------- Configure options: ./configure --without-sqlite --with-ibm-db2=/home/db2inst1/sqllib --with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib Expected result: ---------------- I expect configure to find the DB2 header files and libraries, have its requirements satisfied, and complete the configuration. This configure line has worked for at least five years (well, okay, drop the sqlite and pdo-odbc parts). Actual result: -------------- The configure command results in: checking for IBM DB2 support... no configure: error: build test failed. Please check the config.log for details. config.log notes that the gconftest failed because it cannot load libdb2.so.1. Why does this occur now? Due to the recent changes to the config.m4 file (to provide better cross-platform support), a stricter and not at all obvious requirement has been introduced: the user must now source the DB2 environment before running ./configure. If the user has sourced the $IBM_DB2/db2profile in their environment first, then the ./configure command succeeds. The reason is that one of the environment changes db2profile makes is to modify LD_LIBRARY_PATH and LIBPATH in the user's environment to include the DB2 libraries. If you want to keep the current, stricter, behavior, I would strongly urge you to change the 'build test failed' message to include a suggestion along the lines of: 'Perhaps you need to source your DB2 environment: (. $IBM_DB2/db2profile) before configuring PHP.' You could try modifying config.m4 to source the DB2 environment before attempting to compile gconftest, but that will fail if the user has pointed to /opt/IBM/db2/V8.1 instead of to a DB2 instance user. You could also try modifying LD_LIBRARY_PATH, LIBPATH, etc. before attempting to compile gconftest -- although that will likely introduce more cross-platform issues. -- Edit bug report at http://bugs.php.net/?id=32649&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32649&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32649&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32649&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32649&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32649&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32649&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32649&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32649&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32649&r=support Expected behavior: http://bugs.php.net/fix.php?id=32649&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32649&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32649&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32649&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32649&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32649&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32649&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32649&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32649&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32649&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32649&r=mysqlcfg