php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35379 PDO shared fails to link sqllite extension
Submitted: 2005-11-25 04:16 UTC Modified: 2005-11-30 19:22 UTC
From: phyre at rogers dot com Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5.1.0 OS: Debian Linux 3.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phyre at rogers dot com
New email:
PHP Version: OS:

 

 [2005-11-25 04:16 UTC] phyre at rogers dot com
Description:
------------
Using --enable-pdo=shared (as recommended in the documentation for php5.1) in configure and then making gets through the pdo compilation, but on linking has unresolved references

Reproduce code:
---------------
configure, compile

Expected result:
----------------
Probably should automatically build pdo_sqlite shared as well.

Actual result:
--------------
"undefined reference to `php_pdo_register_driver'" errors and similar as a result of it being shared when linking php cli and apache module.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-25 05:09 UTC] wez@php.net
What was your configure line?

 [2005-11-25 05:21 UTC] phyre at rogers dot com
./configure  --with-apxs2=/usr/bin/apxs2 --disable-debug --prefix=/usr/local --with-pear --with-config-file-path=/etc/php5/apache2 --enable-discard-path --enable-memory-limit --enable-inline-optimization --enable-ipv6 --disable-posix --with-zlib --with-mhash --with-mcrypt --with-mysql=/usr --with-mysqli --with-pgsql --enable-ftp --with-curl --with-gd --enable-gd-native-ttf --enable-bcmath --with-openssl --disable-rpath --with-mysql-sock=/var/run/mysqld/mysql.sock --with-imap --with-imap-ssl --with-zip --with-jpeg-dir=/usr --with-png-dir=/usr --with-tiff-dir=/usr --with-freetype-dir=/usr --enable-exif --enable-cli --with-kerberos --enable-soap --with-pspell --with-bz2 --with-gettext --enable-pdo=shared

I also tried disabling the pdo_sqlite but that didn't seem to help, as it still builds the sqlite2 pdo module.
 [2005-11-25 15:26 UTC] jstienstra at welnet dot nl
building pdo shared does not work with pdo-sqlite v3 and sqlite v2.

disabling these modules with --without-pdo-sqlite and without-sqlite fixes it, or build pdo statically.

see my double post (sorry about that): http://bugs.php.net/bug.php?id=35396
 [2005-11-30 05:48 UTC] wez@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip

Please try the next PHP 5.1 snapshot.
It features an improved error message that should catch conflicting configure options.
 [2005-11-30 18:37 UTC] phyre at rogers dot com
Just typed a huge comment but bugzilla lost it... so the summary...

Adding --without-pdo-sqlite still returns the message.
Adding --without-sqlite still returns the message.
Adding both makes configure work just right.

HOWEVER, this disables the sqlite_* functions.  These should be based on sqlite v2 and the PDO on sqlite v3.  So in doing so are we discouraging sqlite_* functions?  Is there no way to maintain both, while the manual for PDO encourages shared so it can be updated from PECL easily?  Especially since they're different versions?  Also note sqlitev2 is enabled by default in php5, so it's something that is depended on in some cases.

Also, the message really isn't that informative:
 "You've configured extension pdo_sqlite to build statically, but it depends on extension pdo, which you've configured to build shared. You either need to build pdo_sqlite shared or build pdo statically for the build to be successful."
 We may be better of referencing a specific configure option to provide a bit more detail on the matter.
 [2005-11-30 18:49 UTC] wez@php.net
You "simply" need to tell configure to build what you want it to build,
how you want it built.

--enable-pdo=shared
--with-pdo-sqlite=shared
--with-sqlite=shared

I know it sucks that we can't automatically make it work that way you
want it; configure scripts have their limitations.
 [2005-11-30 19:22 UTC] phyre at rogers dot com
I think I was misunderstood.  Adding all three does work, but what I am suggesting is that we ensure that we don't create even more confusion by doing so.  The logical step I went through was to grep for sqlite options.  pdo_sqlite is logical, but you _ALSO_ need --with-sqlite=shared.  One or the other doesn't work.  So it is important to add that to the message, stating that not only does this affect pdo_sqlite, but also php's sqlite functions, so that users right away know both need to be compiled as shared.

I wasn't asking for much more than that.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 10:03:36 2021 UTC