ID: 32649 Updated by: [EMAIL PROTECTED] Reported By: dan dot scott at ca dot ibm dot com -Status: Open +Status: Bogus Bug Type: ODBC related Operating System: Red Hat Enterprise Linux 4.0 PHP Version: 5CVS-2005-04-09 (dev) New Comment:
There is no bug here. Usually when you build something, you build it within same environment you RUN it. Some programs REQUIRE this. Before we've used flawed 'if-file-with-this-name-exist-assume-it-is-the-library' which of course won't work for everyone. The current behaviour is the correct one and that will not be changed. We will actually change all the places with the flawed method to use the correct one so you can expect other extensions to "break" also. (unless your LD_LIBRARY_PATH is correct) And doesn't that IBM-DB2 add it's libline into /etc/ld.so.conf?? Previous Comments: ------------------------------------------------------------------------ [2005-04-09 21:58:53] dan dot scott at ca dot ibm dot com 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 this bug report at http://bugs.php.net/?id=32649&edit=1