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

 ID:                 48614
 Comment by:         michaeld at owl-online dot de
 Reported by:        kaspernj at gmail dot com
 Summary:            Loading "pdo_sqlite.so" fails: undefined symbol:
                     sqlite3_libversion
 Status:             Assigned
 Type:               Bug
 Package:            PDO related
 Operating System:   Ubuntu Jaunty
 PHP Version:        5.3.0RC4
 Assigned To:        scottmac
 Block user comment: N
 Private report:     N

 New Comment:

"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


Previous Comments:
------------------------------------------------------------------------
[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

------------------------------------------------------------------------
[2010-06-08 12:52:20] kontakt at beberlei dot de

You can get this working with the following configure:

--without-sqlite --with-sqlite3=shared --with-pdo-sqlite=shared,/usr

More information in this thread: http://news.php.net/php.pdo/427

------------------------------------------------------------------------
[2010-05-25 23:50:30] ashoat at gmail dot com

The problem is still occurring. There really ought to be a patch by now.

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


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

Reply via email to