Edit report at https://bugs.php.net/bug.php?id=58206&edit=1

 ID:                 58206
 Updated by:         [email protected]
 Reported by:        hborrel at gmail dot com
 Summary:            Cannot compile PDO_ODBC with 
                     --with-pdo_odbc=ibm-db2
-Status:             Open
+Status:             Feedback
 Type:               Bug
-Package:            PDO_ODBC
+Package:            PDO related
 Operating System:   Centos 5.1 x86-64
 PHP Version:        5.1.6
 Block user comment: N
 Private report:     N

 New Comment:

See the part:

/root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:51:23: error: sqltypes.h: No such 
file or directory
/root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:55:23: error: sqlucode.h: No such 
file or directory

Can you find such files in your system?


Previous Comments:
------------------------------------------------------------------------
[2010-09-05 10:10:58] pecl dot 5 dot pete_l at spamgourmet dot com

I've got this problem, too. I doubt that anyone is ever going to fix it, since 
this bug has been open for OVER 2 YEARS and obviously no-one cares about it (or 
has the programming ability to do anything)

------------------------------------------------------------------------
[2010-04-14 09:22:21] plmarcelo at yahoo dot com

I'm having the same error

------------------------------------------------------------------------
[2010-03-10 22:49:56] always dot arvind at gatech dot edu

the same error in installing pdo_odbc by pecl.  

No one else is having this??

In addition to this, php gets broken...

PHP Warning:  Module 'PDO_ODBC' already loaded in Unknown on line 0
PHP Fatal error:  PDO: driver odbc requires PDO API version 20060511; this is 
PDO version 20060409 in Unknown on line 0
PHP Fatal error:  Unable to start PDO_ODBC module in Unknown on line 0

------------------------------------------------------------------------
[2008-09-13 10:04:01] webhiker at mailinator dot com

Confirm identical error trying to pecl install pdo_odbc on Ubuntu Hardy.

------------------------------------------------------------------------
[2008-05-30 13:10:20] hborrel at gmail dot com

Description:
------------
I'm trying to compile PDO_ODBC module on Centos 5.1 x86_64.

I've install DB2 client libraries already.
[root@temp PDO_ODBC-1.0.1]# db2 -v
(c) Copyright IBM Corporation 1993,2002
Command Line Processor for DB2 ADCL 9.1.3

Download PDO_ODBC-1.0.1.tgz and extract.

Then I ran:
phpize
./configure --with-pdo-odbc=ibm-db2 or 
./configure --with-libdir=lib64 --with-pdo-odbc=ibm-db2 

make
/bin/sh /root/pdo/PDO_ODBC-1.0.1/libtool --mode=compile gcc 
-I/usr/include/php/ext  -I/home/db2inst1/sqllib/include 
-DPDO_ODBC_TYPE=\"ibm-db2\" -I. -I/root/pdo/PDO_ODBC-1.0.1 -DPHP_ATOM_INC 
-I/root/pdo/PDO_ODBC-1.0.1/include -I/root/pdo/PDO_ODBC-1.0.1/main 
-I/root/pdo/PDO_ODBC-1.0.1 -I/usr/include/php -I/usr/include/php/main 
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext  
-DHAVE_CONFIG_H  -g -O2   -c /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c -o pdo_odbc.lo 
mkdir .libs
 gcc -I/usr/include/php/ext -I/home/db2inst1/sqllib/include 
-DPDO_ODBC_TYPE=\"ibm-db2\" -I. -I/root/pdo/PDO_ODBC-1.0.1 -DPHP_ATOM_INC 
-I/root/pdo/PDO_ODBC-1.0.1/include -I/root/pdo/PDO_ODBC-1.0.1/main 
-I/root/pdo/PDO_ODBC-1.0.1 -I/usr/include/php -I/usr/include/php/main 
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext 
-DHAVE_CONFIG_H -g -O2 -c /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c  -fPIC -DPIC -o 
.libs/pdo_odbc.o
In file included from /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c:31:
/root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:51:23: error: sqltypes.h: No such 
file or directory
/root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:55:23: error: sqlucode.h: No such 
file or directory
/root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c: In function 'zm_startup_pdo_odbc':
/root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c:132: warning: cast to pointer from integer 
of different size
make: *** [pdo_odbc.lo] Error 1

If I install unixODBC-devel make returns these errors.
/bin/sh /root/pdo/PDO_ODBC-1.0.1/libtool --mode=compile gcc 
-I/usr/include/php/ext  -I/home/db2inst1/sqllib/include 
-DPDO_ODBC_TYPE=\"ibm-db2\" -I. -I/root/pdo/PDO_ODBC-1.0.1 -DPHP_ATOM_INC 
-I/root/pdo/PDO_ODBC-1.0.1/include -I/root/pdo/PDO_ODBC-1.0.1/main 
-I/root/pdo/PDO_ODBC-1.0.1 -I/usr/include/php -I/usr/include/php/main 
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext  
-DHAVE_CONFIG_H  -g -O2   -c /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c -o pdo_odbc.lo 
mkdir .libs
 gcc -I/usr/include/php/ext -I/home/db2inst1/sqllib/include 
-DPDO_ODBC_TYPE=\"ibm-db2\" -I. -I/root/pdo/PDO_ODBC-1.0.1 -DPHP_ATOM_INC 
-I/root/pdo/PDO_ODBC-1.0.1/include -I/root/pdo/PDO_ODBC-1.0.1/main 
-I/root/pdo/PDO_ODBC-1.0.1 -I/usr/include/php -I/usr/include/php/main 
-I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext 
-DHAVE_CONFIG_H -g -O2 -c /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c  -fPIC -DPIC -o 
.libs/pdo_odbc.o
In file included from /root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:51,
                 from /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c:31:
/usr/include/sqltypes.h:212: error: conflicting types for 'SQLHANDLE'
/home/db2inst1/sqllib/include/sqlcli.h:433: error: previous declaration of 
'SQLHANDLE' was here
/usr/include/sqltypes.h:213: error: conflicting types for 'SQLHENV'
/home/db2inst1/sqllib/include/sqlcli.h:434: error: previous declaration of 
'SQLHENV' was here
/usr/include/sqltypes.h:214: error: conflicting types for 'SQLHDBC'
/home/db2inst1/sqllib/include/sqlcli.h:435: error: previous declaration of 
'SQLHDBC' was here
/usr/include/sqltypes.h:215: error: conflicting types for 'SQLHSTMT'
/home/db2inst1/sqllib/include/sqlcli.h:436: error: previous declaration of 
'SQLHSTMT' was here
/usr/include/sqltypes.h:216: error: conflicting types for 'SQLHDESC'
/home/db2inst1/sqllib/include/sqlcli.h:447: error: previous declaration of 
'SQLHDESC' was here
/usr/include/sqltypes.h:263: error: conflicting types for 'SLONG'
/home/db2inst1/sqllib/include/sqlcli.h:333: error: previous declaration of 
'SLONG' was here
/usr/include/sqltypes.h:265: error: conflicting types for 'ULONG'
/home/db2inst1/sqllib/include/sqlcli.h:331: error: previous declaration of 
'ULONG' was here
/usr/include/sqltypes.h:286: error: conflicting types for 'DATE_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:477: error: previous declaration of 
'DATE_STRUCT' was here
/usr/include/sqltypes.h:289: error: conflicting types for 'SQL_DATE_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:479: error: previous declaration of 
'SQL_DATE_STRUCT' was here
/usr/include/sqltypes.h:297: error: conflicting types for 'TIME_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:486: error: previous declaration of 
'TIME_STRUCT' was here
/usr/include/sqltypes.h:300: error: conflicting types for 'SQL_TIME_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:488: error: previous declaration of 
'SQL_TIME_STRUCT' was here
/usr/include/sqltypes.h:312: error: conflicting types for 'TIMESTAMP_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:499: error: previous declaration of 
'TIMESTAMP_STRUCT' was here
/usr/include/sqltypes.h:315: error: conflicting types for 'SQL_TIMESTAMP_STRUCT'
/home/db2inst1/sqllib/include/sqlcli.h:502: error: previous declaration of 
'SQL_TIMESTAMP_STRUCT' was here
/usr/include/sqltypes.h:322: error: redeclaration of enumerator 'SQL_IS_YEAR'
/home/db2inst1/sqllib/include/sqlcli.h:506: error: previous definition of 
'SQL_IS_YEAR' was here
/usr/include/sqltypes.h:323: error: redeclaration of enumerator 'SQL_IS_MONTH'
/home/db2inst1/sqllib/include/sqlcli.h:507: error: previous definition of 
'SQL_IS_MONTH' was here
/usr/include/sqltypes.h:324: error: redeclaration of enumerator 'SQL_IS_DAY'
/home/db2inst1/sqllib/include/sqlcli.h:508: error: previous definition of 
'SQL_IS_DAY' was here
/usr/include/sqltypes.h:325: error: redeclaration of enumerator 'SQL_IS_HOUR'
/home/db2inst1/sqllib/include/sqlcli.h:509: error: previous definition of 
'SQL_IS_HOUR' was here
/usr/include/sqltypes.h:326: error: redeclaration of enumerator 'SQL_IS_MINUTE'
/home/db2inst1/sqllib/include/sqlcli.h:510: error: previous definition of 
'SQL_IS_MINUTE' was here
/usr/include/sqltypes.h:327: error: redeclaration of enumerator 'SQL_IS_SECOND'
/home/db2inst1/sqllib/include/sqlcli.h:511: error: previous definition of 
'SQL_IS_SECOND' was here
/usr/include/sqltypes.h:328: error: redeclaration of enumerator 
'SQL_IS_YEAR_TO_MONTH'
/home/db2inst1/sqllib/include/sqlcli.h:512: error: previous definition of 
'SQL_IS_YEAR_TO_MONTH' was here
/usr/include/sqltypes.h:329: error: redeclaration of enumerator 
'SQL_IS_DAY_TO_HOUR'
/home/db2inst1/sqllib/include/sqlcli.h:513: error: previous definition of 
'SQL_IS_DAY_TO_HOUR' was here
/usr/include/sqltypes.h:330: error: redeclaration of enumerator 
'SQL_IS_DAY_TO_MINUTE'
/home/db2inst1/sqllib/include/sqlcli.h:514: error: previous definition of 
'SQL_IS_DAY_TO_MINUTE' was here
/usr/include/sqltypes.h:331: error: redeclaration of enumerator 
'SQL_IS_DAY_TO_SECOND'
/home/db2inst1/sqllib/include/sqlcli.h:515: error: previous definition of 
'SQL_IS_DAY_TO_SECOND' was here
/usr/include/sqltypes.h:332: error: redeclaration of enumerator 
'SQL_IS_HOUR_TO_MINUTE'
/home/db2inst1/sqllib/include/sqlcli.h:516: error: previous definition of 
'SQL_IS_HOUR_TO_MINUTE' was here
/usr/include/sqltypes.h:333: error: redeclaration of enumerator 
'SQL_IS_HOUR_TO_SECOND'
/home/db2inst1/sqllib/include/sqlcli.h:517: error: previous definition of 
'SQL_IS_HOUR_TO_SECOND' was here
/usr/include/sqltypes.h:335: error: redeclaration of enumerator 
'SQL_IS_MINUTE_TO_SECOND'
/home/db2inst1/sqllib/include/sqlcli.h:519: error: previous definition of 
'SQL_IS_MINUTE_TO_SECOND' was here
/usr/include/sqltypes.h:335: error: conflicting types for 'SQLINTERVAL'
/home/db2inst1/sqllib/include/sqlcli.h:519: error: previous declaration of 
'SQLINTERVAL' was here
/usr/include/sqltypes.h:341: error: redefinition of 'struct tagSQL_YEAR_MONTH'
/usr/include/sqltypes.h:347: error: redefinition of 'struct tagSQL_DAY_SECOND'
/usr/include/sqltypes.h:356: error: redefinition of 'struct 
tagSQL_INTERVAL_STRUCT'
/usr/include/sqltypes.h:414: error: redefinition of 'struct 
tagSQL_NUMERIC_STRUCT'
In file included from /root/pdo/PDO_ODBC-1.0.1/php_pdo_odbc_int.h:55,
                 from /root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c:31:
/usr/include/sqlucode.h:36: error: conflicting types for 'SQLColAttributeW'
/home/db2inst1/sqllib/include/sqlcli1.h:1003: error: previous declaration of 
'SQLColAttributeW' was here
/usr/include/sqlucode.h:45: error: conflicting types for 'SQLColAttributesW'
/home/db2inst1/sqllib/include/sqlcli1.h:1013: error: previous declaration of 
'SQLColAttributesW' was here
/usr/include/sqlucode.h:54: error: conflicting types for 'SQLConnectW'
/home/db2inst1/sqllib/include/sqlcli1.h:1022: error: previous declaration of 
'SQLConnectW' was here
/usr/include/sqlucode.h:66: error: conflicting types for 'SQLDescribeColW'
/home/db2inst1/sqllib/include/sqlcli1.h:1043: error: previous declaration of 
'SQLDescribeColW' was here
/usr/include/sqlucode.h:77: error: conflicting types for 'SQLErrorW'
/home/db2inst1/sqllib/include/sqlcli1.h:1054: error: previous declaration of 
'SQLErrorW' was here
/usr/include/sqlucode.h:82: error: conflicting types for 'SQLExecDirectW'
/home/db2inst1/sqllib/include/sqlcli1.h:1059: error: previous declaration of 
'SQLExecDirectW' was here
/usr/include/sqlucode.h:89: error: conflicting types for 'SQLGetConnectAttrW'
/home/db2inst1/sqllib/include/sqlcli1.h:1066: error: previous declaration of 
'SQLGetConnectAttrW' was here
/usr/include/sqlucode.h:95: error: conflicting types for 'SQLGetCursorNameW'
/home/db2inst1/sqllib/include/sqlcli1.h:1072: error: previous declaration of 
'SQLGetCursorNameW' was here
/usr/include/sqlucode.h:102: error: conflicting types for 'SQLSetDescFieldW'
/home/db2inst1/sqllib/include/sqlcli1.h:1078: error: previous declaration of 
'SQLSetDescFieldW' was here
/usr/include/sqlucode.h:112: error: conflicting types for 'SQLGetDescFieldW'
/home/db2inst1/sqllib/include/sqlcli1.h:1088: error: previous declaration of 
'SQLGetDescFieldW' was here
/usr/include/sqlucode.h:125: error: conflicting types for 'SQLGetDescRecW'
/home/db2inst1/sqllib/include/sqlcli1.h:1101: error: previous declaration of 
'SQLGetDescRecW' was here
/usr/include/sqlucode.h:134: error: conflicting types for 'SQLGetDiagFieldW'
/home/db2inst1/sqllib/include/sqlcli1.h:1110: error: previous declaration of 
'SQLGetDiagFieldW' was here
/usr/include/sqlucode.h:144: error: conflicting types for 'SQLGetDiagRecW'
/home/db2inst1/sqllib/include/sqlcli1.h:1120: error: previous declaration of 
'SQLGetDiagRecW' was here
/usr/include/sqlucode.h:153: error: conflicting types for 'SQLPrepareW'
/home/db2inst1/sqllib/include/sqlcli1.h:1132: error: previous declaration of 
'SQLPrepareW' was here
/usr/include/sqlucode.h:159: error: conflicting types for 'SQLSetConnectAttrW'
/home/db2inst1/sqllib/include/sqlcli1.h:1147: error: previous declaration of 
'SQLSetConnectAttrW' was here
/usr/include/sqlucode.h:164: error: conflicting types for 'SQLSetCursorNameW'
/home/db2inst1/sqllib/include/sqlcli1.h:1152: error: previous declaration of 
'SQLSetCursorNameW' was here
/usr/include/sqlucode.h:181: error: conflicting types for 'SQLColumnsW'
/home/db2inst1/sqllib/include/sqlcli1.h:1169: error: previous declaration of 
'SQLColumnsW' was here
/usr/include/sqlucode.h:186: error: conflicting types for 'SQLGetConnectOptionW'
/home/db2inst1/sqllib/include/sqlcli1.h:1181: error: previous declaration of 
'SQLGetConnectOptionW' was here
/usr/include/sqlucode.h:195: error: conflicting types for 'SQLGetInfoW'
/home/db2inst1/sqllib/include/sqlcli1.h:1176: error: previous declaration of 
'SQLGetInfoW' was here
/usr/include/sqlucode.h:199: error: conflicting types for 'SQLGetTypeInfoW'
/home/db2inst1/sqllib/include/sqlcli1.h:1190: error: previous declaration of 
'SQLGetTypeInfoW' was here
/usr/include/sqlucode.h:205: error: conflicting types for 'SQLSetConnectOptionW'
/home/db2inst1/sqllib/include/sqlcli1.h:1186: error: previous declaration of 
'SQLSetConnectOptionW' was here
/usr/include/sqlucode.h:218: error: conflicting types for 'SQLSpecialColumnsW'
/home/db2inst1/sqllib/include/sqlcli1.h:1202: error: previous declaration of 
'SQLSpecialColumnsW' was here
/usr/include/sqlucode.h:229: error: conflicting types for 'SQLStatisticsW'
/home/db2inst1/sqllib/include/sqlcli1.h:1213: error: previous declaration of 
'SQLStatisticsW' was here
/usr/include/sqlucode.h:240: error: conflicting types for 'SQLTablesW'
/home/db2inst1/sqllib/include/sqlcli1.h:1224: error: previous declaration of 
'SQLTablesW' was here
/usr/include/sqlucode.h:252: error: conflicting types for 'SQLDataSourcesW'
/home/db2inst1/sqllib/include/sqlcli1.h:1236: error: previous declaration of 
'SQLDataSourcesW' was here
/usr/include/sqlucode.h:265: error: conflicting types for 'SQLDriverConnectW'
/home/db2inst1/sqllib/include/sqlcli1.h:1249: error: previous declaration of 
'SQLDriverConnectW' was here
/usr/include/sqlucode.h:274: error: conflicting types for 'SQLBrowseConnectW'
/home/db2inst1/sqllib/include/sqlcli1.h:1258: error: previous declaration of 
'SQLBrowseConnectW' was here
/usr/include/sqlucode.h:285: error: conflicting types for 'SQLColumnPrivilegesW'
/home/db2inst1/sqllib/include/sqlcli1.h:1269: error: previous declaration of 
'SQLColumnPrivilegesW' was here
/usr/include/sqlucode.h:292: error: conflicting types for 'SQLGetStmtAttrW'
/home/db2inst1/sqllib/include/sqlcli1.h:1276: error: previous declaration of 
'SQLGetStmtAttrW' was here
/usr/include/sqlucode.h:298: error: conflicting types for 'SQLSetStmtAttrW'
/home/db2inst1/sqllib/include/sqlcli1.h:1282: error: previous declaration of 
'SQLSetStmtAttrW' was here
/usr/include/sqlucode.h:313: error: conflicting types for 'SQLForeignKeysW'
/home/db2inst1/sqllib/include/sqlcli1.h:1297: error: previous declaration of 
'SQLForeignKeysW' was here
/usr/include/sqlucode.h:322: error: conflicting types for 'SQLNativeSqlW'
/home/db2inst1/sqllib/include/sqlcli1.h:1306: error: previous declaration of 
'SQLNativeSqlW' was here
/usr/include/sqlucode.h:332: error: conflicting types for 'SQLPrimaryKeysW'
/home/db2inst1/sqllib/include/sqlcli1.h:1316: error: previous declaration of 
'SQLPrimaryKeysW' was here
/usr/include/sqlucode.h:343: error: conflicting types for 'SQLProcedureColumnsW'
/home/db2inst1/sqllib/include/sqlcli1.h:1327: error: previous declaration of 
'SQLProcedureColumnsW' was here
/usr/include/sqlucode.h:352: error: conflicting types for 'SQLProceduresW'
/home/db2inst1/sqllib/include/sqlcli1.h:1336: error: previous declaration of 
'SQLProceduresW' was here
/usr/include/sqlucode.h:362: error: conflicting types for 'SQLTablePrivilegesW'
/home/db2inst1/sqllib/include/sqlcli1.h:1346: error: previous declaration of 
'SQLTablePrivilegesW' was here
/root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c: In function 'zm_startup_pdo_odbc':
/root/pdo/PDO_ODBC-1.0.1/pdo_odbc.c:132: warning: cast to pointer from integer 
of different size
make: *** [pdo_odbc.lo] Error 1




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=58206&edit=1

Reply via email to