#35432 [Fbk->Opn]: make fails with PDO and MySQL5
| From: | mail at philipp-wagner dot com | Date: | Wed, 30 Nov 2005 15:25:15 +0000 |
| Subject: | #35432 [Fbk->Opn]: make fails with PDO and MySQL5 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-89492@lists.php.net to get a copy of this message | ||
ID: 35432
User updated by: mail at philipp-wagner dot com
Reported By: mail at philipp-wagner dot com
-Status: Feedback
+Status: Open
Bug Type: PDO related
Operating System: SuSE Linux 8.0
PHP Version: 5CVS-2005-11-27 (snap)
Assigned To: wez
New Comment:
Well, I thought this might be the problem (mixing of shared and static
libraries)... But now the check seems to be too strict.
I first tried to build with --enable-pdo=shared
--with-pdo-mysql=shared,/usr/local/mysql
Now I got the following error message:
You've configured extension sqlite to build statically, but it depends
on extension pdo, which you've configured to build shared.
You either need to build sqlite shared or build pdo statically for the
build to be successful.
sqlite is enabled by default (I didn't specify exlicitly specify pdo
sqlite support as a configure option).
./configure --help doesn't say anything about an option like
--with-pdo-sqlite, but I tried to use it anyways (or what else should I
do to specify shared pdo sqlite support?). So I ran ./configure with
--with-pdo-sqlite=shared
This worked out quite well at first, configure gave me an output like
checking for sqlite 3 driver for PDO... yes, shared
But then, a bit further down, I got the error message again:
checking for PDO includes... (cached)
/usr/local/src/php5.1-200511301330/ext
checking for lemon... no
configure: warning: lemon versions supported for regeneration of
libsqlite parsers: 1.0 (found: none).
configure: error:
You've configured extension sqlite to build statically, but it depends
on extension pdo, which you've configured to build shared.
You either need to build sqlite shared or build pdo statically for the
build to be successful.
I actually think, if you specify --enable-pdo=shared, all pdo
"submodules" should also be built shared, as it reduces confusion and
is the only way to get a working build anyways (it seems it is not
possible to mix shared and static pdo libraries, so there's no need to
specify it seperately).
Also, the documentation doesn't say anything about how to build the
specific PDO modules. It just suggests building PDO with
--enable-pdo=shared, but doesn't say which configure options to use for
MySQL PDO support etc. (I just got it from the ./configure --help
output), and also doesn't mention the shared "problem".
Previous Comments:
------------------------------------------------------------------------
[2005-11-30 05:48:21] 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-28 17:53:13] mail at philipp-wagner dot com
Yes, I see that now too, but it's not a problem for MySQL, as
/usr/local/mysql is the prefix (it's a MySQL binary .tar.gz
distribution).
------------------------------------------------------------------------
[2005-11-27 23:43:30] sniper@php.net
One note about your usage of the configure options: There aren't any
options that expect the path to the libraries.
Every single one of them expects the install prefix.
In most cases it's either /usr or /usr/local and not /usr/lib or
/usr/local/lib..
------------------------------------------------------------------------
[2005-11-27 22:40:17] tony2001@php.net
Wez, one more for you.
------------------------------------------------------------------------
[2005-11-27 22:31:06] mail at philipp-wagner dot com
Description:
------------
I get the same error as in bug #34939 with PHP 5.1.0 (official release)
and also today's snapshot release. During the final linking process of
make, I get the following error:
ext/pdo_mysql/.libs/pdo_mysql.o: In function `zm_startup_pdo_mysql':
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:78:
undefined referen
ce to `php_pdo_declare_long_constant'
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:79:
undefined referen
ce to `php_pdo_declare_long_constant'
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:80:
undefined referen
ce to `php_pdo_declare_long_constant'
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:81:
undefined referen
ce to `php_pdo_declare_long_constant'
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:82:
undefined referen
ce to `php_pdo_declare_long_constant'
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:84:
undefined referen
ce to `php_pdo_register_driver'
ext/pdo_mysql/.libs/pdo_mysql.o: In function `zm_shutdown_pdo_mysql':
/usr/local/src/php5-200511271530/ext/pdo_mysql/pdo_mysql.c:92:
undefined referen
ce to `php_pdo_unregister_driver'
ext/pdo_mysql/.libs/mysql_driver.o: In function `_pdo_mysql_error':
/usr/local/src/php5-200511271530/ext/pdo_mysql/mysql_driver.c:109:
undefined ref
erence to `php_pdo_get_exception'
ext/pdo_mysql/.libs/mysql_driver.o: In function
`mysql_handle_preparer':
/usr/local/src/php5-200511271530/ext/pdo_mysql/mysql_driver.c:178:
undefined ref
erence to `pdo_parse_params'
ext/pdo_mysql/.libs/mysql_driver.o: In function
`pdo_mysql_last_insert_id':
/usr/local/src/php5-200511271530/ext/pdo_mysql/mysql_driver.c:259:
undefined ref
erence to `php_pdo_int64_to_str'
ext/pdo_mysql/.libs/mysql_driver.o: In function
`pdo_mysql_handle_factory':
/usr/local/src/php5-200511271530/ext/pdo_mysql/mysql_driver.c:412:
undefined ref
erence to `php_pdo_parse_data_source'
ext/pdo_mysql/.libs/mysql_statement.o: In function
`pdo_mysql_stmt_param_hook':
/usr/local/src/php5-200511271530/ext/pdo_mysql/mysql_statement.c:338:
undefined
reference to `pdo_raise_impl_error'
ext/pdo_sqlite/.libs/pdo_sqlite.o: In function
`zm_startup_pdo_sqlite':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/pdo_sqlite.c:80:
undefined refer
ence to `php_pdo_register_driver'
ext/pdo_sqlite/.libs/pdo_sqlite.o: In function
`zm_shutdown_pdo_sqlite':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/pdo_sqlite.c:87:
undefined refer
ence to `php_pdo_unregister_driver'
ext/pdo_sqlite/.libs/sqlite_driver.o: In function `_pdo_sqlite_error':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_driver.c:78:
undefined re
ference to `php_pdo_get_exception'
ext/pdo_sqlite/.libs/sqlite_driver.o: In function
`pdo_sqlite_last_insert_id':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_driver.c:197:
undefined r
eference to `php_pdo_int64_to_str'
ext/pdo_sqlite/.libs/sqlite_driver.o: In function
`zif_SQLite_sqliteCreateFuncti
on':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_driver.c:471:
undefined r
eference to `pdo_raise_impl_error'
ext/pdo_sqlite/.libs/sqlite_driver.o: In function
`zif_SQLite_sqliteCreateAggreg
ate':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_driver.c:543:
undefined r
eference to `pdo_raise_impl_error'
ext/pdo_sqlite/.libs/sqlite_driver.o: In function
`pdo_sqlite_handle_factory':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_driver.c:697:
undefined r
eference to `php_pdo_get_exception'
ext/pdo_sqlite/.libs/sqlite_statement.o: In function
`pdo_sqlite_stmt_param_hook
':
/usr/local/src/php5-200511271530/ext/pdo_sqlite/sqlite_statement.c:116:
undefine
d reference to `pdo_raise_impl_error'
ext/sqlite/.libs/sqlite.o: In function `zm_startup_sqlite':
/usr/local/src/php5-200511271530/ext/sqlite/sqlite.c:1100: undefined
reference t
o `php_pdo_register_driver'
ext/sqlite/.libs/sqlite.o: In function `zm_shutdown_sqlite':
/usr/local/src/php5-200511271530/ext/sqlite/sqlite.c:1113: undefined
reference to `php_pdo_unregister_driver'
ext/sqlite/.libs/pdo_sqlite2.o: In function `_pdo_sqlite2_error':
/usr/local/src/php5-200511271530/ext/sqlite/pdo_sqlite2.c:291:
undefined reference to `php_pdo_get_exception'
ext/sqlite/.libs/pdo_sqlite2.o: In function
`pdo_sqlite2_last_insert_id':
/usr/local/src/php5-200511271530/ext/sqlite/pdo_sqlite2.c:373:
undefined reference to `php_pdo_int64_to_str'
ext/sqlite/.libs/pdo_sqlite2.o: In function
`pdo_sqlite2_handle_factory':
/usr/local/src/php5-200511271530/ext/sqlite/pdo_sqlite2.c:579:
undefined reference to `php_pdo_get_exception'
Reproduce code:
---------------
I am using MySQL 5.0.16 and my configure line was as follows:
'./configure' '--enable-trans-sid' '--enable-memory-limit'
'--with-config-file-path=/etc' '--enable-xslt' '--with-xslt-sablot'
'--enable-ftp' '--enable-bcmath' '--with-bz2'
'--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysql=/usr/local/mysql' '--with-gzip' '--with-bzip2'
'--with-gd' '--with-jpeg-dir=/usr/lib' '--with-zlib-dir=/usr/lib'
'--with-iconv-dir=/usr/local/lib' '--with-iconv=/usr/local/lib'
'--with-freetype-dir' '--enable-gd-native-ttf'
'--with-magickwand=/usr/local' --enable-pdo=shared
--with-pdo-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring
I didn't get any error when I was compiling PHP without any PDO
configure option, it built fine with PDO support for sqlite.
Unfortunately it's hard for me to try every possible combination of
configure lines which may cause the problem, as a make process takes
about two hours on my machine. But if you need me to try a certain
configure line, I'll be glad to provide you with the results.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35432&edit=1