|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-07-02 09:43 UTC] roman dot vanicek at gmail dot com
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
I propose this patch: --- /bkp/config.m4 2007-07-03 09:31:27.000000000 +0200 +++ config.m4 2007-07-03 11:49:31.000000000 +0200 @@ -89,7 +89,7 @@ pdo_odbc_def_lib="`echo $PHP_PDO_ODBC | cut -d, -f3`" pdo_odbc_def_ldflags="`echo $PHP_PDO_ODBC | cut -d, -f4`" pdo_odbc_def_cflags="`echo $PHP_PDO_ODBC | cut -d, -f5`" - pdo_odbc_flavour="$pdo_odbc_flavour ($pdo_odbc_def_lib)" + pdo_odbc_flavour="$pdo_odbc_flavour-$pdo_odbc_def_lib" ;; *)