gcc -I/usr/include -Iext/odbc/ -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/ -DPHP_ATOM_INC -I/var/tmp/portage/php- 4.3.4-r1/work/php-4.3.4/include -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/main -I/var/tmp/portage/php-4.3.4-r1/work/php-4 .3.4 -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/Zend -I/usr/include/libxml2 -I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/imap -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/mbstring/mbregex -I/var/tmp/portage/php-4.3.4-r1/work/p hp-4.3.4/ext/mbstring/libmbfl -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I /usr/qt/3/include -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/xml/expat -I/var/tmp/portage/php-4.3.4-r1/work/php-4.3.4 /TSRM -march=pentium2 -O3 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4 -c /var/tmp/portage/php-4. 3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c -o ext/odbc/php_odbc.o && echo > ext/odbc/php_odbc.lo In file included from /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:118, from /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:37: /usr/include/sql.h:565: error: syntax error before "SQLAllocConnect" /usr/include/sql.h:565: error: syntax error before "EnvironmentHandle" /usr/include/sql.h:568: error: syntax error before "SQLAllocEnv" /usr/include/sql.h:568: error: syntax error before '*' token /usr/include/sql.h:575: error: syntax error before "SQLAllocStmt" /usr/include/sql.h:575: error: syntax error before "ConnectionHandle" /usr/include/sql.h:578: error: syntax error before "SQLBindCol" /usr/include/sql.h:578: error: syntax error before "StatementHandle" /usr/include/sql.h:591: error: syntax error before "SQLCancel" /usr/include/sql.h:591: error: syntax error before "StatementHandle" /usr/include/sql.h:603: error: syntax error before "SQLColumns" /usr/include/sql.h:603: error: syntax error before "StatementHandle" /usr/include/sql.h:610: error: syntax error before "SQLConnect" /usr/include/sql.h:610: error: syntax error before "ConnectionHandle" /usr/include/sql.h:620: error: syntax error before "SQLDataSources" /usr/include/sql.h:620: error: syntax error before "EnvironmentHandle" /usr/include/sql.h:626: error: syntax error before "SQLDescribeCol" /usr/include/sql.h:626: error: syntax error before "StatementHandle" /usr/include/sql.h:632: error: syntax error before "SQLDisconnect" /usr/include/sql.h:632: error: syntax error before "ConnectionHandle" /usr/include/sql.h:639: error: syntax error before "SQLError" /usr/include/sql.h:639: error: syntax error before "EnvironmentHandle" /usr/include/sql.h:645: error: syntax error before "SQLExecDirect" /usr/include/sql.h:645: error: syntax error before "StatementHandle" /usr/include/sql.h:648: error: syntax error before "SQLExecute" /usr/include/sql.h:648: error: syntax error before "StatementHandle" /usr/include/sql.h:650: error: syntax error before "SQLFetch" /usr/include/sql.h:650: error: syntax error before "StatementHandle" /usr/include/sql.h:657: error: syntax error before "SQLFreeConnect" /usr/include/sql.h:657: error: syntax error before "ConnectionHandle" /usr/include/sql.h:659: error: syntax error before "SQLFreeEnv" /usr/include/sql.h:659: error: syntax error before "EnvironmentHandle" /usr/include/sql.h:665: error: syntax error before "SQLFreeStmt" /usr/include/sql.h:665: error: syntax error before "StatementHandle" /usr/include/sql.h:674: error: syntax error before "SQLGetConnectOption" /usr/include/sql.h:674: error: syntax error before "ConnectionHandle" /usr/include/sql.h:677: error: syntax error before "SQLGetCursorName" /usr/include/sql.h:677: error: syntax error before "StatementHandle" /usr/include/sql.h:681: error: syntax error before "SQLGetData" /usr/include/sql.h:681: error: syntax error before "StatementHandle" /usr/include/sql.h:714: error: syntax error before "SQLGetFunctions" /usr/include/sql.h:714: error: syntax error before "ConnectionHandle" /usr/include/sql.h:717: error: syntax error before "SQLGetInfo" /usr/include/sql.h:717: error: syntax error before "ConnectionHandle" /usr/include/sql.h:727: error: syntax error before "SQLGetStmtOption" /usr/include/sql.h:727: error: syntax error before "StatementHandle" /usr/include/sql.h:730: error: syntax error before "SQLGetTypeInfo" /usr/include/sql.h:730: error: syntax error before "StatementHandle" /usr/include/sql.h:733: error: syntax error before "SQLNumResultCols" /usr/include/sql.h:733: error: syntax error before "StatementHandle" /usr/include/sql.h:736: error: syntax error before "SQLParamData" /usr/include/sql.h:736: error: syntax error before "StatementHandle" /usr/include/sql.h:739: error: syntax error before "SQLPrepare" /usr/include/sql.h:739: error: syntax error before "StatementHandle" /usr/include/sql.h:742: error: syntax error before "SQLPutData" /usr/include/sql.h:742: error: syntax error before "StatementHandle" /usr/include/sql.h:745: error: syntax error before "SQLRowCount" /usr/include/sql.h:745: error: syntax error before "StatementHandle" /usr/include/sql.h:754: error: syntax error before "SQLSetConnectOption" /usr/include/sql.h:754: error: syntax error before "ConnectionHandle" /usr/include/sql.h:757: error: syntax error before "SQLSetCursorName" /usr/include/sql.h:757: error: syntax error before "StatementHandle" /usr/include/sql.h:777: error: syntax error before "SQLSetParam" /usr/include/sql.h:777: error: syntax error before "StatementHandle" /usr/include/sql.h:789: error: syntax error before "SQLSetStmtOption" /usr/include/sql.h:789: error: syntax error before "StatementHandle" /usr/include/sql.h:792: error: syntax error before "SQLSpecialColumns" /usr/include/sql.h:792: error: syntax error before "StatementHandle" /usr/include/sql.h:799: error: syntax error before "SQLStatistics" /usr/include/sql.h:799: error: syntax error before "StatementHandle" /usr/include/sql.h:805: error: syntax error before "SQLTables" /usr/include/sql.h:805: error: syntax error before "StatementHandle" /usr/include/sql.h:811: error: syntax error before "SQLTransact" /usr/include/sql.h:811: error: syntax error before "EnvironmentHandle" In file included from /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:119, from /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:37: /usr/include/sqlext.h:1711: error: syntax error before "SQLDriverConnect" /usr/include/sqlext.h:1712: error: syntax error before "hdbc" /usr/include/sqlext.h:1819: error: syntax error before "SQLBrowseConnect" /usr/include/sqlext.h:1820: error: syntax error before "hdbc" /usr/include/sqlext.h:1833: error: syntax error before "SQLColAttributes" /usr/include/sqlext.h:1834: error: syntax error before "hstmt" /usr/include/sqlext.h:1842: error: syntax error before "SQLColumnPrivileges" /usr/include/sqlext.h:1843: error: syntax error before "hstmt" /usr/include/sqlext.h:1853: error: syntax error before "SQLDescribeParam" /usr/include/sqlext.h:1854: error: syntax error before "hstmt" /usr/include/sqlext.h:1861: error: syntax error before "SQLExtendedFetch" /usr/include/sqlext.h:1862: error: syntax error before "hstmt" /usr/include/sqlext.h:1868: error: syntax error before "SQLForeignKeys" /usr/include/sqlext.h:1869: error: syntax error before "hstmt" /usr/include/sqlext.h:1883: error: syntax error before "SQLMoreResults" /usr/include/sqlext.h:1884: error: syntax error before "hstmt" /usr/include/sqlext.h:1886: error: syntax error before "SQLNativeSql" /usr/include/sqlext.h:1887: error: syntax error before "hdbc" /usr/include/sqlext.h:1894: error: syntax error before "SQLNumParams" /usr/include/sqlext.h:1895: error: syntax error before "hstmt" /usr/include/sqlext.h:1898: error: syntax error before "SQLParamOptions" /usr/include/sqlext.h:1899: error: syntax error before "hstmt" /usr/include/sqlext.h:1903: error: syntax error before "SQLPrimaryKeys" /usr/include/sqlext.h:1904: error: syntax error before "hstmt" /usr/include/sqlext.h:1912: error: syntax error before "SQLProcedureColumns" /usr/include/sqlext.h:1913: error: syntax error before "hstmt" /usr/include/sqlext.h:1923: error: syntax error before "SQLProcedures" /usr/include/sqlext.h:1924: error: syntax error before "hstmt" /usr/include/sqlext.h:1932: error: syntax error before "SQLSetPos" /usr/include/sqlext.h:1933: error: syntax error before "hstmt" /usr/include/sqlext.h:1938: error: syntax error before "SQLTablePrivileges" /usr/include/sqlext.h:1939: error: syntax error before "hstmt" /usr/include/sqlext.h:1947: error: syntax error before "SQLDrivers" /usr/include/sqlext.h:1948: error: syntax error before "henv" /usr/include/sqlext.h:1957: error: syntax error before "SQLBindParameter" /usr/include/sqlext.h:1958: error: syntax error before "hstmt" /usr/include/sqlext.h:2022: error: syntax error before "SQLSetScrollOptions" /usr/include/sqlext.h:2023: error: syntax error before "hstmt" /usr/include/sqlext.h:2038: error: syntax error before "TraceCloseLogFile" /usr/include/sqlext.h:2040: error: syntax error before "TraceReturn" /usr/include/sqlext.h:2044: error: syntax error before "TraceVersion" /usr/include/sqlext.h:2052: error: syntax error before "TraceVSControl" /usr/include/sqlext.h:2066: error: syntax error before "DWORD" /usr/include/sqlext.h:2068: error: syntax error before "WCHAR" /usr/include/sqlext.h:2070: error: syntax error before '}' token /usr/include/sqlext.h:2072: error: syntax error before "WCHAR" /usr/include/sqlext.h:2074: error: syntax error before '}' token /usr/include/sqlext.h:2075: error: syntax error before "RetCode" /usr/include/sqlext.h:2078: error: syntax error before "FireVSDebugEvent" In file included from /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:37: /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:208: error: syntax error before "SQLHANDLE" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:208: warning: no semicolon at end of struct or union /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:209: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:214: error: syntax error before '}' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:214: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:220: error: syntax error before "SDWORD" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:220: warning: no semicolon at end of struct or union /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:221: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:224: error: syntax error before "SQLHANDLE" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:224: warning: no semicolon at end of struct or union /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:226: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:226: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:227: error: syntax error before "numcols" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:227: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:228: error: syntax error before "numparams" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:228: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:235: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:235: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:236: error: syntax error before '}' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:236: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:257: error: syntax error before "odbc_result" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:258: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:258: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:260: error: syntax error before "HDBC" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:261: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:261: warning: data definition has no type or storage class /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:263: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc_includes.h:267: error: syntax error before '*' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c: In function `_free_odbc_result': /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:165: error: `res' undeclared (first use in this function) /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:165: error: (Each undeclared identifier is reported only once /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:165: error: for each function it appears in.) /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:165: error: syntax error before ')' token /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:167: error: `RETCODE' undeclared (first use in this function) /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:167: error: syntax error before "rc" /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c:183: error: `rc' undeclared (first use in this function) /var/tmp/portage/php-4.3.4-r1/work/php-4.3.4/ext/odbc/php_odbc.c: In function `_close_odbc_conn': and about 15 more screens of errors... make: *** [ext/odbc/php_odbc.lo] Error 1 make: *** Waiting for unfinished jobs.... qpkg -I -v unixODBC dev-db/unixODBC-2.2.2 * Portage 2.0.49-r15 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.6.0-test9-mm4) ================================================================= System uname: 2.6.0-test9-mm4 i686 Celeron (Mendocino) Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="ftp://ftp.uninett.no/pub/linux/Gentoo http://gentoo.oregonstate.edu " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 oss avi crypt encode gif jpeg libg++ mad mikmod mpeg ncurses png quicktime truetype xml2 xv zlib gdbm berkdb slang readline X sdl gpm tcpd pam libwww ssl imlib oggvorbis gtk qt opengl -3dnow aalib acl acpi alsa apache2 -apm arts bonobo caps cdr cups curl dga dvd dvdr esd faad foomaticdb -gnome gnomedb gphoto2 gtk2 gtkhtml gstreamer innodb java -kde lcms ldap libgda maildir memlimit mmx -motif mozilla mozsvg -mysql -nas -nls odbc -pdflib -perl pic python -postgres samba -sasl slp -spell -svga tiff usb wxwindows xml -xmms"
Created attachment 21028 [details] /usr/include/sql.h
thats because something is wrong with your sqltypes.h remove all files relating to odbc from /usr/lib/gcc-lib/*/*/{sql*,odbc*} and try it again.
find /usr/lib/gcc-lib/ -name *sql* /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/java/sql /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/javax/sql There is nothing else in there. /usr/include/sqltypes.h contents: #ifndef ECPG_SQLTYPES_H #define ECPG_SQLTYPES_H #define CCHARTYPE ECPGt_char #define CSHORTTYPE ECPGt_short #define CINTTYPE ECPGt_int #define CLONGTYPE ECPGt_long #define CFLOATTYPE ECPGt_float #define CDOUBLETYPE ECPGt_double #define CDECIMALTYPE ECPGt_decimal #define CFIXCHARTYPE 108 #define CSTRINGTYPE ECPGt_char #define CDATETYPE ECPGt_date #define CMONEYTYPE 111 #define CDTIMETYPE ECPGt_timestamp #define CLOCATORTYPE 113 #define CVCHARTYPE ECPGt_varchar #define CINVTYPE 115 #define CFILETYPE 116 #define CINT8TYPE ECPGt_long_long #define CCOLLTYPE 118 #define CLVCHARTYPE 119 #define CFIXBINTYPE 120 #define CVARBINTYPE 121 #define CBOOLTYPE ECPGt_bool #define CROWTYPE 123 #define CLVCHARPTRTYPE 124 #define CTYPEMAX 25 #endif /* ndef ECPG_SQLTYPES_H */
please run qpkg -f /usr/include/sqltypes.h that is NOT the correct sqltypes.h for ODBC.
See #34605... that might be the cause...
*** Bug 36641 has been marked as a duplicate of this bug. ***
How is this possible: euler root # qpkg -f /usr/include/sqltypes.h dev-db/unixODBC * euler root # cat /usr/include/sqltypes.h cat: /usr/include/sqltypes.h: No such file or directory Best regards, Paulo Matos
upgrade your postgresql if you use if (i did new versions of 7.4/7.4.1, don't know if you need 7.3 as well). then this will go away. 1. upgrade postgresql 2. re-install unixodbc 3. re-install php (and it will work).