iodbc: ok as built-in, "invalid library" as shared

From: Date: Sat, 27 Jan 2001 16:48:44 +0000
Subject: iodbc: ok as built-in, "invalid library" as shared
Groups: php.install 
Request: Send a blank email to php-install+get-1830@lists.php.net to get a copy of this message
apache-1.3.9, glibc-2.1.2, php-4.0.4 configure --with-iodbc=/path compiles and works (odbc connection working) building iodbc support in a shared object, iodbc.so, gives the following error at apache startup: PHP Warning: Invalid library (maybe not a PHP library) 'iodbc.so' in Unknown on line 0 PHP Warning: Invalid library (maybe not a PHP library) 'iodbc.so' in Unknown on line 0 ldd iodbc.so shows the object is linked to the libiodbc library. Tried with --with-odbc=shared -> no change --with-iodbc=shared -> weird Zlib error during configure ("need zlib > 1.0.9" when I have 1.1.3) I searched dejanews for similar errors and I see my dl.c is already "fixed" with the _get_module work-around if (!get_module) get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle, "_get_module"); This is how I build iodbc.so. There's a lot of redundancy and useless params, because I just copied the code I found in a rpm spec file (in the spec files there are some $1 $2 $3 to build mysql, pgsql, ... modules, which I've just replaced with iodbc data): gcc -fPIC -shared -DHAVE_CONFIG_H \ -DCOMPILE_DL_echo iodbc | tr '[a-z]' '[A-Z]' \ -DHAVE_echo iodbc | tr '[a-z]' '[A-Z]' \ -I. -I./TSRM -I./main -I/usr/sbin/apxs -q INCLUDEDIR -I./Zend \ -I/usr/include/freetype -I/usr/include/iodbc -I/usr/openlink/odbcsdk/include \ -I./ext/iodbc -I./ext/iodbc/libiodbc \ -I./ext/xml/expat/xmltok -I./ext/xml/expat/xmlparse \ grep ^CPPFLAGS Zend/Makefile | cut -f2- -d= \ ext/odbc/php_odbc.c -o iodbc.so -L.libs -L/usr/openlink/odbcsdk/lib -liodbc -lc -- giulioo@pobox.com

« previous php.install (#1830) next »