[unixODBC-support] Compile Error

Martin Evans martin.evans at easysoft.com
Tue Feb 6 08:55:01 GMT 2007


Drewfus wrote:
> Hi;
> 
> When compiling PHP with unixODBC Support - I receive the following error:
> 
> /bin/sh /export/home/corenet/reb/php-4.3.4/libtool --silent 
> --preserve-dup-deps --mode=compile gcc 
> -I/usr/local/easysoft/unixODBC/include -Iext/odbc/ 
> -I/export/home/corenet/reb/php-4.3.4/ext/odbc/ -DPHP_ATOM_INC 
> -I/export/home/corenet/reb/php-4.3.4/include 
> -I/export/home/corenet/reb/php-4.3.4/main 
> -I/export/home/corenet/reb/php-4.3.4 
> -I/export/home/corenet/reb/php-4.3.4/Zend -I/usr/local/include 
> -I/export/home/corenet/reb/php-4.3.4/ext/xml/expat  
> -D_POSIX_PTHREAD_SEMANTICS -I/export/home/corenet/reb/php-4.3.4/TSRM  -g 
> -O2  -prefer-pic -c 
> /export/home/corenet/reb/php-4.3.4/ext/odbc/php_odbc.c -o 
> ext/odbc/php_odbc.lo
> /bin/sh /export/home/corenet/reb/php-4.3.4/libtool --silent 
> --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC 
> -I/export/home/corenet/reb/php-4.3.4/include 
> -I/export/home/corenet/reb/php-4.3.4/main 
> -I/export/home/corenet/reb/php-4.3.4 
> -I/export/home/corenet/reb/php-4.3.4/Zend -I/usr/local/include 
> -I/export/home/corenet/reb/php-4.3.4/ext/xml/expat  
> -D_POSIX_PTHREAD_SEMANTICS -I/export/home/corenet/reb/php-4.3.4/TSRM  -g 
> -O2   -o ext/odbc/odbc.la -export-dynamic -avoid-version -prefer-pic 
> -module -rpath /export/home/corenet/reb/php-4.3.4/modules -L/usr/ucblib 
> -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2 -L/usr/local/lib 
> ext/odbc/php_odbc.lo -R/usr/local/easysoft/unixODBC/lib 
> -L/usr/local/easysoft/unixODBC/lib -lodbc
> *ld: fatal: file /usr/local/easysoft/unixODBC/lib/libodbc.so: wrong ELF 
> class: ELFCLASS64
> ld: fatal: File processing errors. No output written to 
> ext/odbc/.libs/odbc.so
> make: *** [ext/odbc/odbc.la] Error 1*
> 
> iSQL is working fine - only receiving this error when trying to add 
> unixODBC Support to PHP.  Any guidance?

You have a build of unixODBC which is 64 bit and you are trying to build 
php 32 bit - you can't do this. You either get/build a 32 bit unixODBC 
or you build php 64bit. Given you are using an Easysoft build unixODBC 
(I guess) just download the 32bit version of the driver you are using 
and install that.

NOTE: Just because you have a 64bit processor does not mean you have to 
build everything 64 bit.

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com



More information about the unixODBC-support mailing list