Bug #48614 [Com]: Loading "pdo_sqlite.so" fails: undefined symbol: sqlite3_libversion

From: Date: Thu, 28 Aug 2014 14:26:21 +0000
Subject: Bug #48614 [Com]: Loading "pdo_sqlite.so" fails: undefined symbol: sqlite3_libversion
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187316@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=48614&edit=1 ID: 48614 Comment by: jaimz at vertigolabs dot org Reported by: kaspernj at gmail dot com Summary: Loading "pdo_sqlite.so" fails: undefined symbol: sqlite3_libversion Status: Assigned Type: Bug Package: PDO SQLite Operating System: Ubuntu Jaunty PHP Version: 5.3.0RC4 Assigned To: scottmac Block user comment: N Private report: N New Comment: I'm experiencing this with php 5.6 Previous Comments: ------------------------------------------------------------------------ [2013-11-21 08:36:01] seyferseed at mail dot ru I have this bug on PHP 5.5.3-1ubuntu2 (cli) (built: Oct 9 2013 14:49:12) PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/pdo_sqlite.so' - /usr/lib/php5/20121212/pdo_sqlite.so: undefined symbol: php_pdo_unregister_driver in Unknown on line 0 ------------------------------------------------------------------------ [2013-08-12 16:40:32] michaeld at owl-online dot de "Bug" still exists in php-5.4.17: WÖRK-ARAUND (four us) ;-): 1. install sqlite3-devel 2. use this in you configure command (add /usr) --with-pdo-sqlite=shared,/usr Cheers, MD ------------------------------------------------------------------------ [2012-06-27 10:29:25] rs at bytecamp dot net This bug still exists in PHP-5.4.4. When will it ever be fixed? ------------------------------------------------------------------------ [2012-06-13 02:43:34] kris dot glynn at virginaustralia dot com I've just ran into this exact issue compiling php-5.3.13 I used.. --without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared .. which still produced the "undefined symbol: sqlite3_libversion" error. It wasn't until I tried the patch above to configure script from "jd at cpanel dot net" that the error goes away. My question is why are we still having to do this with php-5.3.13 ? Am I missing something ? My exact configure options are below.. ./configure --with-apxs2=/data/www2/apache/bin/apxs --prefix=/data/www2/apache --with-config-file-path=/data/www2/apache/php --with-openssl=/data/www2/apache --with-curl=/data/www2/apache --with-gd --enable-gd-native-ttf --with-png-dir=/data/www2/apache --with-jpeg-dir=/data/www2/apache --with-freetype-dir=/data/www2/apache --with-xpm-dir=/usr/X11R6/ --with-zlib-dir=/data/www2/apache --with-oci8=instantclient,/usr/lib/oracle/10.2.0.4/client/lib --with-libxml-dir=/data/www2/apache --with-mysql=/data/www2/apache --with-ldap=/data/www2/apache --with-pear=$BASE_PATH/pear/ --enable-pdo=shared --without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared --with-pdo-oci=shared,instantclient,/usr,10.2.0.4 --with-pdo-mysql=shared,/data/www2/apache --with-mcrypt=/data/www2/apache (all the dependencies for php as you can see above exist in /data/www2/apache) ------------------------------------------------------------------------ [2010-10-14 19:21:32] jd at cpanel dot net The problem is that pdo_sqlite compiles against the embedded copy of sqlite3 but doesn't include the sqlite3 object files in the final pdo_sqlite.so. Ugly patch directly against the configure script: --- php-5.3.3.orig/configure 2010-07-21 05:53:06.000000000 -0500 +++ php-5.3.3/configure 2010-10-14 09:40:17.000000000 -0500 @@ -75183,6 +75183,12 @@ else # use bundled libs + + # This change is anchored here to avoid patch being misapplied. This really only needs to be added + # when pdo_sqlite is compiled shared and using the bundled sqlite3. It shouldn't hurt so long as the + # bundled sqlite3 is used though. + shared_objects_pdo_sqlite="$shared_objects_pdo_sqlite ext/sqlite3/libsqlite/sqlite3.lo" + if test "$enable_maintainer_zts" = "yes"; then threadsafe_flags="-DSQLITE_THREADSAFE=1" else ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=48614 -- Edit this bug report at https://bugs.php.net/bug.php?id=48614&edit=1

« previous php.bugs (#187316) next »