From: roman dot vanicek at gmail dot com
Operating system: Ubuntu Linux 6.06
PHP version: 5.2.3
PHP Bug Type: Compile Failure
Bug description: PDO_ODBC module linking fails with iODBC
Description:
------------
I want to compile PHP with PDO_ODBC against iODBC.
Configure settings:
--with-pdo-odbc=generic,/usr,iodbc
Configure works fine, compilation too but during the linking phase, i am
getting this error:
/bin/sh: -c: line 0: syntax error near unexpected token `('
The problem is in the Makfile generated by configure. The parantheses
probably need to be quoted (or not used at all).
If I change these parameters (3 times in the Makefile)
-DPDO_ODBC_TYPE=\"generic (iodbc)\"
manually to
-DPDO_ODBC_TYPE=\"generic-iodbc\"
then it works like a charm :-)
Probably it would be best to fix the code that generates the Makefile
without parantheses ("generic","generic-iodbc" works, on the other hand
"generic - iodbc","generic iodbc" does not work).
Reproduce code:
---------------
./configure --with-pdo-odbc=generic,/usr,iodbc
make
Expected result:
----------------
Build complete.
Actual result:
--------------
/bin/sh /root/build/php/php-5.2.3/libtool --silent --preserve-dup-deps
--mode=compile gcc -I/root/build/php/php-5.2.3/ext -I/usr/include
-DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib -I/usr/include/freetype2
-I/root/build/php/php-5.2.3/ext/mbstring/oniguruma
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl/mbfl
-I/usr/local/lib/oracli/sdk/include -I/root/build/bin/freetds/include
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend
-I/usr/include -g -O2 -c /root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c
-o ext/pdo_odbc/pdo_odbc.lo
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `/bin/sh /root/build/php/php-5.2.3/libtool --silent
--preserve-dup-deps --mode=compile gcc -I/root/build/php/php-5.2.3/ext
-I/usr/include -DPDO_ODBC_TYPE=\"generic (iodbc)\" -Iext/pdo_odbc/
-I/root/build/php/php-5.2.3/ext/pdo_odbc/ -DPHP_ATOM_INC
-I/root/build/php/php-5.2.3/include -I/root/build/php/php-5.2.3/main
-I/root/build/php/php-5.2.3 -I/usr/include/libxml2
-I/root/build/php/php-5.2.3/ext/date/lib -I/usr/include/freetype2
-I/root/build/php/php-5.2.3/ext/mbstring/oniguruma
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl
-I/root/build/php/php-5.2.3/ext/mbstring/libmbfl/mbfl
-I/usr/local/lib/oracli/sdk/include -I/root/build/bin/freetds/include
-I/root/build/php/php-5.2.3/TSRM -I/root/build/php/php-5.2.3/Zend
-I/usr/include -g -O2 -c /root/build/php/php-5.2.3/ext/pdo_odbc/pdo_odbc.c
-o ext/pdo_odbc/pdo_odbc.lo '
make: *** [ext/pdo_odbc/pdo_odbc.lo] Error 2
--
Edit bug report at http://bugs.php.net/?id=41870&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=41870&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=41870&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=41870&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41870&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=41870&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41870&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41870&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41870&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41870&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41870&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=41870&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=41870&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41870&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41870&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41870&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41870&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41870&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41870&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41870&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41870&r=mysqlcfg